Skip to content

[ciqlts9_2] Multiple patches tested (5 commits) - #1697

Merged
PlaidCat merged 5 commits into
ciqlts9_2from
{ciq_kernel_automation}_ciqlts9_2
Oct 14, 2026
Merged

PlaidCat merged 5 commits into
ciqlts9_2from
{ciq_kernel_automation}_ciqlts9_2

Conversation

@ciq-kernel-automation

Copy link
Copy Markdown

Summary

This PR has been automatically created after successful completion of all CI stages.

Commit Message(s)

xfrm: input: hold netns during deferred transport reinjection

jira VULN-195795
cve CVE-2026-63919
commit-author Zhengchuan Liang <zcliangcn@gmail.com>
commit c16f74dc1d75d0e2e7670076d5375deda110ebeb
ip6: vti: Use ip6_tnl.net in vti6_changelink().

jira VULN-193279
cve CVE-2026-63917
commit-author Kuniyuki Iwashima <kuniyu@google.com>
commit 11b326fb0a374f4654f9be22d0f0f7abd9f7d3fe
ip6: vti: Use ip6_tnl.net in vti6_siocdevprivate().

jira VULN-195807
cve CVE-2026-63921
commit-author Maoyi Xie <maoyixie.tju@gmail.com>
commit 8b484efd5cb4eeef9021a661e198edc5349dacf6
xfrm: policy: fix use-after-free on inexact bin in xfrm_policy_bysel_ctx()

jira VULN-190321
cve CVE-2026-53239
commit-author Sanghyun Park <sanghyun.park.cnu@gmail.com>
commit 7f2d76c9c03257c0782afef9d95321fa04096f60
udp: fix potential use-after-free in tunnel segmentation

jira VULN-205114
cve CVE-2026-74705
commit-author Xuanqiang Luo <luoxuanqiang@kylinos.cn>
commit d0f86fb36eb260abd10007b62c9dcc1028e03e61

Test Results

✅ Build Stage

Architecture Build Time Total Time
x86_64 19m 16s 20m 10s
aarch64 14m 14s 14m 50s

✅ Boot Verification

✅ Kernel Selftests

Architecture Passed Failed Compared Against Status
x86_64 175 23 ciqlts9_2 ✅ No regressions
aarch64 141 27 ciqlts9_2 ✅ No regressions

✅ LTP Results

Architecture Passed Failed Compared Against Status
x86_64 1439 81 ciqlts9_2 ✅ No regressions
aarch64 1409 83 ciqlts9_2 ✅ No regressions

🤖 This PR was automatically generated by GitHub Actions
Run ID: 38525390885

CIQ Kernel Automation added 5 commits October 14, 2026 06:53
jira VULN-195795
cve CVE-2026-63919
commit-author Zhengchuan Liang <zcliangcn@gmail.com>
commit c16f74d

Transport-mode reinjection stores a struct net pointer in skb->cb and
uses it later from xfrm_trans_reinject(). That pointer must stay valid
until the deferred callback runs.

Take a netns reference when queueing deferred reinjection work and drop
it after the callback completes. Use maybe_get_net() so the queueing
path does not revive a namespace that is already being torn down.

This keeps the existing workqueue design and fixes the netns lifetime
handling in one place for all users of xfrm_trans_queue_net().

Fixes: 7b38019 ("xfrm: introduce xfrm_trans_queue_net")
	Cc: stable@kernel.org
	Reported-by: Yuan Tan <yuantan098@gmail.com>
	Reported-by: Xin Liu <bird@lzu.edu.cn>
Co-developed-by: Luxing Yin <tr0jan@lzu.edu.cn>
	Signed-off-by: Luxing Yin <tr0jan@lzu.edu.cn>
	Signed-off-by: Zhengchuan Liang <zcliangcn@gmail.com>
	Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
Assisted-by: Codex:gpt-5.4
	Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit c16f74d)
	Signed-off-by: CIQ Kernel Automation <ciq_kernel_automation@ciq.com>
