In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix possible int overflows in nilfs_fiemap()
Since nilfsbmaplookupcontig() in nilfsfiemap() 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.
[
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1874.0,
"function_hash": "199258610149963040500485845822430107354"
},
"id": "CVE-2025-21736-25feb20e",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7649937987fed51ed09985da4019d50189fc534e",
"target": {
"file": "fs/nilfs2/inode.c",
"function": "nilfs_fiemap"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1885.0,
"function_hash": "332854196180894529363331880111145614258"
},
"id": "CVE-2025-21736-309c22eb",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8f41df5fd4c11d26e929a85f7239799641f92da7",
"target": {
"file": "fs/nilfs2/inode.c",
"function": "nilfs_fiemap"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"244522267477742621069375062123792330880",
"174376716779902781597009711714252823971",
"65108849546583884746106537053248233979",
"177947662448014500539904161908813461831",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"233446667746542680746440812204007106211",
"262632966897810422935821856542070338686",
"267278083312138251430945656342112565108",
"94578840855023423288024761336734522354",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"256906662225113480718805715665923826100",
"1707150260308436827176500120567297378"
]
},
"id": "CVE-2025-21736-378ce7e6",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7649937987fed51ed09985da4019d50189fc534e",
"target": {
"file": "fs/nilfs2/inode.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"244522267477742621069375062123792330880",
"174376716779902781597009711714252823971",
"65108849546583884746106537053248233979",
"177947662448014500539904161908813461831",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"233446667746542680746440812204007106211",
"262632966897810422935821856542070338686",
"267278083312138251430945656342112565108",
"94578840855023423288024761336734522354",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"256906662225113480718805715665923826100",
"1707150260308436827176500120567297378"
]
},
"id": "CVE-2025-21736-38a60fd4",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58b1c6881081f5ddfb9a14dc241a74732c0f855c",
"target": {
"file": "fs/nilfs2/inode.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"244522267477742621069375062123792330880",
"174376716779902781597009711714252823971",
"65108849546583884746106537053248233979",
"177947662448014500539904161908813461831",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"233446667746542680746440812204007106211",
"262632966897810422935821856542070338686",
"267278083312138251430945656342112565108",
"94578840855023423288024761336734522354",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"256906662225113480718805715665923826100",
"1707150260308436827176500120567297378"
]
},
"id": "CVE-2025-21736-3aeb5822",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8f41df5fd4c11d26e929a85f7239799641f92da7",
"target": {
"file": "fs/nilfs2/inode.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1885.0,
"function_hash": "332854196180894529363331880111145614258"
},
"id": "CVE-2025-21736-4f14ca27",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58b1c6881081f5ddfb9a14dc241a74732c0f855c",
"target": {
"file": "fs/nilfs2/inode.c",
"function": "nilfs_fiemap"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1885.0,
"function_hash": "332854196180894529363331880111145614258"
},
"id": "CVE-2025-21736-570c660e",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b9495a9109abc31d3170f7aad7d48aa64610a1a2",
"target": {
"file": "fs/nilfs2/inode.c",
"function": "nilfs_fiemap"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1885.0,
"function_hash": "332854196180894529363331880111145614258"
},
"id": "CVE-2025-21736-73402648",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@250423300b4b0335918be187ef3cade248c06e6a",
"target": {
"file": "fs/nilfs2/inode.c",
"function": "nilfs_fiemap"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"244522267477742621069375062123792330880",
"174376716779902781597009711714252823971",
"65108849546583884746106537053248233979",
"177947662448014500539904161908813461831",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"233446667746542680746440812204007106211",
"262632966897810422935821856542070338686",
"267278083312138251430945656342112565108",
"94578840855023423288024761336734522354",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"256906662225113480718805715665923826100",
"1707150260308436827176500120567297378"
]
},
"id": "CVE-2025-21736-7c4fb7bb",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@250423300b4b0335918be187ef3cade248c06e6a",
"target": {
"file": "fs/nilfs2/inode.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"244522267477742621069375062123792330880",
"174376716779902781597009711714252823971",
"65108849546583884746106537053248233979",
"177947662448014500539904161908813461831",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"233446667746542680746440812204007106211",
"262632966897810422935821856542070338686",
"267278083312138251430945656342112565108",
"94578840855023423288024761336734522354",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"256906662225113480718805715665923826100",
"1707150260308436827176500120567297378"
]
},
"id": "CVE-2025-21736-7e315801",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f2bd0f1ab47822fe5bd699c8458b896c4b2edea1",
"target": {
"file": "fs/nilfs2/inode.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"244522267477742621069375062123792330880",
"174376716779902781597009711714252823971",
"65108849546583884746106537053248233979",
"177947662448014500539904161908813461831",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"233446667746542680746440812204007106211",
"262632966897810422935821856542070338686",
"267278083312138251430945656342112565108",
"94578840855023423288024761336734522354",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"256906662225113480718805715665923826100",
"1707150260308436827176500120567297378"
]
},
"id": "CVE-2025-21736-84046bb4",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6438ef381c183444f7f9d1de18f22661cba1e946",
"target": {
"file": "fs/nilfs2/inode.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1885.0,
"function_hash": "332854196180894529363331880111145614258"
},
"id": "CVE-2025-21736-8c5165ee",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f2bd0f1ab47822fe5bd699c8458b896c4b2edea1",
"target": {
"file": "fs/nilfs2/inode.c",
"function": "nilfs_fiemap"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1885.0,
"function_hash": "332854196180894529363331880111145614258"
},
"id": "CVE-2025-21736-9770ef39",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3d80f34f58445355fa27b9579a449fb186aa64e",
"target": {
"file": "fs/nilfs2/inode.c",
"function": "nilfs_fiemap"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"244522267477742621069375062123792330880",
"174376716779902781597009711714252823971",
"65108849546583884746106537053248233979",
"177947662448014500539904161908813461831",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"233446667746542680746440812204007106211",
"262632966897810422935821856542070338686",
"267278083312138251430945656342112565108",
"94578840855023423288024761336734522354",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"256906662225113480718805715665923826100",
"1707150260308436827176500120567297378"
]
},
"id": "CVE-2025-21736-d93cbbe4",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f3d80f34f58445355fa27b9579a449fb186aa64e",
"target": {
"file": "fs/nilfs2/inode.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 1885.0,
"function_hash": "332854196180894529363331880111145614258"
},
"id": "CVE-2025-21736-e37ba5f9",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6438ef381c183444f7f9d1de18f22661cba1e946",
"target": {
"file": "fs/nilfs2/inode.c",
"function": "nilfs_fiemap"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"244522267477742621069375062123792330880",
"174376716779902781597009711714252823971",
"65108849546583884746106537053248233979",
"177947662448014500539904161908813461831",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"233446667746542680746440812204007106211",
"262632966897810422935821856542070338686",
"267278083312138251430945656342112565108",
"94578840855023423288024761336734522354",
"161340359033704655773317426961505097663",
"318506609223736049754568432902768053763",
"256906662225113480718805715665923826100",
"1707150260308436827176500120567297378"
]
},
"id": "CVE-2025-21736-e5db8cb1",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b9495a9109abc31d3170f7aad7d48aa64610a1a2",
"target": {
"file": "fs/nilfs2/inode.c"
}
}
]