⚠️

Disclaimer & Liability

The content provided on this website is for educational, research, and security awareness purposes only. Any unauthorized, illegal, or abusive use of the information, tools, and techniques discussed is solely the responsibility of the user. The author and publisher assume no liability for any damages, injuries, or consequences resulting from the misuse of this content.

CVE-2026-142848: Linux Kernel Floppy Driver Keeps Dangling Pointer to Stack Buffer in Timeout Message | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-142848: Linux Kernel Floppy Driver Keeps Dangling Pointer to Stack Buffer in Timeout Message

What the vulnerability is

CVE-2026-142848 is a stale-stack-pointer read in the Linux kernel's legacy floppy driver, tracked in the upstream advisory as a resolved issue in drivers/block/floppy.c. The defect is a textbook lifetime mismatch: a pointer to a function-local buffer outlives the function.

The affected code path looks roughly like this:

  • request_done() formats the text request done %d into a buffer allocated on its own stack.

  • That buffer is passed to reschedule_timeout(), which retains the pointer in a variable named timeout_message instead of copying the formatted string.

  • When request_done() returns, the stack frame backing the buffer is released and can be reused by other code.

  • show_floppy() prints timeout_message well after request_done() has returned — the advisory gives the example of result() in the interrupt handler — and therefore reads a dead stack frame.

The upstream report captures the failure under the kernel's memory-error detector as BUG: KASAN: stack-out-of-bounds in string+0x39c/0x3d0 lib/vsprintf.c:720, a read of size 1, with a call trace running through show_floppy, result.cold, floppy_interrupt, and floppy_hardint.

Why the fix is simple

The driver only needs to convey a boolean outcome. Because uptodate is either 0 or 1, the resolution is to pass one of two static string literals rather than dynamically formatting a message into a temporary buffer. The change removes the dangling pointer entirely instead of trying to extend the lifetime of the stack object.

Affected systems

The supplied advisory record does not identify a release branch, version range, or fixed kernel version, and it does not name the upstream commit hash. It states only that the vulnerability "has been resolved." That leaves two practical filters for exposure:

  • Kernel build: the system must be built with floppy driver support (drivers/block/floppy.c present and reachable). Modern kernels frequently ship the floppy driver as a loadable module or omit it from the default configuration.

  • Driver usage: the vulnerable state is reached through the floppy driver's timeout and diagnostic handling, so an environment that never attaches or accesses legacy floppy devices is unlikely to exercise the path.

Because no configuration macro, affected version list, or fixing release is documented in the available context, safety cannot be inferred from a kernel version number alone. Deployments should instead match the request_done(), reschedule_timeout(), and timeout_message handling in their own drivers/block/floppy.c against the upstream change.

Impact assessment

The read occurs in kernel context. The plausible outcomes are:

  • a kernel diagnostic failure or crash under KASAN and comparable memory-error detection, since the print path operates on a released stack frame;

  • an out-of-bounds read of stale stack contents surfaced through the floppy diagnostic output, which carries a limited information-disclosure dimension.

The available intelligence records no public proof of concept, no exploit, and no operational exploitation campaign, and the linked CVE does not appear on the CISA KEV catalog. The preconditions for reaching the vulnerable state — the specific timeout and interrupt behavior needed to make show_floppy() consume the stale pointer — are also not fully documented, which caps confidence in practical exploitability on a typical modern host. Nothing in the record establishes a reliable privilege-escalation or arbitrary-code-execution primitive; the primitive is a read, not a write.

Mitigation

  • Patch. Apply the upstream Linux change that replaces the stack-backed timeout message with one of two static string literals. Since the context names no fixing commit or release, select the patch by matching the request_done() / reschedule_timeout() / timeout_message logic in drivers/block/floppy.c to the upstream fix rather than assuming a version boundary.

  • Workaround. Where floppy support is not required, disable or omit the driver in the build, or for module-based kernels prevent the floppy module from loading and keep legacy floppy device access unavailable. Treat this as defense in depth; the available context does not confirm that any single configuration eliminates every trigger path.

  • Detection. Watch kernel logs for KASAN reports mentioning stack-out-of-bounds alongside string+0x39c/0x3d0, lib/vsprintf.c:720, and traces referencing show_floppy, result.cold, floppy_interrupt, or floppy_hardint. The advisory also shows a BUG: KASAN signature and an invalid read attributed to task swapper/3/0; exact addresses and task names vary between systems.

  • Operational hardening. On hosts that do not need legacy floppy access, block use of the relevant devices and minimize unnecessary driver loading. Re-check the kernel configuration and module-loading policy after updating, since the record defines neither affected configuration macros nor fixed versions.

Expert insight

This is a familiar shape of kernel bug: a formatting helper produces a short-lived stack object, a caller treats the pointer as durable state, and the consumer dereferences it from a different execution context — here, the interrupt-handler path via result(). The asynchronous nature is what makes it more than a style issue. On a stack frame that has already been handed back to the scheduler, the contents may belong to an unrelated task or to idle/softirq work, so the diagnostic output can print data that never belonged to the floppy driver. That is why the fix chose static literals over a copy: with only two possible values, the message never needed to be dynamic in the first place.

The broader lesson for maintainers is that any pointer retained across a function boundary or across a deferred context must reference storage with a lifetime that outlives its use. Passing a stack buffer into a rescheduling or timer framework is precisely the pattern memory-error detectors like KASAN exist to catch, and this one was caught by the detector rather than by a security incident.

For defenders, the interesting question is not the severity score but the reachability. The floppy driver is a legacy subsystem with a shrinking footprint, and the affected path additionally requires timeouts and interrupt-driven diagnostics. Most contemporary servers, cloud images, and container hosts either lack the driver entirely or never attach the device, which makes this a low-impact finding in practice — but it remains a real kernel memory-safety defect worth closing out on any system that still builds with floppy support.

References

·
← News