CVE Professor
/
All CVEs
CVE-2026-139529

CVE-2026-139529 — Linux Kernel — NONE Vulnerability

NONE CVSS 0 ⚡ EPSS 0.2% NVD

In the Linux kernel, the following vulnerability has been resolved: wifi: b43legacy: debugfs: NUL terminate string in debugfs The "buf" buffer is PAGE_SIZE and allocated with kzalloc(). We store a string from the user in it and then pass it to sscanf() in the write functions such as tsf_write_file(). The buffer is only used to store a number so we never come close to filling up the whole PAGE_SIZE. Reserve the last character of the page for a NUL terminator. This is debugfs so it's root only.

In the Linux kernel, the following vulnerability has been resolved: wifi: b43legacy: debugfs: NUL terminate string in debugfs The "buf" buffer is PAGE_SIZE and allocated with kzalloc(). We store a string from the user in it and then pass it to sscanf() in the write functions such as tsf_write_file(). The buffer is only used to store a number so we never come close to filling up the whole PAGE_SIZE. Reserve the last character of the page for a NUL terminator. This is debugfs so it's root only.

EPSS — Exploit Prediction Scoring System
0.2%
30-day probability
In the 12. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Missing NUL Termination (CWE-170) in the Linux kernel's b43legacy wireless driver, specifically within its debugfs interface.

Technical Flaw Analysis:
1. Context: The b43legacy driver provides support for older Broadcom 43xx wireless chips. It exposes a debug interface via the debugfs filesystem (typically mounted at /sys/kernel/debug/b43/).
2. The Bug: In functions like tsf_write_file(), the kernel allocates a buffer buf of size PAGE_SIZE (typically 4096 bytes) using kzalloc(). kzalloc zero-initializes the memory, so initially, the buffer is NUL-terminated.
3. The Trigger: The code accepts input from a user (root only) and stores it into buf. It then passes buf to sscanf().
4. The Failure Mode: While sscanf is generally safe if the input is well-formed, the vulnerability description highlights that the buffer is used to store a number. If an attacker provides a string that fills the buffer up to the exact limit or manipulates the parsing logic such that the final character is not explicitly NUL-terminated before subsequent string operations (or if sscanf leaves the buffer in a state where a trailing NUL is assumed but not guaranteed in edge cases of buffer overflow or specific parsing paths), subsequent string handling functions (like strlen, strcpy, or printk with %s) may read past the intended end of the string.
5. Specific Risk: Although kzalloc initializes to zero, if the input writing logic does not explicitly ensure the last byte is NUL after processing (e.g., if it writes PAGE_SIZE - 1 characters and assumes the last byte is NUL, but a logic error allows writing to the last byte or overwrites the NUL), it can lead to Information Disclosure (reading kernel stack/heap memory) or Denial of Service (kernel panic due to reading invalid memory addresses).
6. Severity Context: The CVSS score is 0.0 (NONE) because:
* Authentication: Requires root access (debugfs is restricted to root by default).
* Impact: Limited to local information disclosure or DoS.
* Exploitability: Highly complex and low practical impact for a local root user who already has full control of the system.

Note: This is a local vulnerability. It does not allow remote code execution (RCE) or unauthenticated access.

⚡ Attack Chain

Since this is a local, root-only vulnerability, the "attack chain" is primarily relevant for privilege escalation from a compromised root shell or lateral movement in multi-user environments where an attacker has already gained root.