jira VULN-193279
cve CVE-2026-63917
commit-author Kuniyuki Iwashima <kuniyu@google.com>
commit 11b326f

ip netns add ns1
ip netns add ns2
ip -n ns1 link add vti6_test type vti6 remote ::1 local ::2 key 7
ip -n ns1 link set vti6_test netns ns2
ip -n ns2 link set vti6_test type vti6 remote ::3 local ::4 key 9
ip netns del ns2
ip netns del ns1
[  132.495484] ------------[ cut here ]------------
[  132.497609] kernel BUG at net/core/dev.c:12376!

Commit 61220ab ("vti6: Enable namespace changing") dropped
NETIF_F_NETNS_LOCAL from vti6 devices. A vti6 tunnel can then
move through IFLA_NET_NS_FD. After the move dev_net(dev) points
at the new netns while t->net stays at the creation netns.

vti6_changelink() and vti6_update() still use dev_net(dev) and
dev_net(t->dev). They unlink from one per netns hash and relink
into another. The creation netns is left with a stale entry.
cleanup_net() of that netns later walks freed memory.

Reachable from an unprivileged user namespace (unshare --user
--map-root-user --net). Cross tenant scope on container hosts.

Fixes: 61220ab ("vti6: Enable namespace changing")
	Reported-by: Maoyi Xie <maoyi.xie@ntu.edu.sg>
	Reviewed-by: Eric Dumazet <edumazet@google.com>
	Cc: stable@vger.kernel.org # v5.15+
	Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260521130555.3421684-2-maoyixie.tju@gmail.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>
(cherry picked from commit 11b326f)
	Signed-off-by: CIQ Kernel Automation <ciq_kernel_automation@ciq.com>
jira VULN-195807
cve CVE-2026-63921
commit-author Maoyi Xie <maoyixie.tju@gmail.com>
commit 8b484ef

After patch 1/2 in this series, vti6_update() unlinks and relinks
the tunnel through t->net. vti6_siocdevprivate() still uses
dev_net(dev) for the collision lookup. For a tunnel moved through
IFLA_NET_NS_FD, dev_net(dev) is the new netns, not t->net.

SIOCCHGTUNNEL on a migrated tunnel then runs:

  net = dev_net(dev)                    /* migrated netns */
  t   = vti6_locate(net, &p1, false)    /* misses target in t->net */
  ...
  t   = netdev_priv(dev)
  vti6_update(t, &p1, false)            /* mutates t->net's hash */

A caller in the migrated netns picks params that match a tunnel
in the creation netns. The lookup in dev_net(dev) finds nothing.
vti6_update() prepends the migrated tunnel at the head of the
creation netns hash bucket for those params. Later lookups in
the creation netns resolve to the migrated device. xfrm receive
delivers the matched packets through a device the caller controls.

Reachable from an unprivileged user namespace (unshare --user
--map-root-user --net). Cross tenant scope on container hosts.

Switch the SIOCCHGTUNNEL path on a non fallback device to use
t->net for the lookup. The lookup now matches the netns
vti6_update() operates on.

Also add ns_capable(self->net->user_ns, CAP_NET_ADMIN) before
the lookup. The check at the top of the case is against
dev_net(dev)->user_ns, which after migration is the attacker's
netns. A caller there can pick params absent from self->net,
the lookup returns NULL, t becomes self, and vti6_update()
inserts the device into the creation netns hash. The new check
requires CAP_NET_ADMIN in the creation netns user_ns too.

SIOCADDTUNNEL and SIOCCHGTUNNEL on the fallback device keep
dev_net(dev), which equals init_net there.

Fixes: 61220ab ("vti6: Enable namespace changing")
	Suggested-by: Jakub Kicinski <kuba@kernel.org>
	Suggested-by: Xiao Liang <shaw.leon@gmail.com>
	Cc: stable@vger.kernel.org # v5.15+
	Signed-off-by: Maoyi Xie <maoyixie.tju@gmail.com>
