Skip to contentSkip to conversation

CVE-2026-52937: tap: fix stack info leak in tap_ioctl() SIOCGIFHWADDR

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jun 24

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

tap: fix stack info leak in tap_ioctl() SIOCGIFHWADDR

In the SIOCGIFHWADDR path, tap_ioctl() copies 16 bytes of an uninitialised on-stack struct sockaddr_storage to userspace via ifr_hwaddr, but netif_get_mac_address() only writes sa_family and dev->addr_len (6 for Ethernet) bytes, leaving sa_data[6..13] uninitialised.

Those 8 trailing bytes leak kernel stack contents; SIOCGIFHWADDR on a macvtap chardev returns kernel .text and direct-map pointers, defeating KASLR.

Initialise ss at declaration.

The Linux kernel CVE team has assigned CVE-2026-52937 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.12 with commit 3b23a32a63219f51a5298bc55a65ecee866e79d0 and fixed in 6.18.34 with commit 719007c3492f0f1f9e9cdbed8ac45ba45bb13eeb
	Issue introduced in 5.12 with commit 3b23a32a63219f51a5298bc55a65ecee866e79d0 and fixed in 7.0.11 with commit 05305e832be7b9d65b2b72caacf7d850b3942b2a
	Issue introduced in 5.12 with commit 3b23a32a63219f51a5298bc55a65ecee866e79d0 and fixed in 7.1 with commit bddc09212c24934643bd44fc794748d2bbb3b6cd
	Issue introduced in 5.4.103 with commit 176188cff67ec1aa55103647b61d02315cc38e98
	Issue introduced in 5.10.21 with commit 1fc205d9e400f069ebf30d3faa6ec2bab2cbd7b4
	Issue introduced in 5.11.4 with commit 4d0ae760c02c98fc78b78d3a0509896bc648ad1c

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-52937

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/net/tap.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/719007c3492f0f1f9e9cdbed8ac45ba45bb13eeb
	https://git.kernel.org/stable/c/05305e832be7b9d65b2b72caacf7d850b3942b2a
	https://git.kernel.org/stable/c/bddc09212c24934643bd44fc794748d2bbb3b6cd