nilfs2: fix possible int overflows in nilfs_fiemap()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 622daaff0a8975fb5c5b95f24f3234550ba32e92 · < b9495a9109abc31d3170f7aad7d48aa64610a1a2| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix possible int overflows in nilfs_fiemap()
Since nilfs_bmap_lookup_contig() in nilfs_fiemap() calculates its result by being prepared to go through potentially maxblocks == INT_MAX blocks, the value in n may experience an overflow caused by left shift of blkbits.
While it is extremely unlikely to occur, play it safe and cast right hand expression to wider type to mitigate the issue.
Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE.
From the CVE record · Linux
The Linux kernel’s nilfs2 fiemap function can experience an integer overflow when calculating a result across a very large number of blocks. The input does not establish an attacker-controlled impact or specify access, authentication, or user-interaction requirements.
Engineers running Linux kernels with nilfs2 support should check their versions; affected versions are not specified.