Import Source
https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-67019.json
JSON Data
https://api.test.osv.dev/v1/vulns/AZL-67019
Upstream
Published
2025-09-05T18:15:45Z
Modified
2026-04-01T05:21:06.636716Z
Summary
CVE-2025-39691 affecting package kernel for versions less than 6.6.104.2-1
Details

In the Linux kernel, the following vulnerability has been resolved:

fs/buffer: fix use-after-free when call bh_read() helper

There's issue as follows: BUG: KASAN: stack-out-of-bounds in endbufferreadsync+0xe3/0x110 Read of size 8 at addr ffffc9000168f7f8 by task swapper/3/0 CPU: 3 UID: 0 PID: 0 Comm: swapper/3 Not tainted 6.16.0-862.14.0.6.x8664 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) Call Trace: <IRQ> dumpstacklvl+0x55/0x70 printaddressdescription.constprop.0+0x2c/0x390 printreport+0xb4/0x270 kasanreport+0xb8/0xf0 endbufferreadsync+0xe3/0x110 endbiobhiosync+0x56/0x80 blkupdaterequest+0x30a/0x720 scsiendrequest+0x51/0x2b0 scsiiocompletion+0xe3/0x480 ? scsideviceunbusy+0x11e/0x160 blkcompletereqs+0x7b/0x90 handlesoftirqs+0xef/0x370 irqexitrcu+0xa5/0xd0 sysvecapictimer_interrupt+0x6e/0x90 </IRQ>

Above issue happens when do ntfs3 filesystem mount, issue may happens as follows: mount IRQ ntfsfillsuper readcachepage doreadcachefolio filemapreadfolio mpagereadfolio dompagereadpage ntfsgetblockvbo bhread submitbh waitonbuffer(bh); blkcompletereqs scsiiocompletion scsiendrequest blkupdaterequest endbiobhiosync endbufferread_sync __endbufferreadnotouch unlockbuffer

        wait_on_buffer(bh);--> return will return to caller

                  put_bh
                    --> trigger stack-out-of-bounds

In the mpagereadfolio() function, the stack variable 'mapbh' is passed to ntfsgetblockvbo(). Once unlockbuffer() unlocks and waitonbuffer() returns to continue processing, the stack variable is likely to be reclaimed. Consequently, during the endbufferreadsync() process, calling put_bh() may result in stack overrun.

If the bh is not allocated on the stack, it belongs to a folio. Freeing a buffer head which belongs to a folio is done by dropbuffers() which will fail to free buffers which are still locked. So it is safe to call putbh() before _endbufferreadnotouch().

References

Affected packages

Azure Linux:3 / kernel

Package

Name
kernel
Purl
pkg:rpm/azure-linux/kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.6.104.2-1

Database specific

source
"https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-67019.json"