block: fix potential invalid pointer dereference in blk_add_partition
In the Linux kernel, the following vulnerability has been resolved: block: fix potential invalid pointer dereference in blk_add_partition The blk_add_partition() function initially used a single if-condition (IS_ERR(part)) to check for errors when adding a partition. This was modified to handle the specific case of -ENXIO separately, allowing the function to proceed without logging the error in this case. However, this change unintentionally left a path where md_autodetect_dev() could be called without confirming that part is a valid pointer. This commit separates the error handling logic by splitting the initial if-condition, improving code readability and handling specific error scenarios explicitly. The function now distinguishes the general error case from -ENXIO without altering the existing behavior of md_autodetect_dev() calls.
CVE-2024-47705
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2024-47705
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "b72053072c0bbe9f1cdfe2ffa3c201c185da2201",
"lessThan": "4bc4272e2506941c3f3d4fb8b0c659ee814dcf6f",
"versionType": "git"
},
{
"status": "affected",
"version": "b72053072c0bbe9f1cdfe2ffa3c201c185da2201",
"lessThan": "cc4d21d9492db4e534d3e01253cf885c90dd2a8b",
"versionType": "git"
},
{
"status": "affected",
"version": "b72053072c0bbe9f1cdfe2ffa3c201c185da2201",
"lessThan": "64cf2a39202ca2d9df5ee70eb310b6141ce2b8ed",
"versionType": "git"
},
{
"status": "affected",
"version": "b72053072c0bbe9f1cdfe2ffa3c201c185da2201",
"lessThan": "80f5bfbb80ea1615290dbc24f49d3d8c86db58fe",
"versionType": "git"
},
{
"status": "affected",
"version": "b72053072c0bbe9f1cdfe2ffa3c201c185da2201",
"lessThan": "652039ba477c9a4ab43740cf2cb0d068d53508c2",
"versionType": "git"
},
{
"status": "affected",
"version": "b72053072c0bbe9f1cdfe2ffa3c201c185da2201",
"lessThan": "afe53ea9b378c376101d99d216f13b6256f75189",
"versionType": "git"
},
{
"status": "affected",
"version": "b72053072c0bbe9f1cdfe2ffa3c201c185da2201",
"lessThan": "26e197b7f9240a4ac301dd0ad520c0c697c2ea7d",
"versionType": "git"
}
],
"programFiles": [
"block/partitions/core.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "5.5"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "5.5",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "5.10.227",
"versionType": "semver",
"lessThanOrEqual": "5.10.*"
},
{
"status": "unaffected",
"version": "5.15.168",
"versionType": "semver",
"lessThanOrEqual": "5.15.*"
},
{
"status": "unaffected",
"version": "6.1.113",
"versionType": "semver",
"lessThanOrEqual": "6.1.*"
},
{
"status": "unaffected",
"version": "6.6.54",
"versionType": "semver",
"lessThanOrEqual": "6.6.*"
},
{
"status": "unaffected",
"version": "6.10.13",
"versionType": "semver",
"lessThanOrEqual": "6.10.*"
},
{
"status": "unaffected",
"version": "6.11.2",
"versionType": "semver",
"lessThanOrEqual": "6.11.*"
},
{
"status": "unaffected",
"version": "6.12",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"block/partitions/core.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2024-47705
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #26730 · Revision 1
- Added to Heist Feed
- Publisher date