{"uuid": "337b5c63-d541-401e-bfe8-11336b321b60", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "2a075640-a300-48a4-bb44-bc6130783b9b", "vulnerability": "CVE-2024-50279", "type": "published-proof-of-concept", "source": "https://t.me/cvedetector/11430", "content": "{\n  \"Source\": \"CVE FEED\",\n  \"Title\": \"CVE-2024-50279 - Linux dm-cache Out-of-Bounds Access Vulnerability\", \n  \"Content\": \"CVE ID : CVE-2024-50279 \nPublished : Nov. 19, 2024, 2:16 a.m. | 41\u00a0minutes ago \nDescription : 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  &gt;ffffc900000f3080: 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. \nSeverity: 0.0 | NA \nVisit the link for more details, such as CVSS details, affected products, timeline, and more...\",\n  \"Detection Date\": \"19 Nov 2024\",\n  \"Type\": \"Vulnerability\"\n}\n\ud83d\udd39 t.me/cvedetector \ud83d\udd39", "creation_timestamp": "2024-11-19T04:16:11.000000Z"}