From: Yingke Xiao <inkxiao12@gmail.com>
To: stable@vger.kernel.org
Cc: gregkh@linuxfoundation.org, sashal@kernel.org,
bpf@vger.kernel.org, Yingke Xiao <inkxiao12@gmail.com>
Subject: [PATCH 6.6.y] bpf: Drop inet_conn_established from lsm sleepable hooks
Date: Thu, 26 Nov 2026 23:52:48 +0800 [thread overview]
Message-ID: <20261126155248.56002-1-inkxiao12@gmail.com> (raw)
In-Reply-To: <2026112616-garden-overfeed-1512@gregkh>
The backport of upstream commit beaf0e96b1da ("bpf: Drop task_to_inode and
inet_conn_established from lsm sleepable hooks") to linux-6.6.y (commit
26b380a3ca0b) removed only bpf_lsm_task_to_inode from
sleepable_lsm_hooks.
bpf_lsm_inet_conn_established is still listed in sleepable_lsm_hooks in
kernel/bpf/bpf_lsm.c, even though security_inet_conn_established() is
called from softirq context in tcp_finish_connect() (net/ipv4/tcp_input.c)
and cannot be used by sleepable LSM programs (CVE-2026-63865).
Remove bpf_lsm_inet_conn_established from sleepable_lsm_hooks to complete
the backport on linux-6.6.y.
Fixes: 26b380a3ca0b ("bpf: Drop task_to_inode and inet_conn_established from lsm sleepable hooks")
Signed-off-by: Yingke Xiao <inkxiao12@gmail.com>
---
Tested on linux-6.6.y (v6.6.163, x86_64 QEMU with CONFIG_BPF_LSM=y,
CONFIG_DEBUG_INFO_BTF=y, CONFIG_SECURITY_NETWORK=y):
- Pre-patch: BPF_PROG_LOAD for SEC("lsm.s/inet_conn_established") with
BPF_F_SLEEPABLE (calling bpf_copy_from_user) succeeded (prog_fd >= 0).
- Post-patch: BPF_PROG_LOAD rejected with -EINVAL
("bpf_lsm_inet_conn_established is not sleepable").
kernel/bpf/bpf_lsm.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/kernel/bpf/bpf_lsm.c b/kernel/bpf/bpf_lsm.c
index 790451337..411622162 100644
--- a/kernel/bpf/bpf_lsm.c
+++ b/kernel/bpf/bpf_lsm.c
@@ -305,10 +305,6 @@ BTF_ID(func, bpf_lsm_file_lock)
BTF_ID(func, bpf_lsm_file_open)
BTF_ID(func, bpf_lsm_file_receive)
-#ifdef CONFIG_SECURITY_NETWORK
-BTF_ID(func, bpf_lsm_inet_conn_established)
-#endif /* CONFIG_SECURITY_NETWORK */
-
BTF_ID(func, bpf_lsm_inode_create)
BTF_ID(func, bpf_lsm_inode_free_security)
BTF_ID(func, bpf_lsm_inode_getattr)
--
2.25.1
prev parent reply other threads:[~2026-11-26 15:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMcAce8Mq7FLgzAMgnTQF=iB8V+XZ57wCCu7S0-ULTE_UF68ew@mail.gmail.com>
2026-11-26 14:23 ` [PATCH 6.6.y] Backport request: beaf0e96b1da ("bpf, lsm: Remove inet_conn_established from sleepable hooks", CVE-2026-63865) Greg KH
2026-11-26 15:52 ` Yingke Xiao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126155248.56002-1-inkxiao12@gmail.com \
--to=inkxiao12@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox