{"api_version":"1","generated_at":"2026-09-11T23:40:10+00:00","cve":"CVE-2026-89557","urls":{"html":"https://cve.report/CVE-2026-89557","api":"https://cve.report/api/cve/CVE-2026-89557.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-89557","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-89557"},"summary":{"title":"md: do overflow check for sb->bblog_shift in super_1_load()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd: do overflow check for sb->bblog_shift in super_1_load()\n\nIn super_1_load(), sb->bblog_shift is an __u8 type value loaded from on-\ndisk superblock. It is used for badblocks API badblocks_set() by the\nfollowing sequence,\n\n 1930   rdev->badblocks.shift = sb->bblog_shift;\n 1931   for (i = 0 ; i < (sectors << (9-3)) ; i++, bbp++) {\n 1932           u64 bb = le64_to_cpu(*bbp);\n 1933           int count = bb & (0x3ff);\n 1934           u64 sector = bb >> 10;\n 1935           sector <<= sb->bblog_shift;\n 1936           count <<= sb->bblog_shift;\n 1937           if (bb + 1 == 0)\n 1938                   break;\n 1939           if (!badblocks_set(&rdev->badblocks, sector, count, 1))\n 1940                   return -EINVAL;\n 1941   }\n\nbb->bblog_shit is in range of 0-255, variable sector is 64bit width, for\nan invalid bb->bblog_shit, it is possible to make sector be overflowed\nby the following calculation,\n 1935           sector <<= sb->bblog_shift;\nThen in turn when call badblocks_set() at line 1939 with the invalid\nrdev->badblocks.shift set at line 1930, may result an overflow inside\n_badblocks_clear() in block/badblocks.c.\n\nAlthough there are many places to call badblocks APIs, the non-zero\nshift value is only used in super_1_load(), other places always use 0 as\nthe shift value. Therefore it is unnecessary to do a general shift value\noverflow check inside badblock API, and just check here as the caller.\n\nThis may avoid unnecessary check, make the badblocks API code more simple\nand elegant.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-09-11 20:19:39","updated_at":"2026-09-11 20:19:39"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/3b097416b4cff77285c1f472fc2c4058d8a7554f","name":"https://git.kernel.org/stable/c/3b097416b4cff77285c1f472fc2c4058d8a7554f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/35d522bd32462afcf1981dab6da8a9256c26c1e0","name":"https://git.kernel.org/stable/c/35d522bd32462afcf1981dab6da8a9256c26c1e0","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/df7d4d011d5ace20699ea948712f09f9ac08924f","name":"https://git.kernel.org/stable/c/df7d4d011d5ace20699ea948712f09f9ac08924f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/75d15738fd33a782606d0dc80cfeff47edf2ddd8","name":"https://git.kernel.org/stable/c/75d15738fd33a782606d0dc80cfeff47edf2ddd8","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-89557","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-89557","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2699b67223aca6b1450fc2f72e40fada952afc85 75d15738fd33a782606d0dc80cfeff47edf2ddd8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2699b67223aca6b1450fc2f72e40fada952afc85 3b097416b4cff77285c1f472fc2c4058d8a7554f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2699b67223aca6b1450fc2f72e40fada952afc85 df7d4d011d5ace20699ea948712f09f9ac08924f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 2699b67223aca6b1450fc2f72e40fada952afc85 35d522bd32462afcf1981dab6da8a9256c26c1e0 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 3.1","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 3.1 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.109 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.50 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2.4 7.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/md/md.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"75d15738fd33a782606d0dc80cfeff47edf2ddd8","status":"affected","version":"2699b67223aca6b1450fc2f72e40fada952afc85","versionType":"git"},{"lessThan":"3b097416b4cff77285c1f472fc2c4058d8a7554f","status":"affected","version":"2699b67223aca6b1450fc2f72e40fada952afc85","versionType":"git"},{"lessThan":"df7d4d011d5ace20699ea948712f09f9ac08924f","status":"affected","version":"2699b67223aca6b1450fc2f72e40fada952afc85","versionType":"git"},{"lessThan":"35d522bd32462afcf1981dab6da8a9256c26c1e0","status":"affected","version":"2699b67223aca6b1450fc2f72e40fada952afc85","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/md/md.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"3.1"},{"lessThan":"3.1","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.109","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.50","versionType":"semver"},{"lessThanOrEqual":"7.2.*","status":"unaffected","version":"7.2.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.3-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.109","versionStartIncluding":"3.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.50","versionStartIncluding":"3.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2.4","versionStartIncluding":"3.1","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3-rc1","versionStartIncluding":"3.1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd: do overflow check for sb->bblog_shift in super_1_load()\n\nIn super_1_load(), sb->bblog_shift is an __u8 type value loaded from on-\ndisk superblock. It is used for badblocks API badblocks_set() by the\nfollowing sequence,\n\n 1930   rdev->badblocks.shift = sb->bblog_shift;\n 1931   for (i = 0 ; i < (sectors << (9-3)) ; i++, bbp++) {\n 1932           u64 bb = le64_to_cpu(*bbp);\n 1933           int count = bb & (0x3ff);\n 1934           u64 sector = bb >> 10;\n 1935           sector <<= sb->bblog_shift;\n 1936           count <<= sb->bblog_shift;\n 1937           if (bb + 1 == 0)\n 1938                   break;\n 1939           if (!badblocks_set(&rdev->badblocks, sector, count, 1))\n 1940                   return -EINVAL;\n 1941   }\n\nbb->bblog_shit is in range of 0-255, variable sector is 64bit width, for\nan invalid bb->bblog_shit, it is possible to make sector be overflowed\nby the following calculation,\n 1935           sector <<= sb->bblog_shift;\nThen in turn when call badblocks_set() at line 1939 with the invalid\nrdev->badblocks.shift set at line 1930, may result an overflow inside\n_badblocks_clear() in block/badblocks.c.\n\nAlthough there are many places to call badblocks APIs, the non-zero\nshift value is only used in super_1_load(), other places always use 0 as\nthe shift value. Therefore it is unnecessary to do a general shift value\noverflow check inside badblock API, and just check here as the caller.\n\nThis may avoid unnecessary check, make the badblocks API code more simple\nand elegant."}],"providerMetadata":{"dateUpdated":"2026-09-11T19:44:29.857Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/75d15738fd33a782606d0dc80cfeff47edf2ddd8"},{"url":"https://git.kernel.org/stable/c/3b097416b4cff77285c1f472fc2c4058d8a7554f"},{"url":"https://git.kernel.org/stable/c/df7d4d011d5ace20699ea948712f09f9ac08924f"},{"url":"https://git.kernel.org/stable/c/35d522bd32462afcf1981dab6da8a9256c26c1e0"}],"title":"md: do overflow check for sb->bblog_shift in super_1_load()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-89557","datePublished":"2026-09-11T19:44:29.857Z","dateReserved":"2026-09-11T19:38:34.724Z","dateUpdated":"2026-09-11T19:44:29.857Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-09-11 20:19:39","lastModifiedDate":"2026-09-11 20:19:39","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"89557","Ordinal":"1","Title":"md: do overflow check for sb->bblog_shift in super_1_load()","CVE":"CVE-2026-89557","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"89557","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd: do overflow check for sb->bblog_shift in super_1_load()\n\nIn super_1_load(), sb->bblog_shift is an __u8 type value loaded from on-\ndisk superblock. It is used for badblocks API badblocks_set() by the\nfollowing sequence,\n\n 1930   rdev->badblocks.shift = sb->bblog_shift;\n 1931   for (i = 0 ; i < (sectors << (9-3)) ; i++, bbp++) {\n 1932           u64 bb = le64_to_cpu(*bbp);\n 1933           int count = bb & (0x3ff);\n 1934           u64 sector = bb >> 10;\n 1935           sector <<= sb->bblog_shift;\n 1936           count <<= sb->bblog_shift;\n 1937           if (bb + 1 == 0)\n 1938                   break;\n 1939           if (!badblocks_set(&rdev->badblocks, sector, count, 1))\n 1940                   return -EINVAL;\n 1941   }\n\nbb->bblog_shit is in range of 0-255, variable sector is 64bit width, for\nan invalid bb->bblog_shit, it is possible to make sector be overflowed\nby the following calculation,\n 1935           sector <<= sb->bblog_shift;\nThen in turn when call badblocks_set() at line 1939 with the invalid\nrdev->badblocks.shift set at line 1930, may result an overflow inside\n_badblocks_clear() in block/badblocks.c.\n\nAlthough there are many places to call badblocks APIs, the non-zero\nshift value is only used in super_1_load(), other places always use 0 as\nthe shift value. Therefore it is unnecessary to do a general shift value\noverflow check inside badblock API, and just check here as the caller.\n\nThis may avoid unnecessary check, make the badblocks API code more simple\nand elegant.","Type":"Description","Title":"md: do overflow check for sb->bblog_shift in super_1_load()"}]}}}