{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2024-50230",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-10-21T19:36:19.973Z",
        "datePublished": "2024-11-09T10:14:40.576Z",
        "dateUpdated": "2026-08-05T11:42:39.000Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T11:42:39.000Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix kernel bug due to missing clearing of checked flag\n\nSyzbot reported that in directory operations after nilfs2 detects\nfilesystem corruption and degrades to read-only,\n__block_write_begin_int(), which is called to prepare block writes, may\nfail the BUG_ON check for accesses exceeding the folio/page size,\ntriggering a kernel bug.\n\nThis was found to be because the \"checked\" flag of a page/folio was not\ncleared when it was discarded by nilfs2's own routine, which causes the\nsanity check of directory entries to be skipped when the directory\npage/folio is reloaded.  So, fix that.\n\nThis was necessary when the use of nilfs2's own page discard routine was\napplied to more than just metadata files."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The vulnerable code is reached only through a locally mounted nilfs2 block device — mount(2) plus ordinary directory syscalls (getdents, creat, unlink, rename) on that mount; no network protocol handler is involved. Attack Vector is Local rather than Physical because the attacker supplies image data (USB stick, disk image, container volume) and need not touch hardware.\nAC:L - The attacker fully controls the crafted nilfs2 image, so they choose the corruption that forces nilfs_error() into read-only degrade, and they can force the discard-then-reload sequence on demand with sync(2)/fsync(2) followed by a directory access. Nothing depends on conditions outside their influence, and the sequence can be retried indefinitely (syzbot reproduces it).\nPR:N - The attacker needs no account or privilege on the target system — they only supply the crafted nilfs2 medium, and the image can be built so that mount plus routine directory browsing by the victim (file manager readdir/lookup, thumbnailer) drives the corrupted path itself. This matches the established framing for crafted-filesystem-image flaws.\nUI:R - nilfs2 is FS_REQUIRES_DEV with no FS_USERNS_MOUNT, so the crafted image must be mounted by a privileged actor — a victim inserting the removable medium into a desktop/kiosk with udisks2 automount, an admin mounting a supplied image, or a loop mount inside a container.\nS:U - The out-of-bounds access and the BUG() occur inside the kernel's own memory and locking domain on the same system; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Bypassing nilfs_check_folio() lets nilfs_readdir() pass an unvalidated de->name_len (up to 255) to dir_emit() for an entry only 12 bytes from the folio end, leaking roughly 250 bytes of adjacent kernel heap directly into a userspace getdents() buffer. That is far more than a strictly bounded few-byte read, and it also exposes nilfs2 private metadata inodes through lookup.\nI:H - With the sanity gate skipped, nilfs_add_link() and nilfs_delete_entry() perform entry splitting and merging (de1->rec_len writes, memcpy into de->name, pde->rec_len rewrites) using offsets derived from unvalidated on-disk rec_len/name_len, corrupting directory data and filesystem metadata. The bypassed NILFS_PRIVATE_INODE check further permits directory entries to resolve to nilfs2's DAT/cpfile/sufile/ifile inodes, giving a type-confusion primitive against internal metadata.\nA:H - The reported and primary outcome is BUG_ON(to > folio_size(folio)) in __block_write_begin_int(), a kernel BUG taken while holding the folio lock and directory inode lock, which oopses the task and leaves the filesystem permanently wedged, or panics outright with panic_on_oops."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/nilfs2/page.c"
                    ],
                    "versions": [
                        {
                            "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
                            "lessThan": "994b2fa13a6c9cf3feca93090a9c337d48e3d60d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
                            "lessThan": "64afad73e4623308d8943645e5631f2c7a2d7971",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
                            "lessThan": "aa0cee46c5d3fd9a39575a4c8a4f65f25f095b89",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
                            "lessThan": "f05dbebb8ee34882505d53d83af7d18f28a49248",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
                            "lessThan": "cd0cdb51b15203fa27d4b714be83b7dfffa0b752",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
                            "lessThan": "f2f1fa446676c21edb777e6d2bc4fa8f956fab68",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
                            "lessThan": "56c6171932a7fb267ac6cb4ff8759b93ee1d0e2e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8c26c4e2694a163d525976e804d81cd955bbb40c",
                            "lessThan": "41e192ad2779cae0102879612dfe46726e4396aa",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/nilfs2/page.c"
                    ],
                    "versions": [
                        {
                            "version": "3.10",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "3.10",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.323",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.285",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.229",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.171",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.116",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.60",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.11.7",
                            "lessThanOrEqual": "6.11.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.10",
                                    "versionEndExcluding": "4.19.323"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.10",
                                    "versionEndExcluding": "5.4.285"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.10",
                                    "versionEndExcluding": "5.10.229"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.10",
                                    "versionEndExcluding": "5.15.171"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.10",
                                    "versionEndExcluding": "6.1.116"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.10",
                                    "versionEndExcluding": "6.6.60"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.10",
                                    "versionEndExcluding": "6.11.7"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.10",
                                    "versionEndExcluding": "6.12"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/994b2fa13a6c9cf3feca93090a9c337d48e3d60d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/64afad73e4623308d8943645e5631f2c7a2d7971"
                },
                {
                    "url": "https://git.kernel.org/stable/c/aa0cee46c5d3fd9a39575a4c8a4f65f25f095b89"
                },
                {
                    "url": "https://git.kernel.org/stable/c/f05dbebb8ee34882505d53d83af7d18f28a49248"
                },
                {
                    "url": "https://git.kernel.org/stable/c/cd0cdb51b15203fa27d4b714be83b7dfffa0b752"
                },
                {
                    "url": "https://git.kernel.org/stable/c/f2f1fa446676c21edb777e6d2bc4fa8f956fab68"
                },
                {
                    "url": "https://git.kernel.org/stable/c/56c6171932a7fb267ac6cb4ff8759b93ee1d0e2e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/41e192ad2779cae0102879612dfe46726e4396aa"
                }
            ],
            "title": "nilfs2: fix kernel bug due to missing clearing of checked flag",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "cvssV3_1": {
                            "scope": "UNCHANGED",
                            "version": "3.1",
                            "baseScore": 7.8,
                            "attackVector": "LOCAL",
                            "baseSeverity": "HIGH",
                            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                            "integrityImpact": "HIGH",
                            "userInteraction": "NONE",
                            "attackComplexity": "LOW",
                            "availabilityImpact": "HIGH",
                            "privilegesRequired": "LOW",
                            "confidentialityImpact": "HIGH"
                        }
                    },
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2024-50230",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2025-10-01T20:16:44.018414Z"
                            }
                        }
                    }
                ],
                "problemTypes": [
                    {
                        "descriptions": [
                            {
                                "lang": "en",
                                "type": "CWE",
                                "cweId": "CWE-787",
                                "description": "CWE-787 Out-of-bounds Write"
                            }
                        ]
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2025-10-01T20:17:27.750Z"
                }
            },
            {
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"
                    },
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"
                    }
                ],
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2025-11-03T22:27:11.058Z"
                }
            }
        ]
    }
}