Servers and applications
CVE-2026-142987
usb: gadget: f_mass_storage: take filesem in nofua store to fix backing-file UAF
- Severity
- Unrated
- Published
- 3 Dec 2026
- Last changed
- 3 Dec 2026
- Added to UpHeron
- 3 Dec 2026
- Fixed in
- 5.10.276, 5.15.227, 6.12.120, 6.18.66, 7.3.7
- Sources
- CVE Program
Description
In the Linux kernel, the following vulnerability has been resolved:
fsg_store_nofua() syncs the LUN's backing file when switching from async to sync mode:
if (!nofua && curlun->nofua) fsg_lun_fsync_sub(curlun);
fsg_lun_fsync_sub() dereferences curlun->filp (vfs_fsync(filp)). Unlike every other store that touches the backing file -- fsg_store_ro() and fsg_store_cdrom() (down_read), fsg_store_file() (down_write) -- fsg_store_nofua() holds no filesem while doing so.
A concurrent close of the backing file runs under down_write(filesem) and does fput(curlun->filp) in fsg_lun_close() (fsg_store_file() with an empty path, the SCSI START_STOP eject in do_start_stop(), or forced_eject), so it can free the file while fsg_store_nofua() is dereferencing it:
BUG: KASAN: slab-use-after-free in vfs_fsync+0x20/0xe0 vfs_fsync+0x20/0xe0 fsg_lun_fsync_sub+0xa0/0xd0 fsg_store_nofua+0x138/0x160 configfs_write_iter+0x1a7/0x250 vfs_write+0x5df/0x940 Allocated by task 3459: fsg_store_file+0x150/0x1f0…
Affected software
| Software | Affected versions |
|---|---|
Linux kernelServers and applications · cna:linux|linux |
All 9 release lines
|
Status in Debian
Debian builds fixes into its own packages, so a release is often fixed under an older version number than the one upstream names.
- 4 vulnerable
| Package | Debian release | Status |
|---|---|---|
| linux | sidunstable | VulnerableNo fix yet. |
| 14forkytesting | VulnerableNo fix yet. | |
| 13trixiestable | VulnerableNo fix yet. | |
| 12bookwormoldstable | VulnerableNo fix yet. |
From Debian's security tracker for CVE-2026-142987 , read in the last 12 hours.
About Linux kernel
Unix-like operating system kernel, basis for all Linux operating systems
- GitHub stars
- 257,106GitHub, 29 Nov 2026
- Forks
- 66,781GitHub, 29 Nov 2026
- Developer
- Linus TorvaldsWikidata
- License
- GNU General Public License, version 2.0Wikidata
- Written in
- CWikidata
- First released
- 25 Aug 1991Wikidata
- First published on GitHub
- 4 Sept 2011GitHub
Vulnerabilities in Linux kernel
- In our list
- 4,747
- Published in the last 12 months
- 4,747
- Critical, last 12 months
- 108
- High, last 12 months
- 669
- Known exploited
- 0
- CVE-2026-143401net: virtio: validate outer protocol of UDP tunnel GSO packetsUnrated 3 Dec 2026
- CVE-2026-143400virtio_net: check RX buffer length before DMA syncUnrated 3 Dec 2026
- CVE-2026-143399udf: validate vat20->lengthHeader and VAT inode size in udf_load_vat()Unrated 3 Dec 2026
- CVE-2026-143398Input: destroy force-feedback device on input unregistrationUnrated 3 Dec 2026
- CVE-2026-1433979p: use fc->net_ns for network namespace in RDMA and socket transportsUnrated 3 Dec 2026
- CVE-2026-143396net/9p/usbg: fix descriptor cleanup use-after-freeUnrated 3 Dec 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-142987