Import Source
https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-64677.json
JSON Data
https://api.test.osv.dev/v1/vulns/AZL-64677
Upstream
Published
2025-07-04T14:15:30Z
Modified
2026-04-01T05:20:22.647482Z
Summary
CVE-2025-38218 affecting package kernel for versions less than 6.6.96.1-1
Details

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

f2fs: fix to do sanity check on sitbitmapsize

w/ below testcase, resize will generate a corrupted image which contains inconsistent metadata, so when mounting such image, it will trigger kernel panic:

touch img truncate -s $((512102410241024)) img mkfs.f2fs -f img $((25610241024)) resize.f2fs -s -i img -t $((10241024*1024)) mount img /mnt/f2fs

------------[ cut here ]------------ kernel BUG at fs/f2fs/segment.h:863! Oops: invalid opcode: 0000 [#1] SMP PTI CPU: 11 UID: 0 PID: 3922 Comm: mount Not tainted 6.15.0-rc1+ #191 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:f2fsrameta_pages+0x47c/0x490

Call Trace: f2fsbuildsegmentmanager+0x11c3/0x2600 f2fsfillsuper+0xe97/0x2840 mountbdev+0xf4/0x140 legacygettree+0x2b/0x50 vfsgettree+0x29/0xd0 path_mount+0x487/0xaf0 __x64sysmount+0x116/0x150 dosyscall64+0x82/0x190 entrySYSCALL64afterhwframe+0x76/0x7e RIP: 0033:0x7fdbfde1bcfe

The reaseon is:

siti->bitmapsize is 192, so size of sit bitmap is 192*8=1536, at maximum there are 1536 sit blocks, however MAINSEGS is 261893, so that sitblkcnt is 4762, buildsitentries() -> currentsitaddr() tries to access out-of-boundary in sitbitmap at offset from [1536, 4762), once sitbitmap and sitbitmapmirror is not the same, it will trigger f2fsbug_on().

Let's add sanity check in f2fssanitycheck_ckpt() to avoid panic.

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.96.1-1

Database specific

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