* [CVE-2026-74589][MODERATE 7.0] bpf, sockmap: Fix sk_redir use-after-free in send verdict
@ 2026-08-22 17:37 AL-KERNEL
0 siblings, 0 replies; only message in thread
From: AL-KERNEL @ 2026-08-22 17:37 UTC (permalink / raw)
To: kernel-cve
CVE: CVE-2026-74589
Priority: MODERATE 7.0
AL-KERNEL base severity: MODERATE
KPANIC flag: NO
Patch: bpf, sockmap: Fix sk_redir use-after-free in send verdict
Commit: 41b7da0cb72ca5aa1e62b68dab323d0791fc6bdf
Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=41b7da0cb72ca5aa1e62b68dab323d0791fc6bdf
Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-74589
Analysis date: Sat, 22 Aug 2026 13:37:45 -0400
ActionableScore: 5
ActionableScore lower bound: 3
Actionable bucket: Actionable Moderate at minimum
Manual review required: YES
Summary:
A race in the BPF sockmap send verdict path can leave `tcp_bpf_send_verdict()` using a stale `sk_redir` socket pointer after another sender releases the cached reference, causing a confirmed slab use-after-free and likely local kernel crash, with privilege-escalation impact unproven but worth manual review.
======================================================================
ABOUT THIS REPORT
======================================================================
The original Linux kernel CVE announcement for CVE-2026-74589 is available here:
https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-74589
The original announcement does not normally provide a security severity
estimate, CVSS assessment, or enough information to determine whether the
reported kernel bug represents a practically relevant security issue.
This report was generated by AL-KERNEL, an AI-assisted Linux kernel
vulnerability analysis system developed by Alexander Larkin. It combines
an autonomous classifier with LLM-assisted technical analysis and a
separate ActionableScore mechanism.
The purpose of this report is to prioritize Linux kernel CVEs before
manual review, identify cases that require prompt investigation, and
support automatic closure of issues that are unlikely to have meaningful
security impact.
Published priority for this report: MODERATE 7.0
Manual review required: YES
A detailed explanation of the methodology and priority rules is included
at the end of this message.
======================================================================
AL-KERNEL CLASSIFICATION RESULT
======================================================================
CVE-2026-74589 MODERATE CHECK WITH IMPACT FROM ORIG NN MODERATE Maybe valid. Check manually. Hints by AL-KERNEL: The best (paranoid) CVSS is 'AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H';*CWE-416;CWE-362;*CWE-672;Other CVSS 'AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H';BEST CVSS score: '7';DESCR 'A race in the BPF sockmap send verdict path can leave tcp_bpf_send_verdict with a raw sk_redir pointer after the source socket lock is dropped. Another sendmsg on the same source socket can consume the cached apply_bytes verdict, clear psock sk_redir, and release the cached socket reference while the first thread still uses the old pointer. KASAN reports a slab use-after-free in tcp_bpf_sendmsg_redir, so the bug is a real UAF rather than a simple NULL dereference or resource leak. For the CVSS the PR:L is used because reliable triggering requires local execution in a context that can reach the affected sockmap socket state, even if initial sockmap setup may require stronger privileges in many deployments. The issue is not directly network reachable because it is driven by local sendmsg activity and BPF sockmap state. Impact is at least a local denial of service via kernel crash and in worst case may allow confidentiality or integrity impact due to memory corruption and should be reviewed manually.';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Actionable Moderate at minimum (with actual score 4) YES REMOTE READ BPF UAF NETWORK HARDWARE LINUS INCREASED_TO_MODERATE7_FROM_MODERATE_BASED_ON_GUESSCVSS DECREASED_TO_MODERATEREG_BASED_ON_ACTIONABLESCORELESSTHAN5 NO NO checked
======================================================================
ACTIONABLESCORE ANALYSIS
======================================================================
ActionableScore=5
ActionableScoreLower=3
## 1. ActionableScore
* Conservative score: 3
* Paranoid score: 5
* Final recommended bucket: **Actionable Moderate at minimum**::
## 2. Signal breakdown
Paranoid score signals:
* Local trigger in reachable sockmap context: +1
The bug is triggered by local `sendmsg()` activity on sockets participating in BPF sockmap send verdict redirection.
* Memory corruption, weak race-UAF primitive: +1
KASAN confirms `slab-use-after-free` in `tcp_bpf_sendmsg_redir()`, but the patch does not show attacker-controlled reclaim, object replacement, callback control, or arbitrary write.
* Real lifetime corruption: +1
The local `sk_redir` pointer is used after the cached socket reference can be released by a racing sender.
* Reliable kernel crash / strong DoS: +1
The reported UAF is in the kernel TCP/BPF path and can crash the kernel.
* Local high-control kernel data-plane API concern: +1
BPF sockmap and send verdict paths are rich kernel networking object/lifetime APIs when reachable through delegated or preconfigured BPF infrastructure.
Conservative reductions / limitations:
* BPF privilege gating limits default exposure. In typical hardened product configurations, creating or attaching the required BPF sockmap state requires `CAP_BPF`, `CAP_NET_ADMIN`, `CAP_SYS_ADMIN`, or root-controlled setup.
* This is a race-dependent UAF. No evidence is provided for controlled reclaim, type confusion, write-after-free, or privilege escalation primitive.
* Not network-triggerable by ordinary remote packet traffic. The trigger is local send path activity after BPF sockmap state exists.
## 3. Reachability analysis
The vulnerable path is local, not directly remote. An attacker needs execution in a context that can use sockets already associated with BPF sockmap send verdict redirection, or must be able to create that BPF sockmap setup.
In typical deployments with unprivileged BPF disabled, a fully unprivileged user cannot normally set up the required state. However, practical risk increases if a service account, container root, delegated network namespace, or reduced-capability process can operate on preconfigured sockmap sockets. Such cases should not be treated as full host-root-only exposure.
The path is not a default generic TCP receive path. It is specific to BPF sockmap redirect/send verdict use, but it is still in a sensitive networking lifetime path involving `struct sock` references.
Call-site confidence: high. The commit message and diff directly show the missing `sock_hold()` before dropping the socket lock and the matching `sock_put()` after `tcp_bpf_sendmsg_redir()`.
## 4. Severity interpretation
This behaves more like an actionable Moderate kernel memory-lifetime bug than an ordinary Moderate cleanup issue. The UAF is confirmed by KASAN and affects a live `struct sock` pointer used after a racing reference release.
Realistic exploitation evidence currently supports local kernel crash / DoS. Privilege escalation remains theoretical because there is no shown reclaim primitive, attacker-controlled replacement, arbitrary write, callback dispatch, or type confusion. For triage, the issue should not be auto-closed because confirmed UAFs in socket/BPF lifetime paths are historically worth manual review.
## 5. One-sentence report phrase
A race in the BPF sockmap send verdict path can leave `tcp_bpf_send_verdict()` using a stale `sk_redir` socket pointer after another sender releases the cached reference, causing a confirmed slab use-after-free and likely local kernel crash, with privilege-escalation impact unproven but worth manual review.
## 6. Manual review recommendation
MANUAL CHECK REQUIRED
Reason: confirmed race-based UAF in a kernel networking/BPF lifetime path. Even though default BPF privilege gating limits exposure and no controlled exploitation primitive is shown, this class should not be auto-closed without human review.
======================================================================
UPSTREAM PATCH SUMMARY
======================================================================
Patch: bpf, sockmap: Fix sk_redir use-after-free in send verdict
Commit: 41b7da0cb72ca5aa1e62b68dab323d0791fc6bdf
Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=41b7da0cb72ca5aa1e62b68dab323d0791fc6bdf
Commit description:
sk_psock_msg_verdict() takes a socket reference for psock->sk_redir.
tcp_bpf_send_verdict() copies that pointer while holding the source socket
lock, but does not take a reference for the local copy before dropping the
lock around tcp_bpf_sendmsg_redir().
When apply_bytes keeps the cached verdict active, another sendmsg() on the
same source socket can consume the remaining bytes and release the cached
reference while the first thread still holds only the raw local pointer:
CPU 0 CPU 1
sk_redir = psock->sk_redir
apply_bytes remains nonzero
release_sock(sk)
lock_sock(sk)
apply_bytes reaches zero
psock->sk_redir = NULL
release_sock(sk)
tcp_bpf_sendmsg_redir(sk_redir)
sock_put(sk_redir)
tcp_bpf_sendmsg_redir(sk_redir)
The final sock_put() can free sk_redir before CPU 0 dereferences it.
KASAN reported:
BUG: KASAN: slab-use-after-free in tcp_bpf_sendmsg_redir+0xf39/0x1020
Read of size 8 at addr ffff888108537090 by task poc/87
Call Trace:
tcp_bpf_sendmsg_redir+0xf39/0x1020
tcp_bpf_sendmsg+0x977/0x1a50
__sys_sendto+0x32c/0x3a0
__x64_sys_sendto+0xdb/0x1b0
Allocated by task 85:
sk_prot_alloc+0x56/0x210
sk_clone+0x6f/0x14b0
inet_csk_clone_lock+0x24/0x740
tcp_create_openreq_child+0x25/0x2710
tcp_v4_syn_recv_sock+0x10a/0xe00
Freed by task 0:
__kasan_slab_free+0x43/0x70
slab_free_after_rcu_debug+0xa6/0x1e0
rcu_core+0x50a/0x1850
Last potentially related work creation:
__sk_destruct+0x3da/0x540
sk_psock_destroy+0x81e/0xab0
process_one_work+0x63a/0x1070
Take a temporary socket reference while the source socket lock still
protects psock->sk_redir, and drop it after tcp_bpf_sendmsg_redir()
returns. This keeps each unlocked use independent of cached-verdict
ownership.
Fixes: 604326b ("bpf, sockmap: convert to generic sk_msg interface")
Signed-off-by: Chengfeng Ye <[email protected]>
Reviewed-by: John Fastabend <[email protected]>
Reviewed-by: Emil Tsalapatis <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/bpf/[email protected]
Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Changed files:
net/ipv4/tcp_bpf.c
Diff excerpt:
Not included in this email. See the upstream URL for the full patch.
Full patch:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=41b7da0cb72ca5aa1e62b68dab323d0791fc6bdf
======================================================================
DETAILED REPORT METHODOLOGY
======================================================================
The original Linux kernel CVE announcement for CVE-2026-74589 can be found here:
https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-74589
The original CVE announcement normally does not include a security-level
estimate. In particular, it may not contain a CVSS assessment, an impact
level, or enough information to determine whether the reported bug is a
practically relevant security issue. One purpose of this parallel CVE list
is to provide that missing technical and prioritization information.
The original goal of the AL-KERNEL project was to prioritize Linux kernel
CVE analysis automatically before manual review. The system can also help
identify non-security issues that may be suitable for automatic closure.
This report was generated by AL-KERNEL, an AI-assisted Linux kernel
vulnerability analysis system developed by Alexander Larkin.
The first analysis stage combines an autonomous classifier with additional
LLM-based analysis. The autonomous classifier runs locally on a CPU and is
based on a backpropagation neural network. Together, these mechanisms
produce a technical vulnerability description, identify likely weakness
types, estimate CVSS severity, and provide input for ActionableScore.
Two CVSS estimates are retained because incomplete kernel vulnerability
information often permits more than one defensible interpretation:
Conservative CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
The Best / paranoid CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
The Best / paranoid CVSS score: 7
The conservative vector represents a lower-impact interpretation.
The Best/paranoid vector intentionally represents a plausible upper-bound
interpretation and should not automatically be treated as demonstrated
real-world impact.
CVSS may also need to be adjusted for a particular Linux deployment,
because actual reachability, privileges, enabled kernel configuration,
hardware, namespaces, exposed device nodes, and other environmental
conditions can differ significantly between systems.
A separate ActionableScore mechanism evaluates practical remediation
urgency. Its analysis may include reachability, attack prerequisites,
subsystem exposure, memory-corruption characteristics, denial-of-service
reliability, and possible confidentiality, integrity, or
privilege-escalation impact.
Conservative ActionableScore: 3
Paranoid ActionableScore: 5
The final base severity is taken directly from the second tab-separated
field of the AL-KERNEL classification result. ActionableScore does not
replace or independently override that final AL-KERNEL decision, and
if ActionableScore adjusted impact level of ALKERNEL, then you would see
self-readable flags above like INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7.
For an AL-KERNEL result of MODERATE, this report uses the following
additional presentation split:
ActionableScore below 5 -> MODERATE REGULAR
ActionableScore 5 or more -> MODERATE 7.0
The distinction between MODERATE REGULAR and MODERATE 7.0 makes it
possible to identify Moderate issues that should receive manual analysis
and fixes before lower-priority MODERATE REGULAR issues. In many cases,
MODERATE REGULAR fixes may wait for a later rebase or routine update.
There is one override in which MODERATE REGULAR becomes MODERATE 7.0
even when the ActionableScore is below 5. When the AL-KERNEL result
contains the KPANIC flag, a MODERATE result is always presented as
MODERATE 7.0. The KPANIC flag selected with few regexps without
usage of AI at all, so it helps to detect cases when Kernel Crash happens
and similar (to filter False-Negative results from the LLM usage).
KPANIC indicates that a reliable kernel crash, kernel panic, or similarly
serious kernel availability impact was identified by the classification
workflow.
AL-KERNEL base severity for this report: MODERATE
KPANIC detected for this report: NO
Published priority for this report (same as in Subject): MODERATE 7.0
These results are intended to support engineering triage. They are
machine-generated estimates, and cases marked for manual review should
be validated by a human security engineer before final disposition.
For more info read docs linked from here: https://kernelcve.org/
(and you can submit you own patch there to generate such a report
for non-existant CVE-id yet).
Note that in many cases this AI tool selects higher severity, than
real is (means you can expect Importants instead of Moderate 7.0 or
Moderates 7.0 instead of regular Moderates). If you see such cases,
please use reply email interface to add additional manual analyses
info to this particular CVE.
And please, please, let me know when you see Lows instead of Importants
or Important instead of Low (because particular for such cases I
need to tune this AI tool to make it better for this one and next similar).
My contact email for such notifications is [email protected] (and both
send reply to CVE record itself too and see "reply" button below for howto reply).
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-22 17:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-22 17:37 [CVE-2026-74589][MODERATE 7.0] bpf, sockmap: Fix sk_redir use-after-free in send verdict AL-KERNEL
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox