CVE-2026-68117 in Linux
Summary
by MITRE • 08/10/2026
In the Linux kernel, the following vulnerability has been resolved:
tipc: clear sock->sk on the failed-insert path in tipc_sk_create()
When tipc_sk_create() fails to insert the new socket (tipc_sk_insert() returns non-zero), its error path frees the sk with sk_free() but leaves sock->sk pointing at the freed object:
if (tipc_sk_insert(tsk)) {
sk_free(sk); pr_warn("Socket create failed; port number exhausted\n"); return -EINVAL; }
This is harmless for plain socket(): the syscall layer clears sock->ops before releasing, so tipc_release() is never called. It is not harmless on the accept() path. tipc_accept() creates the pre-allocated child socket with tipc_sk_create(net, new_sock, 0, kern); on failure it leaves new_sock->sk dangling and new_sock->ops non-NULL, and do_accept() then fput()s the new file, so __sock_release() -> tipc_release() runs lock_sock(new_sock->sk) on the freed sk -- a use-after-free write of the sk_lock spinlock.
tipc_release() already guards this exact "failed accept() releases a pre-allocated child" case with "if (sk == NULL) return 0;", but the guard is bypassed because tipc_sk_create() left sock->sk non-NULL (dangling) rather than NULL.
Clear sock->sk on the failed-insert path so the existing tipc_release() NULL check fires and the use-after-free is avoided.
The tipc_sk_insert() failure is reached when the per-netns socket rhashtable hits its max_size (tsk_rht_params.max_size = 1048576, ~2M elements) -- i.e. once a netns holds ~2M TIPC sockets every insert returns -E2BIG.
BUG: KASAN: slab-use-after-free in lock_sock_nested (net/core/sock.c:3839) Write of size 8 at addr ffff8880047cdc38 by task init/1 lock_sock_nested (net/core/sock.c:3839) tipc_release (net/tipc/socket.c:638) __sock_release (net/socket.c:710) sock_close (net/socket.c:1501) __fput (fs/file_table.c:512) Allocated by task 1: sk_alloc (net/core/sock.c:2308) tipc_sk_create (net/tipc/socket.c:487) tipc_accept (net/tipc/socket.c:2744) do_accept (net/socket.c:2034) Freed by task 1: __sk_destruct (net/core/sock.c:2391) tipc_sk_create (net/tipc/socket.c:504) tipc_accept (net/tipc/socket.c:2744) do_accept (net/socket.c:2034)
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 08/10/2026
The vulnerability described involves a use-after-free condition in the Linux kernel's TIPC (Transparent Inter-Process Communication) subsystem, specifically within the socket creation and acceptance logic. This flaw occurs when the tipc_sk_create() function fails to insert a newly created socket into the per-network namespace socket hash table. The issue arises from an improper handling of the socket reference pointer sock->sk during error paths, leading to potential memory corruption when the freed socket structure is accessed later by the tipc_release() function.
The technical root cause stems from the failure path in tipc_sk_create() where the function calls sk_free() to release the socket memory but fails to clear the sock->sk pointer. This leaves the pointer pointing to a freed memory location, creating a dangling reference that persists through the error handling chain. The problem becomes particularly critical during accept() operations when pre-allocated child sockets are created using tipc_sk_create() with the kernel flag set. If insertion fails during this process, the new socket's sock->sk field remains non-NULL but points to deallocated memory.
When the accept() operation completes and the file descriptor is closed, the normal cleanup path invokes __sock_release() which calls tipc_release(). The existing guard in tipc_release() that checks for NULL sk pointers is bypassed because the error path failed to set sock->sk to NULL. This results in lock_sock_nested() being called on a freed socket structure, specifically attempting to write to the sk_lock spinlock at address ffff8880047cdc38, causing a slab-use-after-free condition as detected by KASAN.
The vulnerability manifests under specific conditions where a network namespace accumulates approximately two million TIPC sockets, triggering the per-netns socket rhashtable's maximum size limit of 1048576 elements. This scenario leads to tipc_sk_insert() returning -E2BIG errors during socket creation attempts. The flaw aligns with CWE-416 (Use After Free) and represents a classic memory safety issue in kernel space where improper resource management creates exploitable conditions. The attack surface is primarily through network socket operations, particularly those involving connection acceptance and cleanup sequences.
Mitigation involves ensuring that sock->sk is explicitly cleared to NULL when tipc_sk_create() fails to insert the socket into the hash table. This simple fix ensures that the existing NULL check in tipc_release() properly protects against use-after-free conditions during failed accept() operations. The solution follows established kernel security practices for proper resource cleanup and aligns with ATT&CK technique T1068 (Local Privilege Escalation) by preventing potential memory corruption that could be leveraged for system compromise. This vulnerability demonstrates the importance of maintaining consistent pointer management in kernel error paths, as improper cleanup can lead to critical security implications in high-privilege execution contexts.