Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Dec 2025 18:49:27 +0000
From:      Ka Ho Ng <khng@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 9cfd75a6f88f - stable/15 - bio: Fix KASAN invalid access report in biodone
Message-ID:  <6952cd37.38c94.200e44cd@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by khng:

URL: https://cgit.FreeBSD.org/src/commit/?id=9cfd75a6f88f2076d7cd7e18acc9d89f6055e8fe

commit 9cfd75a6f88f2076d7cd7e18acc9d89f6055e8fe
Author:     Ka Ho Ng <khng@FreeBSD.org>
AuthorDate: 2025-12-29 15:49:29 +0000
Commit:     Ka Ho Ng <khng@FreeBSD.org>
CommitDate: 2025-12-29 18:47:56 +0000

    bio: Fix KASAN invalid access report in biodone
    
    Do not touch the bio fields after calling the bio_done callback. The bio
    might have been freed after the callback returns.
    
    Fixes:  725f4b108d54
    Reported by:    kp, markj
---
 sys/kern/vfs_bio.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index dc90bd3add22..2368f863a248 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -4523,8 +4523,6 @@ biodone(struct bio *bp)
 			bp->bio_flags |= BIO_ERROR_COMPAT;
 		}
 		done(bp);
-		bp->bio_error_compat = 0;
-		bp->bio_flags &= ~BIO_ERROR_COMPAT;
 	}
 }
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6952cd37.38c94.200e44cd>