[LTS 9.4] ndisc: use RCU protection in ndisc_alloc_skb() #546
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[LTS 9.4]
CVE-2025-21764
VULN-54027
Problem
https://access.redhat.com/security/cve/CVE-2025-21764
Solution
The mainline fix 628e6d1 uses
dev_net_rcu(…)
function defined in 482ad2a, which in turn usesread_pnet_rcu(…)
defined in 2034d90, none of which were backported tociqlts9_4
, so they were included in this PR.Consider the comparative timeline of
net/ipv6/ndisc.c
andinclude/net/net_namespace.h
files changes in the mainline kernel, stable linux 5.15 and LTS 9.4 - all of the commits mentioned were backported to 5.15 along with CVE-2025-21764 patch:timeline.log
Legend:
The
dev_net_rcu(…)
function defined in 482ad2a was specifically put as a groundwork for the patch series (https://lore.kernel.org/all/[email protected]/) to which 628e6d1 belongs:https://lore.kernel.org/all/173888823503.1713650.11309572430849516645.git-patchwork-notify@kernel.org/
Apart from adding the
read_pnet_rcu(…)
function the 2034d90 commit modifies also the existingread_pnet(…)
andwrite_pnet(…)
functions used in other places of kernel code (it affects LTS 9.4 asCONFIG_NET_NS
is enabled in allciqlts9_4
configs). However, the semantics remain unchanged and only the additional RCU-related protections are introduced. See the documentation for thercu_assign_pointer(…)
macrokernel-src-tree/include/linux/rcupdate.h
Lines 489 to 501 in 72caef5
and the definition of
__rcu_dereference_protected(…)
kernel-src-tree/include/linux/rcupdate.h
Lines 468 to 473 in 72caef5
by which
rcu_dereference_protected(…)
is expressed:kernel-src-tree/include/linux/rcupdate.h
Lines 673 to 674 in 72caef5
kABI check: passed
Boot test: passed
boot-test.log
Kselftests: passed relative
Coverage
Only the net-related tests were run (at least for the patch, the reference test run contains full scope).
Reference
kselftests–ciqlts9_4–run1.log
Patch
kselftests–ciqlts9_4-CVE-2025-21764–run1.log
kselftests–ciqlts9_4-CVE-2025-21764–run2.log
Comparison
The tests results for the reference and patched kernel are the same
Specific tests: skipped