Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/santoshkalluri/cve-2026-53157
Vulnerability AnalysisExploitationFuzzingPapers & ResearchLearning & Education
GitHubsantoshkalluri/cve-2026-53157

CVE-2026-53157

Write-up, KASAN evidence, and C reproducer for CVE-2026-53157, a use-after-free in the Linux Phonet phonet_device_destroy() path, with QEMU test harness.

View Repository
117 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    936
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    353
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    348
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    288

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-53157: use-after-free in Linux Phonet

A use-after-free in the Linux kernel's Phonet code (net/phonet). When a network device was removed, the kernel could free a Phonet record while another task was still reading it.

The bug dates back to v2.6.33 (2009). It was fixed in Linux 7.1 and backported to the stable kernels. This repository has a write-up, a reproducer, and the test logs.

CVECVE-2026-53157
Wherenet/phonet/pn_dev.c, function phonet_device_destroy()
Bug typeUse-after-free (memory freed without waiting for RCU readers to finish)
Added inv2.6.33, commit eeb74a9d45f7 ("Phonet: convert devices list to RCU", 2009)
Fixed inv7.1, commit 71de0177b28d
Who can trigger itRoot (needs CAP_NET_ADMIN and CAP_SYS_ADMIN in the initial user namespace)
CVSS 3.1NVD lists 7.8 (High), assuming a low-privileged attacker. Adding a Phonet address requires root, so with PR:H the score is 6.7 (Medium): CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Found and fixed bySantosh Kalluri

In short

  • When a network device is removed, the kernel deletes its Phonet record and frees the memory straight away.
  • At the same moment, another task can be listing Phonet addresses and still be holding that record.
  • That task then reads memory that has already been freed. KASAN catches it, and the kernel can crash.
  • The fix is one line: free the memory only after every reader has finished.

What went wrong

The kernel keeps one struct phonet_device for each network device that has Phonet addresses. These records sit on a list. Readers walk the list under RCU, a kernel mechanism that lets readers work without taking a lock. The rule with RCU is simple: after you take an item off the list, you must wait until all current readers are done before you free it.

phonet_device_destroy() broke that rule. It took the item off the list and freed it immediately:

	spin_lock(&pndevs->lock);

	pnd = __phonet_get(dev);
	if (pnd)
		list_del_rcu(&pnd->list);

	spin_unlock(&pndevs->lock);

	if (pnd) {
		...
		kfree(pnd);              /* freed right away, readers may still use it */
	}

list_del_rcu() only removes the item from the list. A reader that was already walking the list can still have a pointer to it. The other function that frees the same kind of object, phonet_address_del(), already did it the right way with kfree_rcu().

One of those readers is getaddr_dumpit(), which answers "list all Phonet addresses" requests (RTM_GETADDR):

	rcu_read_lock();
	list_for_each_entry_rcu(pnd, &pndevs->list, list) {
		...
		memcpy(addrs, pnd->addrs, sizeof(pnd->addrs));       /* reads freed memory */
		for_each_set_bit(addr, addrs, 64) {
			...
			err = fill_addr(skb, READ_ONCE(pnd->netdev->ifindex), ...);  /* follows a pointer from freed memory */

The fix

--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ static void phonet_device_destroy(struct net_device *dev)
 		for_each_set_bit(addr, pnd->addrs, 64)
 			phonet_address_notify(net, RTM_DELADDR, ifindex, addr);
 
-		kfree(pnd);
+		kfree_rcu(pnd, rcu);
 	}
 }

kfree_rcu() waits until all current RCU readers are done and then frees the memory. The struct already had the rcu field it needs, so nothing else had to change.

How the reproducer triggers it

Two things have to happen at the same time:

  1. Freeing side. Create a network device, give it a Phonet address (RTM_NEWADDR), then delete the device (RTM_DELLINK). Deleting the device ends up in phonet_device_destroy(), which frees the record.
  2. Reading side. Keep asking the kernel to list Phonet addresses (RTM_GETADDR).

poc/pn_uaf_repro.c runs 8 threads doing the first part and 8 threads doing the second. It runs inside its own network namespace. It only triggers the bug. It does not try to exploit it.

What the bug can and cannot do

What I saw (logs in evidence/):

  • KASAN use-after-free. getaddr_dumpit() reads 8 bytes from a freed 64-byte object (kmalloc-64 cache).
  • Kernel crash. Once the freed memory is reused, getaddr_dumpit() follows a stale pnd->netdev pointer and the kernel hits a general protection fault. Every vulnerable run ended in a panic. The extra KASAN reports later in the same run are side effects of the list walk going through freed memory. They are not separate bugs.

Limits:

  • It needs root. Adding a Phonet address checks CAP_NET_ADMIN and CAP_SYS_ADMIN against the initial user namespace. A normal user inside their own user namespace gets EPERM. I tested this (test 1 below). Listing addresses needs no special rights, but on its own it does not free anything.
  • Phonet must be enabled (CONFIG_PHONET). Ubuntu, for example, builds it as a module (CONFIG_PHONET=m).

Affected versions

The bug exists from v2.6.33 up to the fixed versions below. These match the official CVE record.

BranchFirst fixed version
mainline7.1
7.0.y7.0.13
6.18.y6.18.36
6.12.y6.12.95
6.6.y6.6.144
6.1.y6.1.177
5.15.y5.15.211
5.10.y5.10.260

Quick way to check a kernel source tree: look at the last kfree in phonet_device_destroy(). kfree_rcu(pnd, rcu) means fixed. kfree(pnd) means vulnerable.

Reproducing it

Use a throwaway VM. The reproducer needs root, and on a vulnerable kernel it will crash the kernel.

  1. Build Linux v7.1 with KASAN and Phonet. Start from x86_64_defconfig plus kvm_guest.config, then add the options in test/kasan-phonet.config. This is the fixed kernel.
  2. Apply test/revert-fix.diff and build again. It changes only the one line shown above. This is the vulnerable kernel.
  3. Build the test initramfs. You need a static busybox:
    test/build_initramfs.sh /usr/bin/busybox initramfs.cpio.gz
    
  4. Boot each kernel:
    test/run_qemu.sh path/to/bzImage initramfs.cpio.gz 60
    

The initramfs runs two tests:

  • Test 1: the reproducer as uid 1000 inside a new user and network namespace. Expected: EPERM.
  • Test 2: the reproducer as root for 60 seconds.

Results

Linux v7.1, KASAN, QEMU/KVM, 4 vCPUs.

DateKernelRunsKASAN use-after-freeKernel crashTest 1 (normal user)
2026-10-08v7.1 (fixed)3 × 60 s0 of 30 of 3EPERM
2026-10-08v7.1 with the fix reverted33 of 3, first report 5–20 s after boot3 of 3EPERM
2026-11-01v7.1 (fixed), fresh build2 × 60 s0 of 20 of 2EPERM
2026-11-01v7.1 with the fix reverted, fresh build33 of 3, first report 4.7–6.4 s after boot3 of 3EPERM

A KASAN report from a vulnerable run (evidence/kasan_vulnerable.txt):

Download Tool