cve-2024-50279
Vulnerability from cvelistv5
Published
2024-11-19 01:30
Modified
2024-12-19 09:37
Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
dm cache: fix out-of-bounds access to the dirty bitset when resizing
dm-cache checks the dirty bits of the cache blocks to be dropped when
shrinking the fast device, but an index bug in bitset iteration causes
out-of-bounds access.
Reproduce steps:
1. create a cache device of 1024 cache blocks (128 bytes dirty bitset)
dmsetup create cmeta --table "0 8192 linear /dev/sdc 0"
dmsetup create cdata --table "0 131072 linear /dev/sdc 8192"
dmsetup create corig --table "0 524288 linear /dev/sdc 262144"
dd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct
dmsetup create cache --table "0 524288 cache /dev/mapper/cmeta \
/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0"
2. shrink the fast device to 512 cache blocks, triggering out-of-bounds
access to the dirty bitset (offset 0x80)
dmsetup suspend cache
dmsetup reload cdata --table "0 65536 linear /dev/sdc 8192"
dmsetup resume cdata
dmsetup resume cache
KASAN reports:
BUG: KASAN: vmalloc-out-of-bounds in cache_preresume+0x269/0x7b0
Read of size 8 at addr ffffc900000f3080 by task dmsetup/131
(...snip...)
The buggy address belongs to the virtual mapping at
[ffffc900000f3000, ffffc900000f5000) created by:
cache_ctr+0x176a/0x35f0
(...snip...)
Memory state around the buggy address:
ffffc900000f2f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
ffffc900000f3000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc900000f3080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
^
ffffc900000f3100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
ffffc900000f3180: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
Fix by making the index post-incremented.
References
Impacted products
Vendor | Product | Version | |||||
---|---|---|---|---|---|---|---|
▼ | Linux | Linux |
Version: f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498 Version: f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498 Version: f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498 Version: f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498 Version: f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498 Version: f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498 Version: f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498 Version: f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498 |
||||
|
{ "containers": { "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "drivers/md/dm-cache-target.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "4fa4feb873cea0e9d6ff883b37cca6f33169d8b4", "status": "affected", "version": "f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498", "versionType": "git" }, { "lessThan": "8501e38dc9e0060814c4085815fc83da3e6d43bf", "status": "affected", "version": "f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498", "versionType": "git" }, { "lessThan": "ee1f74925717ab36f6a091104c170639501ce818", "status": "affected", "version": "f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498", "versionType": "git" }, { "lessThan": "ff1dd8a04c30e8d4e2fd5c83198ca672eb6a9e7f", "status": "affected", "version": "f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498", "versionType": "git" }, { "lessThan": "56507203e1b6127967ec2b51fb0b23a0d4af1334", "status": "affected", "version": "f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498", "versionType": "git" }, { "lessThan": "e57648ce325fa405fe6bbd0e6a618ced7c301a2d", "status": "affected", "version": "f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498", "versionType": "git" }, { "lessThan": "3b02c40ff10fdf83cc545850db208de855ebe22c", "status": "affected", "version": "f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498", "versionType": "git" }, { "lessThan": "792227719725497ce10a8039803bec13f89f8910", "status": "affected", "version": "f494a9c6b1b6dd9a9f21bbb75d9210d478eeb498", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "drivers/md/dm-cache-target.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "3.13" }, { "lessThan": "3.13", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "4.19.*", "status": "unaffected", "version": "4.19.324", "versionType": "semver" }, { "lessThanOrEqual": "5.4.*", "status": "unaffected", "version": "5.4.286", "versionType": "semver" }, { "lessThanOrEqual": "5.10.*", "status": "unaffected", "version": "5.10.230", "versionType": "semver" }, { "lessThanOrEqual": "5.15.*", "status": "unaffected", "version": "5.15.172", "versionType": "semver" }, { "lessThanOrEqual": "6.1.*", "status": "unaffected", "version": "6.1.117", "versionType": "semver" }, { "lessThanOrEqual": "6.6.*", "status": "unaffected", "version": "6.6.61", "versionType": "semver" }, { "lessThanOrEqual": "6.11.*", "status": "unaffected", "version": "6.11.8", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.12", "versionType": "original_commit_for_fix" } ] } ], "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndm cache: fix out-of-bounds access to the dirty bitset when resizing\n\ndm-cache checks the dirty bits of the cache blocks to be dropped when\nshrinking the fast device, but an index bug in bitset iteration causes\nout-of-bounds access.\n\nReproduce steps:\n\n1. create a cache device of 1024 cache blocks (128 bytes dirty bitset)\n\ndmsetup create cmeta --table \"0 8192 linear /dev/sdc 0\"\ndmsetup create cdata --table \"0 131072 linear /dev/sdc 8192\"\ndmsetup create corig --table \"0 524288 linear /dev/sdc 262144\"\ndd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct\ndmsetup create cache --table \"0 524288 cache /dev/mapper/cmeta \\\n/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0\"\n\n2. shrink the fast device to 512 cache blocks, triggering out-of-bounds\n access to the dirty bitset (offset 0x80)\n\ndmsetup suspend cache\ndmsetup reload cdata --table \"0 65536 linear /dev/sdc 8192\"\ndmsetup resume cdata\ndmsetup resume cache\n\nKASAN reports:\n\n BUG: KASAN: vmalloc-out-of-bounds in cache_preresume+0x269/0x7b0\n Read of size 8 at addr ffffc900000f3080 by task dmsetup/131\n\n (...snip...)\n The buggy address belongs to the virtual mapping at\n [ffffc900000f3000, ffffc900000f5000) created by:\n cache_ctr+0x176a/0x35f0\n\n (...snip...)\n Memory state around the buggy address:\n ffffc900000f2f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8\n ffffc900000f3000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n \u003effffc900000f3080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8\n ^\n ffffc900000f3100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8\n ffffc900000f3180: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8\n\nFix by making the index post-incremented." } ], "providerMetadata": { "dateUpdated": "2024-12-19T09:37:11.114Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/4fa4feb873cea0e9d6ff883b37cca6f33169d8b4" }, { "url": "https://git.kernel.org/stable/c/8501e38dc9e0060814c4085815fc83da3e6d43bf" }, { "url": "https://git.kernel.org/stable/c/ee1f74925717ab36f6a091104c170639501ce818" }, { "url": "https://git.kernel.org/stable/c/ff1dd8a04c30e8d4e2fd5c83198ca672eb6a9e7f" }, { "url": "https://git.kernel.org/stable/c/56507203e1b6127967ec2b51fb0b23a0d4af1334" }, { "url": "https://git.kernel.org/stable/c/e57648ce325fa405fe6bbd0e6a618ced7c301a2d" }, { "url": "https://git.kernel.org/stable/c/3b02c40ff10fdf83cc545850db208de855ebe22c" }, { "url": "https://git.kernel.org/stable/c/792227719725497ce10a8039803bec13f89f8910" } ], "title": "dm cache: fix out-of-bounds access to the dirty bitset when resizing", "x_generator": { "engine": "bippy-5f407fcff5a0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2024-50279", "datePublished": "2024-11-19T01:30:20.712Z", "dateReserved": "2024-10-21T19:36:19.983Z", "dateUpdated": "2024-12-19T09:37:11.114Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2024-50279\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-11-19T02:16:30.210\",\"lastModified\":\"2024-11-27T16:01:09.817\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndm cache: fix out-of-bounds access to the dirty bitset when resizing\\n\\ndm-cache checks the dirty bits of the cache blocks to be dropped when\\nshrinking the fast device, but an index bug in bitset iteration causes\\nout-of-bounds access.\\n\\nReproduce steps:\\n\\n1. create a cache device of 1024 cache blocks (128 bytes dirty bitset)\\n\\ndmsetup create cmeta --table \\\"0 8192 linear /dev/sdc 0\\\"\\ndmsetup create cdata --table \\\"0 131072 linear /dev/sdc 8192\\\"\\ndmsetup create corig --table \\\"0 524288 linear /dev/sdc 262144\\\"\\ndd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct\\ndmsetup create cache --table \\\"0 524288 cache /dev/mapper/cmeta \\\\\\n/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0\\\"\\n\\n2. shrink the fast device to 512 cache blocks, triggering out-of-bounds\\n access to the dirty bitset (offset 0x80)\\n\\ndmsetup suspend cache\\ndmsetup reload cdata --table \\\"0 65536 linear /dev/sdc 8192\\\"\\ndmsetup resume cdata\\ndmsetup resume cache\\n\\nKASAN reports:\\n\\n BUG: KASAN: vmalloc-out-of-bounds in cache_preresume+0x269/0x7b0\\n Read of size 8 at addr ffffc900000f3080 by task dmsetup/131\\n\\n (...snip...)\\n The buggy address belongs to the virtual mapping at\\n [ffffc900000f3000, ffffc900000f5000) created by:\\n cache_ctr+0x176a/0x35f0\\n\\n (...snip...)\\n Memory state around the buggy address:\\n ffffc900000f2f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8\\n ffffc900000f3000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\\n \u003effffc900000f3080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8\\n ^\\n ffffc900000f3100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8\\n ffffc900000f3180: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8\\n\\nFix by making the index post-incremented.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: dm cache: corrige el acceso fuera de los l\u00edmites al conjunto de bits sucio al cambiar el tama\u00f1o dm-cache verifica los bits sucios de los bloques de cach\u00e9 que se deben descartar al reducir el dispositivo r\u00e1pido, pero un error de \u00edndice en la iteraci\u00f3n del conjunto de bits provoca un acceso fuera de los l\u00edmites. Reproducir los pasos: 1. crear un dispositivo de cach\u00e9 de 1024 bloques de cach\u00e9 (128 bytes de bitset sucio) dmsetup create cmeta --table \\\"0 8192 linear /dev/sdc 0\\\" dmsetup create cdata --table \\\"0 131072 linear /dev/sdc 8192\\\" dmsetup create corig --table \\\"0 524288 linear /dev/sdc 262144\\\" dd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct dmsetup create cache --table \\\"0 524288 cache /dev/mapper/cmeta \\\\ /dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0\\\" 2. reducir el dispositivo r\u00e1pido a 512 bloques de cach\u00e9, lo que activa el acceso fuera de los l\u00edmites al bitset sucio. bitset (offset 0x80) dmsetup suspend cache dmsetup reload cdata --table \\\"0 65536 linear /dev/sdc 8192\\\" dmsetup resume cdata dmsetup resume cache KASAN informa: ERROR: KASAN: vmalloc-out-of-bounds en cache_preresume+0x269/0x7b0 Lectura de tama\u00f1o 8 en la direcci\u00f3n ffffc900000f3080 por la tarea dmsetup/131 (...snip...) La direcci\u00f3n con errores pertenece al mapeo virtual en [ffffc900000f3000, ffffc900000f5000) creado por: cache_ctr+0x176a/0x35f0 (...snip...) Estado de la memoria alrededor de la direcci\u00f3n con errores: ffffc900000f2f80: f8 f8 f8 f8 f8 f8 ...\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H\",\"baseScore\":7.1,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.2}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-125\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"3.13\",\"versionEndExcluding\":\"4.19.324\",\"matchCriteriaId\":\"6F34367D-A869-4C97-A01F-F5209F24FC10\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"4.20\",\"versionEndExcluding\":\"5.4.286\",\"matchCriteriaId\":\"9952C897-8A61-4D4B-9D6D-7D063E9EA15E\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.5\",\"versionEndExcluding\":\"5.10.230\",\"matchCriteriaId\":\"BF5B32D0-72C9-41C3-A0BB-D4946153C134\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.11\",\"versionEndExcluding\":\"5.15.172\",\"matchCriteriaId\":\"88812664-4296-42AC-AE0F-ED71086C1BB1\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"6.1.117\",\"matchCriteriaId\":\"0DD7F755-2F6B-4707-8973-78496AD5AA8E\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.2\",\"versionEndExcluding\":\"6.6.61\",\"matchCriteriaId\":\"630ED7EB-C97E-4435-B884-1E309E40D6F3\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.7\",\"versionEndExcluding\":\"6.11.8\",\"matchCriteriaId\":\"0BD000F7-3DAD-4DD3-8906-98EA1EC67E95\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"7F361E1D-580F-4A2D-A509-7615F73167A1\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"925478D0-3E3D-4E6F-ACD5-09F28D5DF82C\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"3C95E234-D335-4B6C-96BF-E2CEBD8654ED\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc4:*:*:*:*:*:*\",\"matchCriteriaId\":\"E0F717D8-3014-4F84-8086-0124B2111379\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc5:*:*:*:*:*:*\",\"matchCriteriaId\":\"24DBE6C7-2AAE-4818-AED2-E131F153D2FA\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc6:*:*:*:*:*:*\",\"matchCriteriaId\":\"24B88717-53F5-42AA-9B72-14C707639E3F\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/3b02c40ff10fdf83cc545850db208de855ebe22c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/4fa4feb873cea0e9d6ff883b37cca6f33169d8b4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/56507203e1b6127967ec2b51fb0b23a0d4af1334\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/792227719725497ce10a8039803bec13f89f8910\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/8501e38dc9e0060814c4085815fc83da3e6d43bf\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/e57648ce325fa405fe6bbd0e6a618ced7c301a2d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/ee1f74925717ab36f6a091104c170639501ce818\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/ff1dd8a04c30e8d4e2fd5c83198ca672eb6a9e7f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}" } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.