1. Discovery & Reconnaissance

  • Identify Hardware: Check if the system uses a Broadcom 43xx wireless chip supported by b43legacy.
  • lspci | grep -i broadcom
        lsmod | grep b43legacy
  • Check Kernel Version: Verify the kernel is older than the patch (commit 0d2ecaf812728aca3089d7336784b78c7b4671b3).
  • uname -r
  • Check debugfs Mount: Ensure debugfs is mounted and accessible.
  • mount | grep debugfs
        ls /sys/kernel/debug/b43/

    2. Exploitation (Illustrative PoC)

  • Prerequisite: Attacker has root access.
  • Target File: /sys/kernel/debug/b43/tsf (or similar debugfs file handled by tsf_write_file).
  • Mechanism: Craft a string that is exactly PAGE_SIZE - 1 characters long (4095 bytes) without a trailing NUL, or manipulate the input to trigger a buffer over-read.
  • PoC (Bash):
  • # Generate a 4095-byte string of 'A's (no newline, no NUL)
        # Note: In practice, the exact trigger depends on the specific sscanf format string
        # and how the buffer is used post-parse. This is illustrative.
        python3 -c "print('A' * 4095, end='')" > /tmp/payload.txt
    
        # Write to the debugfs file
        # This may trigger a kernel warning or info leak in dmesg
        cat /tmp/payload.txt > /sys/kernel/debug/b43/tsf
    
        # Check kernel logs for potential info leak or panic
        dmesg | tail -n 20
  • Expected Outcome:
  • * Best Case for Attacker: Kernel log (dmesg) reveals sensitive kernel memory contents (e.g., pointers, stack data) due to an over-read. * Worst Case for System: Kernel panic (DoS) if the over-read accesses an unmapped page.

    3. Post-Exploitation

  • Information Disclosure: If kernel pointers are leaked, an attacker with root can use this to bypass KASLR (Kernel Address Space Layout Randomization), facilitating further kernel exploits (e.g., privilege escalation from a non-root context if they had a separate bug, or hardening removal).
  • Denial of Service: If the system panics, the attacker can cause a reboot, disrupting services.
  • Note: Since the attacker already has root, the primary value is KASLR bypass for chaining with other vulnerabilities or DoS.
  • 🌍 Real World Impact

  • Confidentiality: Low. Potential leak of kernel memory (pointers, stack data) to a local root user.
  • Integrity: None. No direct modification of system state beyond what root can already do.
  • Availability: Low. Potential for kernel panic (DoS) if the over-read hits an invalid memory address.
  • Practical Consequences:
  • * Negligible for most users: Requires root access. * Relevant for high-security environments: If an attacker has compromised a root shell on a system with b43legacy and debugfs enabled, they can leak kernel pointers to bypass KASLR, making it easier to exploit other, more severe kernel vulnerabilities. * DoS Risk: A malicious root user can crash the system.

    🛡️ Remediation & Mitigation

    1. Patching

  • Upgrade Kernel: Update to a Linux kernel version that includes the fix commit 0d2ecaf812728aca3089d7336784b78c7b4671b3.
  • * The fix ensures the last byte of the PAGE_SIZE buffer is explicitly set to \0 after input processing. * Check your distribution's security advisories for the specific kernel version that includes this patch.

    2. Workarounds

  • Disable debugfs (Recommended): If you do not need kernel debugging, unmount or prevent mounting of debugfs.
  • # Unmount debugfs
        umount /sys/kernel/debug
    
        # Prevent automatic mounting (edit /etc/fstab or systemd units)
        # Comment out or remove the line mounting debugfs
  • Restrict Access (If debugfs is needed):
  • * Ensure debugfs is mounted with mode=0700 and owned by root:root. * Use apparmor or SELinux to restrict access to /sys/kernel/debug/b43/ to specific processes only.
  • Disable b43legacy Driver: If you do not use a Broadcom 43xx wireless chip, blacklist the driver.
  • echo "blacklist b43legacy" > /etc/modprobe.d/blacklist-b43legacy.conf

    3. Detection

  • Log Monitoring: Monitor dmesg or /var/log/kern.log for kernel warnings related to b43legacy or debugfs.
  • * Example pattern: b43legacy: debugfs: buffer overflow or kernel: BUG: unable to handle page fault. File Access Monitoring: Use auditd to monitor writes to /sys/kernel/debug/b43/.
    auditctl -w /sys/kernel/debug/b43/ -p w -k b43_debugfs_write
  • IoCs:
  • * Unusual large writes to debugfs files. * Kernel panics or reboots coinciding with wireless driver activity.

    ⚠️ Urgency

  • CVSS Score: 0.0 (NONE)
  • CISA KEV: No
  • Exploit Complexity: High (requires root, specific hardware, and precise input crafting)
  • Patching Priority: Low
* Reason: This is a local, root-only vulnerability with minimal impact. It does not pose a remote threat. * Recommendation: Patch during the next regular kernel update cycle. No emergency patching is required. * Exception: If your environment has strict KASLR requirements and you are concerned about advanced persistent threats (APTs) with root access, prioritize the patch to close the KASLR bypass vector.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Linux Linux"
CVSS Score
0 / 10 · CVSS NONE
Affected Products (2)
Linux Kernel (commit: 0d2ecaf812) Linux Kernel (2.6.24)
Related CVEs
9.4
CVE-2026-129109
Calico installations managed by the Tigera Operator install a FlexVolume driver (nodeagent~uds/uds) on every L
8.8
CVE-2026-105101
An OS command injection vulnerability in the ping diagnostic function (InternetState.java) in Elinktek UZ801 4
8.8
CVE-2026-118966
A missing authentication vulnerability in the SSH server of Nokia SR Linux allows an unauthenticated attacker
8.7
CVE-2026-145182
Mullvad gotatun 0.1.0 before 0.10.1 contains a denial of service vulnerability that allows unauthenticated rem
0.0
CVE-2026-132063
The 2C2P Redirect API for WooCommerce WordPress plugin through 7.0.3 does not stop processing a payment callba
0.0
CVE-2026-140849
Multiple malformed-packet handling vulnerabilities exist in a number of Nokia SR OS control-plane protocols (B
0.0
CVE-2026-141072
Rejected reason: Not a valid vulnerability.