Skip to content

[LTS 9.4] CVE-2025-38129, CVE-2024-47727, CVE-2026-31402#1153

Open
pvts-mat wants to merge 3 commits intoctrliq:ciqlts9_4from
pvts-mat:ciqlts9_4-CVE-batch-30
Open

[LTS 9.4] CVE-2025-38129, CVE-2024-47727, CVE-2026-31402#1153
pvts-mat wants to merge 3 commits intoctrliq:ciqlts9_4from
pvts-mat:ciqlts9_4-CVE-batch-30

Conversation

@pvts-mat
Copy link
Copy Markdown
Contributor

[LTS 9.4]

CVE-2025-38129 VULN-71839
CVE-2024-47727 VULN-8574
CVE-2026-31402 VULN-180164

Commits

CVE-2025-38129

page_pool: Fix use-after-free in page_pool_recycle_in_ring

jira VULN-71839
cve CVE-2025-38129
commit-author Dong Chenchen <dongchenchen2@huawei.com>
commit 271683bb2cf32e5126c592b5d5e6a756fa374fd9
upstream-diff |
  page_pool_recycle_in_ring()
        Accounted for the non-backported
        4dec64c52e24c2c9a15f81c115f1be5ea35121cb ("page_pool: convert to
        use netmem")
  page_pool_release()
        (The following were the context conflicts, no actual diffs from
        the upstream in the strict sense)
        - Retained the single-argument `page_pool_inflight()' call instead
          of passing additional `true' as it is in the upstream. The
          boolean argument relates to the reporting feature introduced in
          the non-backported commit
          7aee8429eedd0970d8add2fb5b856bfc5f5f1fc1 ("net: page_pool:
          report amount of memory held by page pools").
        - LTS 9.4 lacks the backport of
          de97502e16fc406a74edee8359612e518986cf59 ("page_pool: introduce
          page_pool_alloc() API"). Without it the `__page_pool_destroy()'
          call in upstream is equivalent to `page_pool_free()' in
          ciqlts9_4. Retained the ciqlts9_4-native `page_pool_free()'
          call.

To see that netmem_ref equals struct page * refer to the docstring of netmem_ref at the time of 271683b fix:

/**
* typedef netmem_ref - a nonexistent type marking a reference to generic
* network memory.
*
* A netmem_ref currently is always a reference to a struct page. This
* abstraction is introduced so support for new memory types can be added.
*
* Use the supplied helpers to obtain the underlying memory pointer and fields.
*/
typedef unsigned long __bitwise netmem_ref;

CVE-2024-47727

x86/tdx: Fix "in-kernel MMIO" check

jira VULN-8574
cve CVE-2024-47727
commit-author Alexey Gladkov (Intel) <legion@kernel.org>
commit d4fc4d01471528da8a9797a065982e05090e1d81
upstream-diff Context conflicts in header files inclusion only

CVE-2026-31402

nfsd: fix heap overflow in NFSv4.0 LOCK replay cache

jira VULN-180164
cve CVE-2026-31402
commit-author Jeff Layton <jlayton@kernel.org>
commit 5133b61aaf437e5f25b1b396b14242a6bb0508e2
upstream-diff Used `post_err_offset' instead of `op_status_offset +
  XDR_UNIT' in the `read_bytes_from_xdr_buf()' call, as the LTS 9.4
  version is missing ef3675b45bcb6c17cabbbde620c6cea52ffb21ac ("NFSD:
  Encode COMPOUND operation status on page boundaries")

The non-backported commit ef3675b made some changes to the core, buffer length-related variables used in the fix, so the lack of it may raise some doubts whether the LTS 9.4 adaptation could have been made in such a straightforward manner. It could, because

post_err_offset = op_status_offset + XDR_UNIT

(Here the = sign should be understood as mathematical equality, not C assignement. Similarly in the code comments below)

To see why, take into account that the xdr_reserve_space(xdr, N) call, if successfull, increases xdr->buf->len by N. See

xdr->buf->len += nbytes;

and

xdr->buf->len += nbytes;

Also that the xdr_stream_encode_u32(xdr, X) call increases xdr->buf->len by sizeof(X), through the xdr_reserve_space(xdr, N) call inside:

__be32 *p = xdr_reserve_space(xdr, len);

In the upstream-fixed affected function nfsd4_encode_operation() we have:

unsigned int op_status_offset;
nfsd4_enc encoder;
if (xdr_stream_encode_u32(xdr, op->opnum) != XDR_UNIT)
goto release;
op_status_offset = xdr->buf->len;
if (!xdr_reserve_space(xdr, XDR_UNIT))
goto release;

Tracking the op_status_offset value:

unsigned int op_status_offset;
nfsd4_enc encoder;

// (xdr->buf->len)_0
if (xdr_stream_encode_u32(xdr, op->opnum) != XDR_UNIT)
	goto release;
// (xdr->buf->len)_1 = (xdr->buf->len)_0 + sizeof(op->opnum)
op_status_offset = xdr->buf->len;
// op_status_offset = (xdr->buf->len)_1
//                  = (xdr->buf->len)_0 + sizeof(op->opnum)
//                  = (xdr->buf->len)_0 + 4
if (!xdr_reserve_space(xdr, XDR_UNIT))
	goto release;

The last step comes from:

u32 opnum;

In the LTS 9.4 version the nfsd4_encode_operation() function starts with:

int post_err_offset;
nfsd4_enc encoder;
__be32 *p;
p = xdr_reserve_space(xdr, 8);
if (!p)
goto release;
*p++ = cpu_to_be32(op->opnum);
post_err_offset = xdr->buf->len;

Tracking the post_err_offset value:

int post_err_offset;
nfsd4_enc encoder;
__be32 *p;

// (xdr->buf->len)_0
p = xdr_reserve_space(xdr, 8);
if (!p)
	goto release;
// (xdr->buf->len)_1 = (xd->buf->len)_0 + 8
*p++ = cpu_to_be32(op->opnum);
post_err_offset = xdr->buf->len;
// post_err_offset = (xdr->buf->len)_1
//                 = (xdr->buf->len)_0 + 8
//                 = op_status_offset + 4
//                 = op_status_offset + XDR_UNIT

The last step is because of

#define XDR_UNIT sizeof(__be32)

This means that neither the len value used in the special-case-catching condition nor the base argument for the read_bytes_from_xdr_buf() call differ between the upstream fix and the LTS 9.4 backport.

kABI check: passed

[1/2] kabi_check_kernel	Check ABI of kernel [ciqlts9_4-CVE-batch-30]	_kabi_check_kernel__x86_64--test--ciqlts9_4-CVE-batch-30
+ dist_git_version=el-9.4
+ local_version=ciqlts9_4-CVE-batch-30
+ arch=x86_64
+ user=pvts
+ buildmachine=x86_64--build--ciqlts9_4
+ virsh_timeout=600
+ ssh_daemon_wait=20
+ src_dir=/mnt/code/kernel-dist-git-el-9.4
+ build_dir=/mnt/build_files/kernel-src-tree-ciqlts9_4-CVE-batch-30
+ sudo chmod +x /data/src/ctrliq-github-haskell/kernel-dist-git-el-9.4/SOURCES/check-kabi
+ ninja-back/virssh.xsh --max 8 --shutdown-on-success --shutdown-on-failure --timeout 600 --ssh-daemon-wait 20 pvts x86_64--build--ciqlts9_4 ''\''/mnt/code/kernel-dist-git-el-9.4/SOURCES/check-kabi'\'' -k '\''/mnt/code/kernel-dist-git-el-9.4/SOURCES/Module.kabi_x86_64'\'' -s '\''/mnt/build_files/kernel-src-tree-ciqlts9_4-CVE-batch-30/Module.symvers'\'''
kABI check passed
+ touch state/kernels/ciqlts9_4-CVE-batch-30/x86_64/kabi_checked

Boot test: passed

boot-test.log

Kselftests: passed relative

Reference

kselftests–ciqlts9_4–run1.log

Patch

kselftests–ciqlts9_4-CVE-batch-30–run1.log
kselftests–ciqlts9_4-CVE-batch-30–run2.log

Comparison

The tests results for the reference and the patch are the same.

$ ktests.xsh diff  kselftests*.log

Column    File
--------  --------------------------------------------
Status0   kselftests--ciqlts9_4--run1.log
Status1   kselftests--ciqlts9_4-CVE-batch-30--run1.log
Status2   kselftests--ciqlts9_4-CVE-batch-30--run2.log

TestCase                                               Status0  Status1  Status2  Summary
bpf:get_cgroup_id_user                                 pass     pass     pass     same
bpf:test_cgroup_storage                                pass     pass     pass     same
bpf:test_dev_cgroup                                    pass     pass     pass     same
bpf:test_lpm_map                                       pass     pass     pass     same
bpf:test_lru_map                                       pass     pass     pass     same
bpf:test_sock                                          pass     pass     pass     same
bpf:test_sysctl                                        pass     pass     pass     same
bpf:test_tag                                           pass     pass     pass     same
bpf:test_tcpnotify_user                                pass     pass     pass     same
bpf:test_verifier                                      fail     fail     fail     same
breakpoints:breakpoint_test                            pass     pass     pass     same
capabilities:test_execve                               pass     pass     pass     same
clone3:clone3                                          pass     pass     pass     same
clone3:clone3_cap_checkpoint_restore                   pass     pass     pass     same
clone3:clone3_clear_sighand                            pass     pass     pass     same
clone3:clone3_set_tid                                  pass     pass     pass     same
cpu-hotplug:cpu-on-off-test.sh                         pass     pass     pass     same
cpufreq:main.sh                                        fail     fail     fail     same
drivers/dma-buf:udmabuf                                pass     pass     pass     same
drivers/net/bonding:bond-arp-interval-causes-panic.sh  pass     pass     pass     same
drivers/net/bonding:bond-break-lacpdu-tx.sh            fail     fail     fail     same
drivers/net/bonding:bond-eth-type-change.sh            pass     pass     pass     same
drivers/net/bonding:bond-lladdr-target.sh              pass     pass     pass     same
drivers/net/bonding:bond_options.sh                    fail     fail     fail     same
drivers/net/bonding:dev_addr_lists.sh                  pass     pass     pass     same
drivers/net/bonding:mode-1-recovery-updelay.sh         pass     pass     pass     same
drivers/net/bonding:mode-2-recovery-updelay.sh         pass     pass     pass     same
drivers/net/team:dev_addr_lists.sh                     pass     pass     pass     same
exec:binfmt_script                                     pass     pass     pass     same
exec:execveat                                          pass     pass     pass     same
exec:load_address_16777216                             fail     fail     fail     same
exec:load_address_2097152                              pass     pass     pass     same
exec:load_address_4096                                 pass     pass     pass     same
exec:non-regular                                       fail     fail     fail     same
exec:recursion-depth                                   pass     pass     pass     same
filesystems/binderfs:binderfs_test                     fail     fail     fail     same
filesystems/epoll:epoll_wakeup_test                    pass     pass     pass     same
firmware:fw_run_tests.sh                               skip     skip     skip     same
fpu:run_test_fpu.sh                                    skip     skip     skip     same
fpu:test_fpu                                           pass     pass     pass     same
ftrace:ftracetest                                      fail     fail     fail     same
futex:run.sh                                           pass     pass     pass     same
gpio:gpio-mockup.sh                                    fail     fail     fail     same
intel_pstate:run.sh                                    pass     pass     pass     same
iommu:iommufd                                          fail     fail     fail     same
iommu:iommufd_fail_nth                                 pass     pass     pass     same
ipc:msgque                                             pass     pass     pass     same
ir:ir_loopback.sh                                      skip     skip     skip     same
kcmp:kcmp_test                                         pass     pass     pass     same
kexec:test_kexec_file_load.sh                          skip     skip     skip     same
kexec:test_kexec_load.sh                               skip     skip     skip     same
kvm:access_tracking_perf_test                          pass     pass     pass     same
kvm:amx_test                                           fail     fail     fail     same
kvm:cpuid_test                                         fail     fail     fail     same
kvm:cr4_cpuid_sync_test                                fail     fail     fail     same
kvm:debug_regs                                         fail     fail     fail     same
kvm:demand_paging_test                                 pass     pass     pass     same
kvm:dirty_log_page_splitting_test                      fail     fail     fail     same
kvm:dirty_log_perf_test                                pass     pass     pass     same
kvm:dirty_log_test                                     fail     fail     fail     same
kvm:exit_on_emulation_failure_test                     fail     fail     fail     same
kvm:fix_hypercall_test                                 fail     fail     fail     same
kvm:get_msr_index_features                             fail     fail     fail     same
kvm:guest_memfd_test                                   pass     pass     pass     same
kvm:guest_print_test                                   pass     pass     pass     same
kvm:hardware_disable_test                              pass     pass     pass     same
kvm:hyperv_clock                                       fail     fail     fail     same
kvm:hyperv_cpuid                                       fail     fail     fail     same
kvm:hyperv_evmcs                                       fail     fail     fail     same
kvm:hyperv_extended_hypercalls                         fail     fail     fail     same
kvm:hyperv_features                                    fail     fail     fail     same
kvm:hyperv_ipi                                         fail     fail     fail     same
kvm:hyperv_svm_test                                    fail     fail     fail     same
kvm:hyperv_tlb_flush                                   fail     fail     fail     same
kvm:kvm_binary_stats_test                              pass     pass     pass     same
kvm:kvm_clock_test                                     fail     fail     fail     same
kvm:kvm_create_max_vcpus                               pass     pass     pass     same
kvm:kvm_page_table_test                                pass     pass     pass     same
kvm:kvm_pv_test                                        fail     fail     fail     same
kvm:max_guest_memory_test                              pass     pass     pass     same
kvm:max_vcpuid_cap_test                                fail     fail     fail     same
kvm:memslot_modification_stress_test                   pass     pass     pass     same
kvm:memslot_perf_test                                  pass     pass     pass     same
kvm:mmio_warning_test                                  fail     fail     fail     same
kvm:monitor_mwait_test                                 fail     fail     fail     same
kvm:nested_exceptions_test                             fail     fail     fail     same
kvm:nx_huge_pages_test.sh                              fail     fail     fail     same
kvm:platform_info_test                                 fail     fail     fail     same
kvm:pmu_event_filter_test                              fail     fail     fail     same
kvm:private_mem_conversions_test                       fail     fail     fail     same
kvm:private_mem_kvm_exits_test                         fail     fail     fail     same
kvm:recalc_apic_map_test                               fail     fail     fail     same
kvm:rseq_test                                          fail     fail     fail     same
kvm:set_boot_cpu_id                                    fail     fail     fail     same
kvm:set_memory_region_test                             pass     pass     pass     same
kvm:set_sregs_test                                     fail     fail     fail     same
kvm:sev_migrate_tests                                  fail     fail     fail     same
kvm:smaller_maxphyaddr_emulation_test                  fail     fail     fail     same
kvm:smm_test                                           fail     fail     fail     same
kvm:state_test                                         fail     fail     fail     same
kvm:steal_time                                         pass     pass     pass     same
kvm:svm_int_ctl_test                                   fail     fail     fail     same
kvm:svm_nested_shutdown_test                           fail     fail     fail     same
kvm:svm_nested_soft_inject_test                        fail     fail     fail     same
kvm:svm_vmcall_test                                    fail     fail     fail     same
kvm:sync_regs_test                                     fail     fail     fail     same
kvm:system_counter_offset_test                         pass     pass     pass     same
kvm:triple_fault_event_test                            fail     fail     fail     same
kvm:tsc_msrs_test                                      fail     fail     fail     same
kvm:tsc_scaling_sync                                   fail     fail     fail     same
kvm:ucna_injection_test                                fail     fail     fail     same
kvm:userspace_io_test                                  fail     fail     fail     same
kvm:userspace_msr_exit_test                            fail     fail     fail     same
kvm:vmx_apic_access_test                               fail     fail     fail     same
kvm:vmx_close_while_nested_test                        fail     fail     fail     same
kvm:vmx_dirty_log_test                                 fail     fail     fail     same
kvm:vmx_exception_with_invalid_guest_state             fail     fail     fail     same
kvm:vmx_invalid_nested_guest_state                     fail     fail     fail     same
kvm:vmx_msrs_test                                      fail     fail     fail     same
kvm:vmx_nested_tsc_scaling_test                        fail     fail     fail     same
kvm:vmx_pmu_caps_test                                  fail     fail     fail     same
kvm:vmx_preemption_timer_test                          fail     fail     fail     same
kvm:vmx_set_nested_state_test                          fail     fail     fail     same
kvm:vmx_tsc_adjust_test                                fail     fail     fail     same
kvm:xapic_ipi_test                                     fail     fail     fail     same
kvm:xapic_state_test                                   fail     fail     fail     same
kvm:xcr0_cpuid_test                                    fail     fail     fail     same
kvm:xen_shinfo_test                                    fail     fail     fail     same
kvm:xen_vmcall_test                                    fail     fail     fail     same
kvm:xss_msr_test                                       fail     fail     fail     same
landlock:base_test                                     fail     fail     fail     same
landlock:fs_test                                       fail     fail     fail     same
landlock:ptrace_test                                   fail     fail     fail     same
lib:bitmap.sh                                          skip     skip     skip     same
lib:prime_numbers.sh                                   pass     pass     pass     same
lib:printf.sh                                          skip     skip     skip     same
lib:scanf.sh                                           skip     skip     skip     same
lib:strscpy.sh                                         skip     skip     skip     same
livepatch:test-callbacks.sh                            pass     pass     pass     same
livepatch:test-ftrace.sh                               pass     pass     pass     same
livepatch:test-livepatch.sh                            pass     pass     pass     same
livepatch:test-shadow-vars.sh                          pass     pass     pass     same
livepatch:test-state.sh                                pass     pass     pass     same
livepatch:test-sysfs.sh                                pass     pass     pass     same
membarrier:membarrier_test_multi_thread                pass     pass     pass     same
membarrier:membarrier_test_single_thread               pass     pass     pass     same
memfd:memfd_test                                       pass     pass     pass     same
memfd:run_fuse_test.sh                                 pass     pass     pass     same
memfd:run_hugetlbfs_test.sh                            pass     pass     pass     same
memory-hotplug:mem-on-off-test.sh                      pass     pass     pass     same
mincore:mincore_selftest                               fail     fail     fail     same
mount:run_nosymfollow.sh                               pass     pass     pass     same
mount:run_unprivileged_remount.sh                      pass     pass     pass     same
mqueue:mq_open_tests                                   pass     pass     pass     same
mqueue:mq_perf_tests                                   pass     pass     pass     same
nci:nci_dev                                            fail     fail     fail     same
net/forwarding:bridge_locked_port.sh                   pass     pass     pass     same
net/forwarding:bridge_mdb.sh                           skip     skip     skip     same
net/forwarding:bridge_mdb_host.sh                      pass     pass     pass     same
net/forwarding:bridge_mdb_max.sh                       skip     skip     skip     same
net/forwarding:bridge_mdb_port_down.sh                 pass     pass     pass     same
net/forwarding:bridge_mld.sh                           pass     pass     pass     same
net/forwarding:bridge_port_isolation.sh                pass     pass     pass     same
net/forwarding:bridge_sticky_fdb.sh                    pass     pass     pass     same
net/forwarding:bridge_vlan_aware.sh                    pass     pass     pass     same
net/forwarding:bridge_vlan_mcast.sh                    pass     pass     pass     same
net/forwarding:bridge_vlan_unaware.sh                  pass     pass     pass     same
net/forwarding:custom_multipath_hash.sh                fail     fail     fail     same
net/forwarding:ethtool.sh                              skip     skip     skip     same
net/forwarding:ethtool_extended_state.sh               skip     skip     skip     same
net/forwarding:gre_custom_multipath_hash.sh            fail     fail     fail     same
net/forwarding:gre_inner_v4_multipath.sh               pass     pass     pass     same
net/forwarding:gre_multipath.sh                        pass     pass     pass     same
net/forwarding:gre_multipath_nh.sh                     fail     fail     fail     same
net/forwarding:gre_multipath_nh_res.sh                 fail     fail     fail     same
net/forwarding:hw_stats_l3.sh                          skip     skip     skip     same
net/forwarding:hw_stats_l3_gre.sh                      skip     skip     skip     same
net/forwarding:ip6_forward_instats_vrf.sh              skip     skip     skip     same
net/forwarding:ip6gre_custom_multipath_hash.sh         fail     fail     fail     same
net/forwarding:ip6gre_flat.sh                          pass     pass     pass     same
net/forwarding:ip6gre_flat_key.sh                      pass     pass     pass     same
net/forwarding:ip6gre_flat_keys.sh                     pass     pass     pass     same
net/forwarding:ip6gre_hier.sh                          pass     pass     pass     same
net/forwarding:ip6gre_hier_key.sh                      pass     pass     pass     same
net/forwarding:ip6gre_hier_keys.sh                     pass     pass     pass     same
net/forwarding:ip6gre_inner_v4_multipath.sh            pass     pass     pass     same
net/forwarding:ipip_flat_gre.sh                        pass     pass     pass     same
net/forwarding:ipip_flat_gre_key.sh                    pass     pass     pass     same
net/forwarding:ipip_flat_gre_keys.sh                   pass     pass     pass     same
net/forwarding:ipip_hier_gre.sh                        pass     pass     pass     same
net/forwarding:ipip_hier_gre_key.sh                    pass     pass     pass     same
net/forwarding:local_termination.sh                    skip     skip     skip     same
net/forwarding:loopback.sh                             skip     skip     skip     same
net/forwarding:mirror_gre.sh                           pass     pass     pass     same
net/forwarding:mirror_gre_bound.sh                     pass     pass     pass     same
net/forwarding:mirror_gre_bridge_1d.sh                 pass     pass     pass     same
net/forwarding:mirror_gre_bridge_1q.sh                 pass     pass     pass     same
net/forwarding:mirror_gre_bridge_1q_lag.sh             pass     pass     pass     same
net/forwarding:mirror_gre_changes.sh                   pass     pass     pass     same
net/forwarding:mirror_gre_flower.sh                    pass     pass     pass     same
net/forwarding:mirror_gre_lag_lacp.sh                  pass     pass     pass     same
net/forwarding:mirror_gre_neigh.sh                     pass     pass     pass     same
net/forwarding:mirror_gre_nh.sh                        pass     pass     pass     same
net/forwarding:mirror_gre_vlan.sh                      pass     pass     pass     same
net/forwarding:mirror_vlan.sh                          pass     pass     pass     same
net/forwarding:no_forwarding.sh                        pass     pass     pass     same
net/forwarding:pedit_dsfield.sh                        pass     pass     pass     same
net/forwarding:pedit_ip.sh                             pass     pass     pass     same
net/forwarding:pedit_l4port.sh                         pass     pass     pass     same
net/forwarding:q_in_vni_ipv6.sh                        pass     pass     pass     same
net/forwarding:router.sh                               skip     skip     skip     same
net/forwarding:router_bridge.sh                        pass     pass     pass     same
net/forwarding:router_bridge_1d.sh                     pass     pass     pass     same
net/forwarding:router_bridge_pvid_vlan_upper.sh        pass     pass     pass     same
net/forwarding:router_bridge_vlan.sh                   pass     pass     pass     same
net/forwarding:router_bridge_vlan_upper.sh             pass     pass     pass     same
net/forwarding:router_bridge_vlan_upper_pvid.sh        pass     pass     pass     same
net/forwarding:router_broadcast.sh                     pass     pass     pass     same
net/forwarding:router_mpath_nh.sh                      fail     fail     fail     same
net/forwarding:router_mpath_nh_res.sh                  pass     pass     pass     same
net/forwarding:router_multicast.sh                     skip     skip     skip     same
net/forwarding:router_multipath.sh                     fail     fail     fail     same
net/forwarding:router_nh.sh                            pass     pass     pass     same
net/forwarding:router_vid_1.sh                         pass     pass     pass     same
net/forwarding:skbedit_priority.sh                     pass     pass     pass     same
net/forwarding:tc_chains.sh                            pass     pass     pass     same
net/forwarding:tc_flower.sh                            pass     pass     pass     same
net/forwarding:tc_flower_cfm.sh                        fail     fail     fail     same
net/forwarding:tc_flower_l2_miss.sh                    fail     fail     fail     same
net/forwarding:tc_flower_router.sh                     pass     pass     pass     same
net/forwarding:tc_mpls_l2vpn.sh                        pass     pass     pass     same
net/forwarding:tc_shblocks.sh                          pass     pass     pass     same
net/forwarding:tc_tunnel_key.sh                        skip     skip     skip     same
net/forwarding:tc_vlan_modify.sh                       pass     pass     pass     same
net/forwarding:vxlan_asymmetric.sh                     pass     pass     pass     same
net/forwarding:vxlan_asymmetric_ipv6.sh                pass     pass     pass     same
net/forwarding:vxlan_bridge_1d.sh                      pass     pass     pass     same
net/forwarding:vxlan_bridge_1d_port_8472.sh            pass     pass     pass     same
net/forwarding:vxlan_bridge_1d_port_8472_ipv6.sh       pass     pass     pass     same
net/forwarding:vxlan_bridge_1q.sh                      pass     pass     pass     same
net/forwarding:vxlan_bridge_1q_ipv6.sh                 pass     pass     pass     same
net/forwarding:vxlan_bridge_1q_port_8472.sh            pass     pass     pass     same
net/forwarding:vxlan_bridge_1q_port_8472_ipv6.sh       pass     pass     pass     same
net/forwarding:vxlan_symmetric.sh                      pass     pass     pass     same
net/forwarding:vxlan_symmetric_ipv6.sh                 pass     pass     pass     same
net/hsr:hsr_ping.sh                                    fail     fail     fail     same
net/mptcp:diag.sh                                      pass     pass     pass     same
net/mptcp:mptcp_connect.sh                             pass     pass     pass     same
net/mptcp:mptcp_sockopt.sh                             pass     pass     pass     same
net/mptcp:pm_netlink.sh                                pass     pass     pass     same
net:altnames.sh                                        pass     pass     pass     same
net:bareudp.sh                                         pass     pass     pass     same
net:big_tcp.sh                                         skip     skip     skip     same
net:cmsg_so_mark.sh                                    pass     pass     pass     same
net:devlink_port_split.py                              skip     skip     skip     same
net:drop_monitor_tests.sh                              skip     skip     skip     same
net:fcnal-test.sh                                      skip     skip     skip     same
net:fib-onlink-tests.sh                                pass     pass     pass     same
net:fib_nexthop_multiprefix.sh                         pass     pass     pass     same
net:fib_nexthop_nongw.sh                               pass     pass     pass     same
net:fib_rule_tests.sh                                  pass     pass     pass     same
net:fib_tests.sh                                       fail     fail     fail     same
net:fin_ack_lat.sh                                     pass     pass     pass     same
net:gre_gso.sh                                         pass     pass     pass     same
net:icmp.sh                                            fail     fail     fail     same
net:icmp_redirect.sh                                   pass     pass     pass     same
net:io_uring_zerocopy_tx.sh                            fail     fail     fail     same
net:ip6_gre_headroom.sh                                pass     pass     pass     same
net:ipv6_flowlabel.sh                                  pass     pass     pass     same
net:l2_tos_ttl_inherit.sh                              skip     skip     skip     same
net:l2tp.sh                                            pass     pass     pass     same
net:msg_zerocopy.sh                                    pass     pass     pass     same
net:netdevice.sh                                       pass     pass     pass     same
net:pmtu.sh                                            fail     fail     fail     same
net:psock_snd.sh                                       pass     pass     pass     same
net:reuseaddr_conflict                                 pass     pass     pass     same
net:reuseaddr_ports_exhausted.sh                       pass     pass     pass     same
net:reuseport_bpf                                      pass     pass     pass     same
net:reuseport_bpf_cpu                                  pass     pass     pass     same
net:reuseport_bpf_numa                                 pass     pass     pass     same
net:reuseport_dualstack                                pass     pass     pass     same
net:route_localnet.sh                                  pass     pass     pass     same
net:rps_default_mask.sh                                pass     pass     pass     same
net:rtnetlink.sh                                       skip     skip     skip     same
net:run_afpackettests                                  pass     pass     pass     same
net:run_netsocktests                                   pass     pass     pass     same
net:rxtimestamp.sh                                     pass     pass     pass     same
net:so_txtime.sh                                       pass     pass     pass     same
net:srv6_end_next_csid_l3vpn_test.sh                   pass     pass     pass     same
net:srv6_hencap_red_l3vpn_test.sh                      pass     pass     pass     same
net:srv6_hl2encap_red_l2vpn_test.sh                    pass     pass     pass     same
net:stress_reuseport_listen.sh                         pass     pass     pass     same
net:tcp_fastopen_backup_key.sh                         pass     pass     pass     same
net:test_blackhole_dev.sh                              fail     fail     fail     same
net:test_bpf.sh                                        pass     pass     pass     same
net:test_bridge_neigh_suppress.sh                      skip     skip     skip     same
net:test_vxlan_fdb_changelink.sh                       pass     pass     pass     same
net:test_vxlan_under_vrf.sh                            pass     pass     pass     same
net:tls                                                pass     pass     pass     same
net:traceroute.sh                                      pass     pass     pass     same
net:udpgro.sh                                          fail     fail     fail     same
net:udpgro_bench.sh                                    fail     fail     fail     same
net:udpgso.sh                                          pass     pass     pass     same
net:unicast_extensions.sh                              pass     pass     pass     same
net:veth.sh                                            fail     fail     fail     same
net:vrf-xfrm-tests.sh                                  pass     pass     pass     same
net:vrf_route_leaking.sh                               pass     pass     pass     same
net:vrf_strict_mode_test.sh                            pass     pass     pass     same
netfilter:bridge_brouter.sh                            skip     skip     skip     same
netfilter:conntrack_icmp_related.sh                    fail     fail     fail     same
netfilter:conntrack_tcp_unreplied.sh                   pass     pass     pass     same
netfilter:conntrack_vrf.sh                             pass     pass     pass     same
netfilter:ipvs.sh                                      pass     pass     pass     same
netfilter:nf_nat_edemux.sh                             fail     fail     fail     same
netfilter:nft_audit.sh                                 fail     fail     fail     same
netfilter:nft_concat_range.sh                          fail     fail     fail     same
netfilter:nft_conntrack_helper.sh                      skip     skip     skip     same
netfilter:nft_fib.sh                                   skip     skip     skip     same
netfilter:nft_flowtable.sh                             fail     fail     fail     same
netfilter:nft_meta.sh                                  pass     pass     pass     same
netfilter:nft_nat.sh                                   skip     skip     skip     same
netfilter:nft_queue.sh                                 skip     skip     skip     same
netfilter:rpath.sh                                     pass     pass     pass     same
nsfs:owner                                             pass     pass     pass     same
nsfs:pidns                                             pass     pass     pass     same
pid_namespace:regression_enomem                        pass     pass     pass     same
pidfd:pidfd_fdinfo_test                                pass     pass     pass     same
pidfd:pidfd_getfd_test                                 pass     pass     pass     same
pidfd:pidfd_open_test                                  pass     pass     pass     same
pidfd:pidfd_poll_test                                  pass     pass     pass     same
pidfd:pidfd_setns_test                                 pass     pass     pass     same
pidfd:pidfd_test                                       pass     pass     pass     same
pidfd:pidfd_wait                                       pass     pass     pass     same
proc:fd-001-lookup                                     pass     pass     pass     same
proc:fd-002-posix-eq                                   pass     pass     pass     same
proc:fd-003-kthread                                    pass     pass     pass     same
proc:proc-fsconfig-hidepid                             pass     pass     pass     same
proc:proc-loadavg-001                                  pass     pass     pass     same
proc:proc-multiple-procfs                              pass     pass     pass     same
proc:proc-self-map-files-001                           pass     pass     pass     same
proc:proc-self-map-files-002                           pass     pass     pass     same
proc:proc-self-syscall                                 pass     pass     pass     same
proc:proc-self-wchan                                   pass     pass     pass     same
proc:proc-subset-pid                                   pass     pass     pass     same
proc:proc-uptime-002                                   pass     pass     pass     same
proc:read                                              pass     pass     pass     same
proc:self                                              pass     pass     pass     same
proc:setns-dcache                                      pass     pass     pass     same
proc:setns-sysvipc                                     pass     pass     pass     same
proc:thread-self                                       pass     pass     pass     same
pstore:pstore_post_reboot_tests                        skip     skip     skip     same
pstore:pstore_tests                                    fail     fail     fail     same
ptrace:get_syscall_info                                pass     pass     pass     same
ptrace:peeksiginfo                                     pass     pass     pass     same
ptrace:vmaccess                                        fail     fail     fail     same
rlimits:rlimits-per-userns                             pass     pass     pass     same
rseq:basic_percpu_ops_test                             pass     pass     pass     same
rseq:basic_test                                        pass     pass     pass     same
rseq:param_test                                        pass     pass     pass     same
rseq:param_test_benchmark                              pass     pass     pass     same
rseq:param_test_compare_twice                          pass     pass     pass     same
rseq:run_param_test.sh                                 pass     pass     pass     same
seccomp:seccomp_benchmark                              pass     pass     pass     same
seccomp:seccomp_bpf                                    pass     pass     pass     same
sgx:test_sgx                                           fail     fail     fail     same
sigaltstack:sas                                        pass     pass     pass     same
size:get_size                                          pass     pass     pass     same
splice:default_file_splice_read.sh                     pass     pass     pass     same
splice:short_splice_read.sh                            fail     fail     fail     same
static_keys:test_static_keys.sh                        skip     skip     skip     same
syscall_user_dispatch:sud_benchmark                    pass     pass     pass     same
syscall_user_dispatch:sud_test                         pass     pass     pass     same
tc-testing:tdc.sh                                      fail     fail     fail     same
tdx:tdx_guest_test                                     fail     fail     fail     same
timens:clock_nanosleep                                 pass     pass     pass     same
timens:exec                                            pass     pass     pass     same
timens:futex                                           pass     pass     pass     same
timens:procfs                                          pass     pass     pass     same
timens:timens                                          pass     pass     pass     same
timens:timer                                           pass     pass     pass     same
timens:timerfd                                         pass     pass     pass     same
timens:vfork_exec                                      pass     pass     pass     same
timers:inconsistency-check                             pass     pass     pass     same
timers:mqueue-lat                                      pass     pass     pass     same
timers:nanosleep                                       pass     pass     pass     same
timers:nsleep-lat                                      pass     pass     pass     same
timers:posix_timers                                    pass     pass     pass     same
timers:rtcpie                                          pass     pass     pass     same
timers:set-timer-lat                                   pass     pass     pass     same
timers:threadtest                                      pass     pass     pass     same
tmpfs:bug-link-o-tmpfile                               pass     pass     pass     same
tpm2:test_smoke.sh                                     skip     skip     skip     same
tpm2:test_space.sh                                     skip     skip     skip     same
tty:tty_tstamp_update                                  skip     skip     skip     same
vDSO:vdso_standalone_test_x86                          pass     pass     pass     same
vDSO:vdso_test_abi                                     pass     pass     pass     same
vDSO:vdso_test_clock_getres                            pass     pass     pass     same
vDSO:vdso_test_correctness                             pass     pass     pass     same
vDSO:vdso_test_getcpu                                  pass     pass     pass     same
vDSO:vdso_test_gettimeofday                            pass     pass     pass     same
x86:amx_64                                             fail     fail     fail     same
x86:check_initial_reg_state_64                         fail     fail     fail     same
x86:corrupt_xstate_header_64                           fail     fail     fail     same
x86:fsgsbase_64                                        fail     fail     fail     same
x86:fsgsbase_restore_64                                fail     fail     fail     same
x86:ioperm_64                                          fail     fail     fail     same
x86:iopl_64                                            fail     fail     fail     same
x86:lam_64                                             fail     fail     fail     same
x86:mov_ss_trap_64                                     fail     fail     fail     same
x86:sigaltstack_64                                     fail     fail     fail     same
x86:sigreturn_64                                       fail     fail     fail     same
x86:single_step_syscall_64                             fail     fail     fail     same
x86:syscall_arg_fault_64                               fail     fail     fail     same
x86:syscall_nt_64                                      fail     fail     fail     same
x86:syscall_numbering_64                               fail     fail     fail     same
x86:sysret_rip_64                                      fail     fail     fail     same
x86:sysret_ss_attrs_64                                 fail     fail     fail     same
x86:test_mremap_vdso_64                                fail     fail     fail     same
x86:test_vsyscall_64                                   fail     fail     fail     same
zram:zram.sh                                           pass     pass     pass     same

jira VULN-180164
cve CVE-2026-31402
commit-author Jeff Layton <jlayton@kernel.org>
commit 5133b61
upstream-diff Used `post_err_offset' instead of `op_status_offset +
  XDR_UNIT' in the `read_bytes_from_xdr_buf()' call, as the LTS 9.4
  version is missing ef3675b ("NFSD:
  Encode COMPOUND operation status on page boundaries")

The NFSv4.0 replay cache uses a fixed 112-byte inline buffer
(rp_ibuf[NFSD4_REPLAY_ISIZE]) to store encoded operation responses.
This size was calculated based on OPEN responses and does not account
for LOCK denied responses, which include the conflicting lock owner as
a variable-length field up to 1024 bytes (NFS4_OPAQUE_LIMIT).

When a LOCK operation is denied due to a conflict with an existing lock
that has a large owner, nfsd4_encode_operation() copies the full encoded
response into the undersized replay buffer via read_bytes_from_xdr_buf()
with no bounds check. This results in a slab-out-of-bounds write of up
to 944 bytes past the end of the buffer, corrupting adjacent heap memory.

This can be triggered remotely by an unauthenticated attacker with two
cooperating NFSv4.0 clients: one sets a lock with a large owner string,
then the other requests a conflicting lock to provoke the denial.

We could fix this by increasing NFSD4_REPLAY_ISIZE to allow for a full
opaque, but that would increase the size of every stateowner, when most
lockowners are not that large.

Instead, fix this by checking the encoded response length against
NFSD4_REPLAY_ISIZE before copying into the replay buffer. If the
response is too large, set rp_buflen to 0 to skip caching the replay
payload. The status is still cached, and the client already received the
correct response on the original request.

Fixes: 1da177e ("Linux-2.6.12-rc2")
	Cc: stable@kernel.org
	Reported-by: Nicholas Carlini <npc@anthropic.com>
	Tested-by: Nicholas Carlini <npc@anthropic.com>
	Signed-off-by: Jeff Layton <jlayton@kernel.org>
	Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
(cherry picked from commit 5133b61)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-8574
cve CVE-2024-47727
commit-author Alexey Gladkov (Intel) <legion@kernel.org>
commit d4fc4d0
upstream-diff Context conflicts in header files inclusion only

TDX only supports kernel-initiated MMIO operations. The handle_mmio()
function checks if the #VE exception occurred in the kernel and rejects
the operation if it did not.

However, userspace can deceive the kernel into performing MMIO on its
behalf. For example, if userspace can point a syscall to an MMIO address,
syscall does get_user() or put_user() on it, triggering MMIO #VE. The
kernel will treat the #VE as in-kernel MMIO.

Ensure that the target MMIO address is within the kernel before decoding
instruction.

Fixes: 31d58c4 ("x86/tdx: Handle in-kernel MMIO")
	Signed-off-by: Alexey Gladkov (Intel) <legion@kernel.org>
	Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
	Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
	Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
	Cc:stable@vger.kernel.org
Link: https://lore.kernel.org/all/565a804b80387970460a4ebc67c88d1380f61ad1.1726237595.git.legion%40kernel.org
(cherry picked from commit d4fc4d0)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-71839
cve CVE-2025-38129
commit-author Dong Chenchen <dongchenchen2@huawei.com>
commit 271683b
upstream-diff |
  page_pool_recycle_in_ring()
        Accounted for the non-backported
        4dec64c ("page_pool: convert to
        use netmem")
  page_pool_release()
        (The following were the context conflicts, no actual diffs from
        the upstream in the strict sense)
        - Retained the single-argument `page_pool_inflight()' call instead
          of passing additional `true' as it is in the upstream. The
          boolean argument relates to the reporting feature introduced in
          the non-backported commit
          7aee842 ("net: page_pool:
          report amount of memory held by page pools").
        - LTS 9.4 lacks the backport of
          de97502 ("page_pool: introduce
          page_pool_alloc() API"). Without it the `__page_pool_destroy()'
          call in upstream is equivalent to `page_pool_free()' in
          ciqlts9_4. Retained the ciqlts9_4-native `page_pool_free()'
          call.

syzbot reported a uaf in page_pool_recycle_in_ring:

BUG: KASAN: slab-use-after-free in lock_release+0x151/0xa30 kernel/locking/lockdep.c:5862
Read of size 8 at addr ffff8880286045a0 by task syz.0.284/6943

CPU: 0 UID: 0 PID: 6943 Comm: syz.0.284 Not tainted 6.13.0-rc3-syzkaller-gdfa94ce54f41 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0x169/0x550 mm/kasan/report.c:489
 kasan_report+0x143/0x180 mm/kasan/report.c:602
 lock_release+0x151/0xa30 kernel/locking/lockdep.c:5862
 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:165 [inline]
 _raw_spin_unlock_bh+0x1b/0x40 kernel/locking/spinlock.c:210
 spin_unlock_bh include/linux/spinlock.h:396 [inline]
 ptr_ring_produce_bh include/linux/ptr_ring.h:164 [inline]
 page_pool_recycle_in_ring net/core/page_pool.c:707 [inline]
 page_pool_put_unrefed_netmem+0x748/0xb00 net/core/page_pool.c:826
 page_pool_put_netmem include/net/page_pool/helpers.h:323 [inline]
 page_pool_put_full_netmem include/net/page_pool/helpers.h:353 [inline]
 napi_pp_put_page+0x149/0x2b0 net/core/skbuff.c:1036
 skb_pp_recycle net/core/skbuff.c:1047 [inline]
 skb_free_head net/core/skbuff.c:1094 [inline]
 skb_release_data+0x6c4/0x8a0 net/core/skbuff.c:1125
 skb_release_all net/core/skbuff.c:1190 [inline]
 __kfree_skb net/core/skbuff.c:1204 [inline]
 sk_skb_reason_drop+0x1c9/0x380 net/core/skbuff.c:1242
 kfree_skb_reason include/linux/skbuff.h:1263 [inline]
 __skb_queue_purge_reason include/linux/skbuff.h:3343 [inline]

root cause is:

page_pool_recycle_in_ring
  ptr_ring_produce
    spin_lock(&r->producer_lock);
    WRITE_ONCE(r->queue[r->producer++], ptr)
      //recycle last page to pool
				page_pool_release
				  page_pool_scrub
				    page_pool_empty_ring
				      ptr_ring_consume
				      page_pool_return_page  //release all page
				  __page_pool_destroy
				     free_percpu(pool->recycle_stats);
				     free(pool) //free

     spin_unlock(&r->producer_lock); //pool->ring uaf read
  recycle_stat_inc(pool, ring);

page_pool can be free while page pool recycle the last page in ring.
Add producer-lock barrier to page_pool_release to prevent the page
pool from being free before all pages have been recycled.

recycle_stat_inc() is empty when CONFIG_PAGE_POOL_STATS is not
enabled, which will trigger Wempty-body build warning. Add definition
for pool stat macro to fix warning.

	Suggested-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/netdev/20250513083123.3514193-1-dongchenchen2@huawei.com
Fixes: ff7d6b2 ("page_pool: refurbish version of page_pool code")
	Reported-by: syzbot+204a4382fcb3311f3858@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=204a4382fcb3311f3858
	Signed-off-by: Dong Chenchen <dongchenchen2@huawei.com>
	Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
	Reviewed-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20250527114152.3119109-1-dongchenchen2@huawei.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 271683b)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
@pvts-mat pvts-mat force-pushed the ciqlts9_4-CVE-batch-30 branch from edba3df to 466298b Compare April 27, 2026 15:13
@github-actions
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown

🔍 Interdiff Analysis

  • ⚠️ PR commit ad1119683fc (nfsd: fix heap overflow in NFSv4.0 LOCK replay cache) → upstream 5133b61aaf43
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -5441,10 +5441,8 @@
 		int len = xdr->buf->len - post_err_offset;
 
 		so->so_replay.rp_status = op->status;
-		if (len <= NFSD4_REPLAY_ISIZE) {
-			so->so_replay.rp_buflen = len;
-			read_bytes_from_xdr_buf(xdr->buf,
-						post_err_offset,
+		so->so_replay.rp_buflen = len;
+		read_bytes_from_xdr_buf(xdr->buf, post_err_offset,
 						so->so_replay.rp_buf, len);
 		} else {
 			so->so_replay.rp_buflen = 0;

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -6281,8 +6281,10 @@
 		int len = xdr->buf->len - (op_status_offset + XDR_UNIT);
 
 		so->so_replay.rp_status = op->status;
-		so->so_replay.rp_buflen = len;
-		read_bytes_from_xdr_buf(xdr->buf, op_status_offset + XDR_UNIT,
+		if (len <= NFSD4_REPLAY_ISIZE) {
+			so->so_replay.rp_buflen = len;
+			read_bytes_from_xdr_buf(xdr->buf,
+						op_status_offset + XDR_UNIT,
 						so->so_replay.rp_buf, len);
 	}
 status:

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -5438,8 +5439,8 @@
 
 		so->so_replay.rp_status = op->status;
 		so->so_replay.rp_buflen = len;
-		read_bytes_from_xdr_buf(xdr->buf, post_err_offset,
+		read_bytes_from_xdr_buf(xdr->buf, op_status_offset + XDR_UNIT,
 						so->so_replay.rp_buf, len);
 	}
 status:
-	*p = op->status;
+	op->status = nfsd4_map_status(op->status,
  • ⚠️ PR commit 6c4c9fee675 (x86/tdx: Fix "in-kernel MMIO" check) → upstream d4fc4d014715
    Differences found:
################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/arch/x86/coco/tdx/tdx.c
+++ b/arch/x86/coco/tdx/tdx.c
@@ -16,6 +16,7 @@
 #include <asm/insn-eval.h>
 #include <asm/pgtable.h>
 #include <asm/set_memory.h>
+#include <asm/traps.h>
 
 /* MMIO direction */
 #define EPT_READ	0

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/arch/x86/coco/tdx/tdx.c
+++ b/arch/x86/coco/tdx/tdx.c
@@ -12,5 +11,6 @@
 #include <asm/insn-eval.h>
 #include <asm/pgtable.h>
+#include <asm/set_memory.h>
 
 /* MMIO direction */
 #define EPT_READ	0
  • ⚠️ PR commit 466298bc2e3 (page_pool: Fix use-after-free in page_pool_recycle_in_ring) → upstream 271683bb2cf3
    Differences found:
================================================================================
*    DELTA DIFFERENCES - code changes that differ between the patches          *
================================================================================

--- b/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -553,11 +553,16 @@
 
 static bool page_pool_recycle_in_ring(struct page_pool *pool, struct page *page)
 {
-	bool in_softirq, ret;
+	int ret;
+	/* BH protection not needed if current is softirq */
+	if (in_softirq())
+		ret = ptr_ring_produce(&pool->ring, page);
+	else
+		ret = ptr_ring_produce_bh(&pool->ring, page);
 
 	/* BH protection not needed if current is softirq */
 	in_softirq = page_pool_producer_lock(pool);
-	ret = !__ptr_ring_produce(&pool->ring, page);
+	ret = !__ptr_ring_produce(&pool->ring, (__force void *)netmem);
 	if (ret)
 		recycle_stat_inc(pool, ring);
 	page_pool_producer_unlock(pool, in_softirq);

################################################################################
!    REJECTED PATCH2 HUNKS - could not be compared; manual review needed       !
################################################################################

--- b/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -741,12 +741,7 @@
 
 static bool page_pool_recycle_in_ring(struct page_pool *pool, netmem_ref netmem)
 {
-	int ret;
-	/* BH protection not needed if current is softirq */
-	if (in_softirq())
-		ret = ptr_ring_produce(&pool->ring, (__force void *)netmem);
-	else
-		ret = ptr_ring_produce_bh(&pool->ring, (__force void *)netmem);
+	bool in_softirq, ret;
 
 	if (!ret) {
 		recycle_stat_inc(pool, ring);
@@ -1156,6 +1154,9 @@
 
 	page_pool_scrub(pool);
 	inflight = page_pool_inflight(pool, true);
+	/* Acquire producer lock to make sure producers have exited. */
+	in_softirq = page_pool_producer_lock(pool);
+	page_pool_producer_unlock(pool, in_softirq);
 	if (!inflight)
 		__page_pool_destroy(pool);
 

================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -550,12 +563,12 @@
 
-static bool page_pool_recycle_in_ring(struct page_pool *pool, struct page *page)
+static bool page_pool_recycle_in_ring(struct page_pool *pool, netmem_ref netmem)
 {
 	int ret;
 	/* BH protection not needed if current is softirq */
 	if (in_softirq())
-		ret = ptr_ring_produce(&pool->ring, page);
+		ret = ptr_ring_produce(&pool->ring, (__force void *)netmem);
 	else
-		ret = ptr_ring_produce_bh(&pool->ring, page);
+		ret = ptr_ring_produce_bh(&pool->ring, (__force void *)netmem);
 
 	if (!ret) {
 		recycle_stat_inc(pool, ring);
@@ -856,5 +1044,5 @@
 	page_pool_scrub(pool);
-	inflight = page_pool_inflight(pool);
+	inflight = page_pool_inflight(pool, true);
 	if (!inflight)
-		page_pool_free(pool);
+		__page_pool_destroy(pool);

This is an automated interdiff check for backported commits.

@github-actions
Copy link
Copy Markdown

JIRA PR Check Results

3 commit(s) with issues found:

Commit 466298bc2e36

Summary: page_pool: Fix use-after-free in page_pool_recycle_in_ring

❌ Errors:

  • VULN-71839: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-71839: No time logged - please log time manually

Commit 6c4c9fee6754

Summary: x86/tdx: Fix "in-kernel MMIO" check

❌ Errors:

  • VULN-8574: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-8574: No time logged - please log time manually

Commit ad1119683fcd

Summary: nfsd: fix heap overflow in NFSv4.0 LOCK replay cache

❌ Errors:

  • VULN-180164: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-180164: No time logged - please log time manually

Summary: Checked 3 commit(s) total.

@github-actions
Copy link
Copy Markdown

Validation checks completed with issues View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/25021761943

Copy link
Copy Markdown
Collaborator

@shreeya-patel98 shreeya-patel98 left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants