⚠️

سلب مسئولیت و اخلاق حرفه‌ای

این مطالب صرفاً برای اهداف آموزشی، پژوهشی و افزایش آگاهی امنیتی ارائه شده‌اند. هرگونه استفاده غیرمجاز، غیرقانونی یا سوءاستفاده از اطلاعات، ابزارها و روش‌های مطرح‌شده، کاملاً بر عهده مخاطب است. نویسنده و منتشرکننده هیچ مسئولیتی در قبال خسارات، آسیب‌ها یا پیامدهای ناشی از استفاده نادرست از این مطالب نخواهند داشت.

CVE-2026-139336: Linux Kernel usbnet Driver Fixes Preemptible this_cpu_ptr() Use in tx_complete() | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-139336: Linux Kernel usbnet Driver Fixes Preemptible this_cpu_ptr() Use in tx_complete()

Overview

CVE-2026-139336 documents a defect in the Linux kernel's usbnet driver, specifically inside the transmit completion path. The upstream commit description frames it as a preemption-domain mistake rather than a memory-safety or access-control flaw, and the published remedy is a localized hardening change.

Technical Details

The root cause sits in tx_complete(), which indexes a per-CPU object via this_cpu_ptr(). That helper internally consults smp_processor_id(), whose correctness depends on the caller having preemption disabled. On kernels built with CONFIG_DEBUG_PREEMPT, running the function while the scheduler is free to preempt produces the diagnostic:

BUG: using smp_processor_id() in preemptible code in tx_complete

The patch swaps the unsafe pattern for get_cpu_ptr() and put_cpu_ptr(), which disable and re-enable preemption around the per-CPU access. A second hunk applies the same pattern in usbnet_skb_return(). According to the advisory, that second path is reached in softirq context and would not raise a warning on default kernels, so the change there is described as hardening for consistency rather than a bug fix.

Affected Systems

  • Linux kernel builds shipping the affected usbnet code where tx_complete() performs the unguarded this_cpu_ptr() call.

  • Distributions and vendor kernels that pull in usbnet, including Android common kernels, Debian, Ubuntu, RHEL, and SUSE, to the extent they carry the unpatched revision.

  • Hosts that use usbnet-backed network interfaces such as CDC-Ethernet, RNDIS, or vendor-specific USB-to-Ethernet dongles, since those drivers route completion handling through the same code path.

  • Debug and PREEMPT_RT configurations are most likely to surface the warning because CONFIG_DEBUG_PREEMPT is typically enabled there.

  • The specific stable branches or point releases where the bug was introduced are not enumerated in the available context, so the exact version window is unknown beyond what upstream commit history provides.

Real-World Impact

The advisory does not describe a memory-safety primitive, and the linked records do not list the issue on the CISA Known Exploited Vulnerabilities catalog. No exploitation evidence has been published, and no published CVSS vector or score is attached to the record. The most plausible real-world outcomes are:

  • A kernel warning printed to dmesg on debug-enabled builds, which can disrupt user workloads or crash misconfigured automation that treats kernel warnings as fatal.

  • On production kernels without CONFIG_DEBUG_PREEMPT, a latent TOCTOU window between smp_processor_id() and the per-CPU access could permit the driver to read or write state belonging to a different CPU after a task migration, surfacing as dropped packets, queue corruption, or interface flaps on usbnet-attached devices under heavy transmit-completion pressure.

Mitigation

  • Apply the upstream Linux kernel commit referenced in CVE-2026-139336, which switches the unguarded this_cpu_ptr() call to a get_cpu_ptr()/put_cpu_ptr() pair in both tx_complete() and usbnet_skb_return().

  • Track the corresponding stable release once the fix is backported, and install the matching vendor security update on distribution kernels when it is published; the advisory does not enumerate per-distribution package identifiers.

  • As a temporary measure on systems where a kernel rebuild is not feasible, disabling CONFIG_DEBUG_PREEMPT silences the diagnostic, though this leaves the underlying race in place and is not a real fix.

  • Where supported, pin USB networking handling to a single CPU or unload unused usbnet modules to reduce the rate of tx_complete() invocations while waiting for the patched kernel.

Detection

  • Grep dmesg, pstore dumps, and centralized syslog pipelines for the string using smp_processor_id() in preemptible code associated with tx_complete.

  • Monitor usbnet-attached interfaces for unusual link flaps, dropped packets, or soft lockups, particularly on PREEMPT or PREEMPT_RT hosts running with kernel debug options enabled.

  • Cross-reference crash-collection telemetry against the upstream commit identifier to confirm whether hosts have the fixed or unfixed revision installed.

Caveats

The available context does not enumerate the affected stable branches, distribution packages, or specific kernel point releases where the flaw was introduced. It also lacks a CVSS vector, public exploit references, and a CISA KEV entry. Anything beyond the information restated above should be treated as unknown until verified against the NVD entry and the upstream kernel git log.

منابع

·
← اخبار