In the Linux kernel, the following vulnerability has been resolved:
block: fix potential invalid pointer dereference in blkaddpartition
The blkaddpartition() function initially used a single if-condition (ISERR(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 mdautodetect_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 mdautodetectdev() calls.
[
{
"id": "CVE-2024-47705-01203361",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"line_hashes": [
"103413607191383657026941278730956444230",
"242011224758453653922921019969076249523",
"172349623293854256722197984000923656288",
"30433279038512500974264809712240454779",
"300088658980571024719644522489387149398",
"40053181873023281809038624076247435757"
],
"threshold": 0.9
},
"target": {
"file": "block/partitions/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@80f5bfbb80ea1615290dbc24f49d3d8c86db58fe"
},
{
"id": "CVE-2024-47705-1ac7b9e2",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"line_hashes": [
"103413607191383657026941278730956444230",
"242011224758453653922921019969076249523",
"172349623293854256722197984000923656288",
"30433279038512500974264809712240454779",
"300088658980571024719644522489387149398",
"40053181873023281809038624076247435757"
],
"threshold": 0.9
},
"target": {
"file": "block/partitions/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cc4d21d9492db4e534d3e01253cf885c90dd2a8b"
},
{
"id": "CVE-2024-47705-2a4a4e69",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"line_hashes": [
"103413607191383657026941278730956444230",
"242011224758453653922921019969076249523",
"172349623293854256722197984000923656288",
"30433279038512500974264809712240454779",
"300088658980571024719644522489387149398",
"40053181873023281809038624076247435757"
],
"threshold": 0.9
},
"target": {
"file": "block/partitions/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@652039ba477c9a4ab43740cf2cb0d068d53508c2"
},
{
"id": "CVE-2024-47705-48ecdfe2",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"function_hash": "295157398933209897193831286937003913579",
"length": 1084.0
},
"target": {
"file": "block/partitions/core.c",
"function": "blk_add_partition"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26e197b7f9240a4ac301dd0ad520c0c697c2ea7d"
},
{
"id": "CVE-2024-47705-62c31ea4",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"line_hashes": [
"103413607191383657026941278730956444230",
"242011224758453653922921019969076249523",
"172349623293854256722197984000923656288",
"30433279038512500974264809712240454779",
"300088658980571024719644522489387149398",
"40053181873023281809038624076247435757"
],
"threshold": 0.9
},
"target": {
"file": "block/partitions/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64cf2a39202ca2d9df5ee70eb310b6141ce2b8ed"
},
{
"id": "CVE-2024-47705-6623b879",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"function_hash": "295157398933209897193831286937003913579",
"length": 1084.0
},
"target": {
"file": "block/partitions/core.c",
"function": "blk_add_partition"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@80f5bfbb80ea1615290dbc24f49d3d8c86db58fe"
},
{
"id": "CVE-2024-47705-6712691d",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"line_hashes": [
"103413607191383657026941278730956444230",
"242011224758453653922921019969076249523",
"172349623293854256722197984000923656288",
"30433279038512500974264809712240454779",
"300088658980571024719644522489387149398",
"40053181873023281809038624076247435757"
],
"threshold": 0.9
},
"target": {
"file": "block/partitions/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26e197b7f9240a4ac301dd0ad520c0c697c2ea7d"
},
{
"id": "CVE-2024-47705-81f72129",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"function_hash": "295157398933209897193831286937003913579",
"length": 1084.0
},
"target": {
"file": "block/partitions/core.c",
"function": "blk_add_partition"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cc4d21d9492db4e534d3e01253cf885c90dd2a8b"
},
{
"id": "CVE-2024-47705-875e3e0b",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"function_hash": "295157398933209897193831286937003913579",
"length": 1084.0
},
"target": {
"file": "block/partitions/core.c",
"function": "blk_add_partition"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@afe53ea9b378c376101d99d216f13b6256f75189"
},
{
"id": "CVE-2024-47705-931dd673",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"function_hash": "133661541246727863261786303271783754994",
"length": 1111.0
},
"target": {
"file": "block/partitions/core.c",
"function": "blk_add_partition"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4bc4272e2506941c3f3d4fb8b0c659ee814dcf6f"
},
{
"id": "CVE-2024-47705-b5b4855a",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"function_hash": "295157398933209897193831286937003913579",
"length": 1084.0
},
"target": {
"file": "block/partitions/core.c",
"function": "blk_add_partition"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64cf2a39202ca2d9df5ee70eb310b6141ce2b8ed"
},
{
"id": "CVE-2024-47705-c9a091ee",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"line_hashes": [
"103413607191383657026941278730956444230",
"242011224758453653922921019969076249523",
"172349623293854256722197984000923656288",
"30433279038512500974264809712240454779",
"300088658980571024719644522489387149398",
"40053181873023281809038624076247435757"
],
"threshold": 0.9
},
"target": {
"file": "block/partitions/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4bc4272e2506941c3f3d4fb8b0c659ee814dcf6f"
},
{
"id": "CVE-2024-47705-e1d2d66f",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"function_hash": "295157398933209897193831286937003913579",
"length": 1084.0
},
"target": {
"file": "block/partitions/core.c",
"function": "blk_add_partition"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@652039ba477c9a4ab43740cf2cb0d068d53508c2"
},
{
"id": "CVE-2024-47705-f4478bea",
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"line_hashes": [
"103413607191383657026941278730956444230",
"242011224758453653922921019969076249523",
"172349623293854256722197984000923656288",
"30433279038512500974264809712240454779",
"300088658980571024719644522489387149398",
"40053181873023281809038624076247435757"
],
"threshold": 0.9
},
"target": {
"file": "block/partitions/core.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@afe53ea9b378c376101d99d216f13b6256f75189"
}
]