Link: https://patch.msgid.link/20260521130555.3421684-3-maoyixie.tju@gmail.com
	Signed-off-by: Paolo Abeni <pabeni@redhat.com>
(cherry picked from commit 8b484ef)
	Signed-off-by: CIQ Kernel Automation <ciq_kernel_automation@ciq.com>
…ctx()

jira VULN-190321
cve CVE-2026-53239
commit-author Sanghyun Park <sanghyun.park.cnu@gmail.com>
commit 7f2d76c

Fix the race by pruning the bin while still holding xfrm_policy_lock,
before dropping it. Use __xfrm_policy_inexact_prune_bin() directly since
the lock is already held. The wrapper xfrm_policy_inexact_prune_bin()
becomes unused and is removed.

Race:

  CPU0 (XFRM_MSG_DELPOLICY)           CPU1 (XFRM_MSG_NEWSPDINFO)
  ==========================          ==========================
  xfrm_policy_bysel_ctx():
    spin_lock_bh(xfrm_policy_lock)
    bin = xfrm_policy_inexact_lookup()
    __xfrm_policy_unlink(pol)
    spin_unlock_bh(xfrm_policy_lock)
    xfrm_policy_kill(ret)
    // wide window, lock not held
                                       xfrm_hash_rebuild():
                                         spin_lock_bh(xfrm_policy_lock)
                                         __xfrm_policy_inexact_flush():
                                           kfree_rcu(bin)  // bin freed
                                         spin_unlock_bh(xfrm_policy_lock)
    xfrm_policy_inexact_prune_bin(bin)
    // UAF: bin is freed

Fixes: 6be3b0d ("xfrm: policy: add inexact policy search tree infrastructure")
	Signed-off-by: Sanghyun Park <sanghyun.park.cnu@gmail.com>
	Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
(cherry picked from commit 7f2d76c)
	Signed-off-by: CIQ Kernel Automation <ciq_kernel_automation@ciq.com>
jira VULN-205114
cve CVE-2026-74705
commit-author Xuanqiang Luo <luoxuanqiang@kylinos.cn>
commit d0f86fb

__skb_udp_tunnel_segment() gets the UDP header before ensuring the
tunnel header is in the skb head. If the pull reallocates skb->head,
the saved UDP header pointer is no longer valid.

Get the UDP header after the pull to avoid a potential use-after-free.

Fixes: dbef491 ("udp: Use uh->len instead of skb->len to compute checksum in segmentation")
	Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
	Reviewed-by: Antoine Tenart <atenart@kernel.org>
Link: https://patch.msgid.link/20260730093554.68127-1-xuanqiang.luo@linux.dev
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit d0f86fb)
	Signed-off-by: CIQ Kernel Automation <ciq_kernel_automation@ciq.com>
@ciq-kernel-automation ciq-kernel-automation Bot added the created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI) label Oct 14, 2026
@github-actions

Copy link
Copy Markdown

✅ Diffofdiffs: No differences found

Compared 5 backports with upstream.

Checked PR revision e224aa5c166c against base cef1554c17ea.

@github-actions

Copy link
Copy Markdown

🤖 Validation Checks In Progress Workflow run: https://github.com/ctrliq/kernel-src-tree/actions/runs/38557058589

@github-actions

Copy link
Copy Markdown

✅ Validation checks completed successfully View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/38557058589

@PlaidCat
PlaidCat requested a review from a team October 14, 2026 13:15

@PlaidCat PlaidCat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@PlaidCat
PlaidCat requested a review from a team October 14, 2026 13:49

@bmastbergen bmastbergen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

@PlaidCat
PlaidCat merged commit ed31e86 into ciqlts9_2 Oct 14, 2026
6 checks passed
@PlaidCat
PlaidCat deleted the {ciq_kernel_automation}_ciqlts9_2 branch October 14, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI)

Development

Successfully merging this pull request may close these issues.

2 participants