Re: [PATCH] scsi: sg: fix slab-use-after-free Read in sg_release

From: Martin K. Petersen
Date: Wed Dec 04 2024 - 21:18:07 EST


On Wed, 20 Nov 2024 18:29:44 +0530, Suraj Sonawane wrote:

> Fix a use-after-free bug in `sg_release`,
> detected by syzbot with KASAN:
>
> BUG: KASAN: slab-use-after-free in lock_release+0x151/0xa30
> kernel/locking/lockdep.c:5838
> __mutex_unlock_slowpath+0xe2/0x750 kernel/locking/mutex.c:912
> sg_release+0x1f4/0x2e0 drivers/scsi/sg.c:407
>
> [...]

Applied to 6.13/scsi-fixes, thanks!

[1/1] scsi: sg: fix slab-use-after-free Read in sg_release
https://git.kernel.org/mkp/scsi/c/f10593ad9bc3

--
Martin K. Petersen Oracle Linux Engineering