{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-50478",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-10-04T15:13:33.467Z",
        "datePublished": "2025-10-04T15:16:38.346Z",
        "dateUpdated": "2026-05-11T19:20:16.210Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-05-11T19:20:16.210Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset()\n\nPatch series \"nilfs2: fix UBSAN shift-out-of-bounds warnings on mount\ntime\".\n\nThe first patch fixes a bug reported by syzbot, and the second one fixes\nthe remaining bug of the same kind.  Although they are triggered by the\nsame super block data anomaly, I divided it into the above two because the\ndetails of the issues and how to fix it are different.\n\nBoth are required to eliminate the shift-out-of-bounds issues at mount\ntime.\n\n\nThis patch (of 2):\n\nIf the block size exponent information written in an on-disk superblock is\ncorrupted, nilfs_sb2_bad_offset helper function can trigger\nshift-out-of-bounds warning followed by a kernel panic (if panic_on_warn\nis set):\n\n shift exponent 38983 is too large for 64-bit type 'unsigned long long'\n Call Trace:\n  <TASK>\n  __dump_stack lib/dump_stack.c:88 [inline]\n  dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106\n  ubsan_epilogue lib/ubsan.c:151 [inline]\n  __ubsan_handle_shift_out_of_bounds+0x33d/0x3b0 lib/ubsan.c:322\n  nilfs_sb2_bad_offset fs/nilfs2/the_nilfs.c:449 [inline]\n  nilfs_load_super_block+0xdf5/0xe00 fs/nilfs2/the_nilfs.c:523\n  init_nilfs+0xb7/0x7d0 fs/nilfs2/the_nilfs.c:577\n  nilfs_fill_super+0xb1/0x5d0 fs/nilfs2/super.c:1047\n  nilfs_mount+0x613/0x9b0 fs/nilfs2/super.c:1317\n  ...\n\nIn addition, since nilfs_sb2_bad_offset() performs multiplication without\nconsidering the upper bound, the computation may overflow if the disk\nlayout parameters are not normal.\n\nThis fixes these issues by inserting preliminary sanity checks for those\nparameters and by converting the comparison from one involving\nmultiplication and left bit-shifting to one using division and right\nbit-shifting."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/nilfs2/the_nilfs.c"
                    ],
                    "versions": [
                        {
                            "version": "e339ad31f59925b48a92ee3947692fdf9758b8c7",
                            "lessThan": "6b0ea3df56cccd53398d0289f399f19d43136b2e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e339ad31f59925b48a92ee3947692fdf9758b8c7",
                            "lessThan": "a6f89b10042baca218c8598d6db5a44c7e32625f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e339ad31f59925b48a92ee3947692fdf9758b8c7",
                            "lessThan": "9b3ba54025357440d6c4414c670984f628c6f6bf",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e339ad31f59925b48a92ee3947692fdf9758b8c7",
                            "lessThan": "d706485dffbbbf848e681edda29c7a46ac55698c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e339ad31f59925b48a92ee3947692fdf9758b8c7",
                            "lessThan": "d464b035c0613856d012cf1704879d3ff3f057fb",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e339ad31f59925b48a92ee3947692fdf9758b8c7",
                            "lessThan": "b47f5c579c8186f7f5ab5e4254e0734ea5b7bf7a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e339ad31f59925b48a92ee3947692fdf9758b8c7",
                            "lessThan": "1012ff77284e3bec0ec0a35a820b03ec43dec2cc",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e339ad31f59925b48a92ee3947692fdf9758b8c7",
                            "lessThan": "62d11ec205ef14d8acf172cfc9904fdbf200025a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e339ad31f59925b48a92ee3947692fdf9758b8c7",
                            "lessThan": "610a2a3d7d8be3537458a378ec69396a76c385b6",
                            "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/the_nilfs.c"
                    ],
                    "versions": [
                        {
                            "version": "2.6.30",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.30",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.9.337",
                            "lessThanOrEqual": "4.9.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.14.303",
                            "lessThanOrEqual": "4.14.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.270",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.229",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.163",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.86",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.0.16",
                            "lessThanOrEqual": "6.0.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.2",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.2",
                            "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": "2.6.30",
                                    "versionEndExcluding": "4.9.337"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "4.14.303"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "4.19.270"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "5.4.229"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "5.10.163"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "5.15.86"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.0.16"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.1.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.2"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/6b0ea3df56cccd53398d0289f399f19d43136b2e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a6f89b10042baca218c8598d6db5a44c7e32625f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9b3ba54025357440d6c4414c670984f628c6f6bf"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d706485dffbbbf848e681edda29c7a46ac55698c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d464b035c0613856d012cf1704879d3ff3f057fb"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b47f5c579c8186f7f5ab5e4254e0734ea5b7bf7a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1012ff77284e3bec0ec0a35a820b03ec43dec2cc"
                },
                {
                    "url": "https://git.kernel.org/stable/c/62d11ec205ef14d8acf172cfc9904fdbf200025a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/610a2a3d7d8be3537458a378ec69396a76c385b6"
                }
            ],
            "title": "nilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}