Bug 2536075 (CVE-2026-93006) - CVE-2026-93006 dnsmasq: dnsmasq: TFTP prefetch cache keyed on stale heap pointer serves wrong file content
Summary: CVE-2026-93006 dnsmasq: dnsmasq: TFTP prefetch cache keyed on stale heap poin...
Keywords:
Status: NEW
Alias: CVE-2026-93006
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-09-17 14:45 UTC by OSIDB Bzimport
Modified: 2026-10-28 09:37 UTC (History)
35 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-09-17 14:45:33 UTC
A use-after-free cache-key confusion was found in dnsmasq's TFTP prefetch path in get_block() (src/tftp.c). The prefetch cache uses daemon->srv_save (a void* pointer to the tftp_transfer struct) and a static saved_offset as cache keys. When a transfer completes, free_transfer() frees the transfer struct without clearing daemon->srv_save, leaving a dangling pointer as a valid cache key.

If a later TFTP transfer is allocated at the same heap address (common after free+malloc of the same size) and the new transfer's offset matches saved_offset, get_block() returns previously cached file content from daemon->packet without reading the new client's file from disk. In a PXE environment this can substitute attacker-controlled file content for a victim's boot file.

The cache check compares only pointer identity and offset. It does not verify filename, inode, file descriptor, or client identity. daemon->srv_save is shared with DNS forwarding, so DNS activity overwrites the TFTP cache key and accidentally mitigates the bug in mixed DNS/TFTP deployments.

Compile-time gate: HAVE_TFTP is defined by default (src/config.h). Runtime gate: --enable-tftp. Exploitation is deterministic when DNS is inactive and clients do not negotiate TFTP options (the OACK path clears srv_save).

Affected versions: v2.92 through HEAD. Introducing commit: ee09f06 (Optimise tftp). Unaffected: v2.91 and earlier (no saved_offset prefetch cache).
Fix: Not yet available (reporter coordinating with upstream).
Reporter: Shubham Raj (Causal Security)
PSIRT Ticket: PSIRTSUPT-23743


Note You need to log in before you can comment on or make changes to this bug.