In the Linux kernel, the following vulnerability has been resolved:
nilfs2: prevent use of deleted inode
syzbot reported a WARNING in nilfs_rmdir. [1]
Because the inode bitmap is corrupted, an inode with an inode number that should exist as a ".nilfs" file was reassigned by nilfsmkdir for "file0", causing an inode duplication during execution. And this causes an underflow of inlink in rmdir operations.
The inode is used twice by the same task to unmount and remove directories ".nilfs" and "file0", it trigger warning in nilfs_rmdir.
Avoid to this issue, check inlink in nilfsiget(), if it is 0, it means that this inode has been deleted, and iput is executed to reclaim it.
[1] WARNING: CPU: 1 PID: 5824 at fs/inode.c:407 dropnlink+0xc4/0x110 fs/inode.c:407 ... Call Trace: <TASK> nilfsrmdir+0x1b0/0x250 fs/nilfs2/namei.c:342 vfsrmdir+0x3a3/0x510 fs/namei.c:4394 dormdir+0x3b5/0x580 fs/namei.c:4453 _dosysrmdir fs/namei.c:4472 [inline] _sesysrmdir fs/namei.c:4470 [inline] _x64sysrmdir+0x47/0x50 fs/namei.c:4470 dosyscallx64 arch/x86/entry/common.c:52 [inline] dosyscall64+0xf3/0x230 arch/x86/entry/common.c:83 entrySYSCALL64after_hwframe+0x77/0x7f
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@55e4baa0d32f0530ddc64c26620e1f2f8fa2724c",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-009d1b72",
"target": {
"file": "fs/nilfs2/namei.c"
},
"digest": {
"line_hashes": [
"9069514793532904646299314974002459877",
"306407924837500750324551804182751705102",
"223169516061707783980078847993277067596",
"226019782292399888017800138620512957341"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@284760b320a0bac411b18108316939707dccb12b",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-0202bce7",
"target": {
"file": "fs/nilfs2/inode.c"
},
"digest": {
"line_hashes": [
"240015656940163502453258727721578332835",
"243457156377666344029776670471373680825",
"67148798924692542088256371348718900102",
"328405877853727205506942013987126793870",
"326408349487179261105664569727408341394"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ef942d233643777f7b2a5deef620e82942983143",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-158fc814",
"target": {
"function": "nilfs_lookup",
"file": "fs/nilfs2/namei.c"
},
"digest": {
"length": 452.0,
"function_hash": "299054082857390242919572347376117188567"
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@901ce9705fbb9f330ff1f19600e5daf9770b0175",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-1ac06016",
"target": {
"file": "fs/nilfs2/inode.c"
},
"digest": {
"line_hashes": [
"240015656940163502453258727721578332835",
"243457156377666344029776670471373680825",
"67148798924692542088256371348718900102",
"328405877853727205506942013987126793870",
"326408349487179261105664569727408341394"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ef942d233643777f7b2a5deef620e82942983143",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-1bf7929e",
"target": {
"function": "nilfs_iget",
"file": "fs/nilfs2/inode.c"
},
"digest": {
"length": 406.0,
"function_hash": "174096481737531673861598661908719808646"
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ef942d233643777f7b2a5deef620e82942983143",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-3d6103fc",
"target": {
"file": "fs/nilfs2/namei.c"
},
"digest": {
"line_hashes": [
"9069514793532904646299314974002459877",
"306407924837500750324551804182751705102",
"223169516061707783980078847993277067596",
"226019782292399888017800138620512957341"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@912188316a8c9e41b8c1603c2276a05043b14f96",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-4278face",
"target": {
"file": "fs/nilfs2/namei.c"
},
"digest": {
"line_hashes": [
"9069514793532904646299314974002459877",
"306407924837500750324551804182751705102",
"223169516061707783980078847993277067596",
"226019782292399888017800138620512957341"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@912188316a8c9e41b8c1603c2276a05043b14f96",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-44c6d2af",
"target": {
"file": "fs/nilfs2/inode.c"
},
"digest": {
"line_hashes": [
"240015656940163502453258727721578332835",
"243457156377666344029776670471373680825",
"67148798924692542088256371348718900102",
"328405877853727205506942013987126793870",
"326408349487179261105664569727408341394"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ff561987ff12b6a3233431ff659b5d332e22f153",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-47efd2a5",
"target": {
"file": "fs/nilfs2/namei.c"
},
"digest": {
"line_hashes": [
"9069514793532904646299314974002459877",
"306407924837500750324551804182751705102",
"223169516061707783980078847993277067596",
"226019782292399888017800138620512957341"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ff561987ff12b6a3233431ff659b5d332e22f153",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-4aae3b8e",
"target": {
"function": "nilfs_iget",
"file": "fs/nilfs2/inode.c"
},
"digest": {
"length": 406.0,
"function_hash": "174096481737531673861598661908719808646"
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ff561987ff12b6a3233431ff659b5d332e22f153",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-5f2f5bad",
"target": {
"function": "nilfs_lookup",
"file": "fs/nilfs2/namei.c"
},
"digest": {
"length": 452.0,
"function_hash": "299054082857390242919572347376117188567"
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@284760b320a0bac411b18108316939707dccb12b",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-6279eef8",
"target": {
"function": "nilfs_iget",
"file": "fs/nilfs2/inode.c"
},
"digest": {
"length": 406.0,
"function_hash": "174096481737531673861598661908719808646"
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@901ce9705fbb9f330ff1f19600e5daf9770b0175",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-6690ccc1",
"target": {
"function": "nilfs_iget",
"file": "fs/nilfs2/inode.c"
},
"digest": {
"length": 406.0,
"function_hash": "174096481737531673861598661908719808646"
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@901ce9705fbb9f330ff1f19600e5daf9770b0175",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-671f93ea",
"target": {
"file": "fs/nilfs2/namei.c"
},
"digest": {
"line_hashes": [
"9069514793532904646299314974002459877",
"306407924837500750324551804182751705102",
"223169516061707783980078847993277067596",
"226019782292399888017800138620512957341"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ef942d233643777f7b2a5deef620e82942983143",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-6e0a1a13",
"target": {
"file": "fs/nilfs2/inode.c"
},
"digest": {
"line_hashes": [
"240015656940163502453258727721578332835",
"243457156377666344029776670471373680825",
"67148798924692542088256371348718900102",
"328405877853727205506942013987126793870",
"326408349487179261105664569727408341394"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@284760b320a0bac411b18108316939707dccb12b",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-7586371b",
"target": {
"file": "fs/nilfs2/namei.c"
},
"digest": {
"line_hashes": [
"9069514793532904646299314974002459877",
"306407924837500750324551804182751705102",
"223169516061707783980078847993277067596",
"226019782292399888017800138620512957341"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@55e4baa0d32f0530ddc64c26620e1f2f8fa2724c",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-8318340c",
"target": {
"function": "nilfs_iget",
"file": "fs/nilfs2/inode.c"
},
"digest": {
"length": 406.0,
"function_hash": "174096481737531673861598661908719808646"
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@55e4baa0d32f0530ddc64c26620e1f2f8fa2724c",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-a8605fe7",
"target": {
"file": "fs/nilfs2/inode.c"
},
"digest": {
"line_hashes": [
"240015656940163502453258727721578332835",
"243457156377666344029776670471373680825",
"67148798924692542088256371348718900102",
"328405877853727205506942013987126793870",
"326408349487179261105664569727408341394"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@55e4baa0d32f0530ddc64c26620e1f2f8fa2724c",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-b5d190e1",
"target": {
"function": "nilfs_lookup",
"file": "fs/nilfs2/namei.c"
},
"digest": {
"length": 452.0,
"function_hash": "299054082857390242919572347376117188567"
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@912188316a8c9e41b8c1603c2276a05043b14f96",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-b9ddcc16",
"target": {
"function": "nilfs_iget",
"file": "fs/nilfs2/inode.c"
},
"digest": {
"length": 406.0,
"function_hash": "174096481737531673861598661908719808646"
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@912188316a8c9e41b8c1603c2276a05043b14f96",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-c389cee1",
"target": {
"function": "nilfs_lookup",
"file": "fs/nilfs2/namei.c"
},
"digest": {
"length": 452.0,
"function_hash": "299054082857390242919572347376117188567"
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@284760b320a0bac411b18108316939707dccb12b",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-c9664962",
"target": {
"function": "nilfs_lookup",
"file": "fs/nilfs2/namei.c"
},
"digest": {
"length": 452.0,
"function_hash": "299054082857390242919572347376117188567"
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ff561987ff12b6a3233431ff659b5d332e22f153",
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2024-53690-e25d1140",
"target": {
"file": "fs/nilfs2/inode.c"
},
"digest": {
"line_hashes": [
"240015656940163502453258727721578332835",
"243457156377666344029776670471373680825",
"67148798924692542088256371348718900102",
"328405877853727205506942013987126793870",
"326408349487179261105664569727408341394"
],
"threshold": 0.9
},
"deprecated": false
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@901ce9705fbb9f330ff1f19600e5daf9770b0175",
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2024-53690-eae1af55",
"target": {
"function": "nilfs_lookup",
"file": "fs/nilfs2/namei.c"
},
"digest": {
"length": 452.0,
"function_hash": "299054082857390242919572347376117188567"
},
"deprecated": false
}
]