Linux/linux 3aa1dcadrivers/net/wireless/mediatek/mt76 dma.c

Revert "wifi: mt76: Disable napi when removing device"

This reverts commit 13b7e6a96a005c656d38f3da51581deaf9866375.

That commit made mt76_dma_cleanup() disable every RX NAPI instance before
deleting it, to silence WARNs in __netif_napi_del_locked() and
page_pool_disable_direct_recycling() seen when unloading mt7915e with an
MT7916.

On mt7921e and mt7925e the same instances are already disabled earlier,
in mt7921e_unregister_device() and mt7925e_unregister_device(), which
only afterwards call mt792x_dma_cleanup() -> mt76_dma_cleanup().  Each
instance is therefore disabled twice, and napi_disable() is not
idempotent: on return it leaves NAPIF_STATE_SCHED and NAPIF_STATE_NPSVC
set, so the second call spins in usleep_range() forever, waiting for bits
that nobody will clear.

mt7921_pci_shutdown() and mt7925_pci_shutdown() reuse the remove path, so
this is hit on every reboot, poweroff and module unload.  It is silent:

    [49 lines not shown]
DeltaFile
+1-4drivers/net/wireless/mediatek/mt76/dma.c
+1-41 files

Linux/linux e14aacedrivers/net/ethernet/broadcom/bnxt bnxt.c, net/l2tp l2tp_ppp.c

Merge tag 'net-7.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Paolo Abeni:
 "Including fixes from netfilter.

  There is a known WiFi/mt76 regression, waiting for a complete fix that
  should land soonish.

  Previous releases - regressions:

   - tcp: fix icsk_ack.ato bitfield overflow

   - af_unix: Unlink scc_entry in unix_del_edge()

   - ipv4: fix use-after-free in fib_nhc_update_mtu()

   - netfilter:
      - ipset: fix refcount race between list:set GC and swap
      - nf_tables_offload: suppress WARN_ON_ONCE for ENOMEM in abort

    [50 lines not shown]
DeltaFile
+88-44net/netfilter/nf_conntrack_proto_tcp.c
+88-41drivers/net/ethernet/broadcom/bnxt/bnxt.c
+66-15net/netfilter/ipvs/ip_vs_ctl.c
+65-10tools/testing/selftests/net/tls.c
+75-0net/sctp/auth.c
+53-3net/l2tp/l2tp_ppp.c
+435-11370 files not shown
+893-32676 files

Linux/linux 83a4f90drivers/firewire ohci.c

Merge tag 'firewire-fixes-7.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394

Pull firewire fix from Takashi Sakamoto:
 "Fix a NULL pointer dereference in 1394 OHCI PCI driver when probe()
  returns early with an error, as detected by Syzkaller"

* tag 'firewire-fixes-7.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: ohci: fix NULL pointer dereference in ar_context_release
DeltaFile
+3-1drivers/firewire/ohci.c
+3-11 files

Linux/linux b4f5144drivers/gpio gpio-sloppy-logic-analyzer.c gpiolib.c

Merge tag 'gpio-fixes-for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - use raw_spinlock_t in gpio-ml-ioh to avoid locking context issues

 - fix a race condition in gpio-ml-ioh by sharing the register locks
   across channels

 - fix a use-after-free bug in unbind path in gpio-sloppy-logic-analyzer

* tag 'gpio-fixes-for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: sloppy-logic-analyzer: fix use-after-free via debugfs trigger on unbind
  gpio: ml-ioh: share the register lock across channels
  gpio: ml-ioh: use raw_spinlock_t for the register lock
  gpiolib: Check gc->get_direction() before calling gpiod_get_direction()
DeltaFile
+38-33drivers/gpio/gpio-ml-ioh.c
+2-1drivers/gpio/gpiolib.c
+1-1drivers/gpio/gpio-sloppy-logic-analyzer.c
+41-353 files

Linux/linux 64dc3baarch/m68k Kconfig.cpu

Merge tag 'm68k-for-v7.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

Pull m68k fix from Geert Uytterhoeven:
 "Define NR_CPUS to 1.

  This fixes a long-standing but never critical before oddity on m68k,
  that turned into a serious configuration issue after a recent erofs
  change"

* tag 'm68k-for-v7.2-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Define NR_CPUS to 1
DeltaFile
+4-0arch/m68k/Kconfig.cpu
+4-01 files

Linux/linux 42d217adrivers/firewire ohci.c

firewire: ohci: fix NULL pointer dereference in ar_context_release

During the error handling path of the driver's probe function, a NULL
pointer dereference can occur in ar_context_release().

When pci_probe() fails early (e.g., if pcim_enable_device() or MMIO mapping
fails), the devres cleanup mechanism invokes release_ohci(). This function
unconditionally calls ar_context_release() to clean up the asynchronous
receive contexts. However, if ar_context_init() was not yet called,
ctx->ohci remains NULL (as the fw_ohci structure is zero-initialized by
devres_alloc()).

ar_context_release() immediately dereferences ctx->ohci to get the dev
pointer before checking if the context was actually initialized, leading to
a crash:

Oops: general protection fault, probably for non-canonical address
0xdffffc0000000001: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]

    [21 lines not shown]
DeltaFile
+3-1drivers/firewire/ohci.c
+3-11 files

Linux/linux 9006c11net/l2tp l2tp_debugfs.c l2tp_ppp.c

l2tp: fix tunnel and session refcount leak on seq_file release

In pppol2tp_proc_open() and l2tp_dfs_seq_open(), iteration state
(pd->tunnel and pd->session) is kept in seq_file private data to allow
iteration across multiple read() system calls.

However, if userspace closes /proc/net/pppol2tp or /sys/kernel/debug/l2tp/tunnels
before reading to end-of-file (EOF), any tunnel or session reference stored in
pd->tunnel / pd->session is left un-dropped when seq_file private data is freed.

Fix this by dropping any remaining pd->tunnel and pd->session references in
pppol2tp_proc_release() and l2tp_dfs_seq_release() when closing the file.

Fixes: 0e0c3fee3a59 ("l2tp: hold reference on tunnels printed in pppol2tp proc file")
Fixes: f726214d9b23 ("l2tp: hold reference on tunnels printed in l2tp/tunnels debugfs file")
Reported-by: syzbot+d6fa74e3f19d6ee01e3a at syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/6a760f32.01d0871a.3a0d52.004f.GAE@google.com/T/#u
Assisted-by: Jetski:Gemini-3.1-Pro
Cc: James Chapman <jchapman at katalix.com>

    [4 lines not shown]
DeltaFile
+53-3net/l2tp/l2tp_ppp.c
+4-0net/l2tp/l2tp_debugfs.c
+57-32 files

Linux/linux 120977enet/sched cls_bpf.c

net/sched: cls_bpf: reject dev-bound programs bound to a different device

cls_bpf_prog_from_efd() obtained a SCHED_CLS program via
bpf_prog_get_type_dev() but never verified that a device-bound (offloaded)
program's bound netdev matches the TC netdev the classifier is being
attached to. This let a program loaded with prog_ifindex for device A be
attached via cls_bpf + skip_sw to device B; deleting device A then
destroyed the program's offload state while it was still attached to
device B, triggering a netdevsim WARN (panic with panic_on_warn=1).

Mirror the XDP attach path (net/core/dev.c) and reject the attach with
-EINVAL when a dev-bound program's bound device does not match the
target device.

Fixes: 2b3486bc2d23 ("bpf: Introduce device-bound XDP programs")
Reported-by: vega at nebusec.ai
Tested-by: Victor Nogueira <victor at mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs at mojatatu.com>
Acked-by: Daniel Borkmann <daniel at iogearbox.net>

    [2 lines not shown]
DeltaFile
+16-2net/sched/cls_bpf.c
+16-21 files

Linux/linux 2bb155edrivers/net/ovpn peer.c tcp.c

Merge tag 'ovpn-net-20260809' of https://github.com/OpenVPN/ovpn-net-next

Antonio Quartulli says:

====================
Included fixes:

* release key slot crypto transforms from a workqueue rather than an RCU
  callback, because crypto_free_aead() may sleep with async or hardware
  implementations
* run all deferred ovpn work on a module-owned workqueue and drain it on
  module exit, so no work item can still be executing module text after
  the module is unloaded
* finish crypto callback cleanup (key slot release and leftover skb)
  before dropping the peer reference that gates netdev unregistration
  and module removal
* avoid dereferencing a NULL key slot when userspace asks to kill a key
  that is not installed on the peer


    [10 lines not shown]
DeltaFile
+11-15drivers/net/ovpn/crypto.c
+14-5drivers/net/ovpn/crypto_aead.c
+18-1drivers/net/ovpn/main.c
+5-5drivers/net/ovpn/io.c
+4-5drivers/net/ovpn/tcp.c
+4-4drivers/net/ovpn/peer.c
+56-353 files not shown
+63-379 files

Linux/linux 8c283e7net/sctp associola.c sm_statefuns.c

sctp: fix use-after-free of cached ASCONF chunk

addip_last_asconf caches the outstanding outbound ASCONF chunk. The normal
ASCONF-ACK completion path releases the chunk and clears the pointer.

However, sctp_asconf_queue_teardown() releases the cached chunk without
clearing addip_last_asconf. During peer restart handling,
sctp_sf_do_dupcook_a() queues SCTP_CMD_PURGE_ASCONF_QUEUE, which invokes
sctp_asconf_queue_teardown() while the association remains alive and leaves
the pointer dangling.

A delayed authenticated ASCONF-ACK can then reach sctp_sf_do_asconf_ack(),
which accesses the stale chunk and passes it to sctp_process_asconf_ack(),
causing a use-after-free and a second release.

Clearing the pointer exposes a race with T4 expiry. Peer restart handling
queues the timer stop before the purge, but SCTP_CMD_TIMER_STOP uses
timer_delete(), which does not wait for a callback already running on
another CPU. Such a callback can reach sctp_sf_t4_timer_expire() after

    [13 lines not shown]
DeltaFile
+5-1net/sctp/sm_statefuns.c
+3-1net/sctp/associola.c
+8-22 files

Linux/linux 36a05d2drivers/net/ethernet/ti am65-cpsw-nuss.c

net: ethernet: ti: am65-cpsw-nuss: Fix port_id extraction from SRC TAG

On the packet reception path, the ID of the MAC Port on which the packet
was received, is embedded in the RX DMA Descriptor's metadata. The ID is
extracted using the helper function cppi5_desc_get_tags_ids() which fills
in the 16-bit Source Tag into the 'port_id' variable. However, it is only
the lower 8-bits of the 16-bit Source Tag that represent the MAC Port ID,
while the upper 8-bits are Hardware-Reserved and carry an arbitrary value.
With the existing logic, sporadic kernel crash is observed due to the
subsequent driver code accessing out-of-bound memory because of an invalid
port_id.

Hence, fix the port_id extraction logic to use only the lower 8-bits of the
Source Tag as the MAC Port ID.

Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Signed-off-by: Siddharth Vadapalli <s-vadapalli at ti.com>
Reviewed-by: Chintan Vankar <c-vankar at ti.com>
Reviewed-by: Simon Horman <horms at kernel.org>

    [2 lines not shown]
DeltaFile
+2-0drivers/net/ethernet/ti/am65-cpsw-nuss.c
+2-01 files

Linux/linux beb33f8net/sctp associola.c

sctp: clear new_transport when removing a peer

sctp_process_asconf_param() stores a newly added peer transport in
asoc->new_transport. After all parameters in the ASCONF chunk have been
processed, sctp_sf_do_asconf() uses this pointer to send a HEARTBEAT to the
new transport.

An authenticated ASCONF from a remote SCTP peer can add a transport and
remove it again with a wildcard DEL-IP parameter in the same chunk. The
wildcard deletion preserves the transport on which the ASCONF arrived, but
removes the newly added transport through
sctp_assoc_del_nonprimary_peers(). The removal does not clear
asoc->new_transport, leaving it pointing to the removed transport.

sctp_sf_do_asconf() then creates a HEARTBEAT whose chunk->transport points
to the removed transport without holding a transport reference. During
local address replacement, src_out_of_asoc_ok keeps this HEARTBEAT on
control_chunk_list. After the transport is freed by RCU, a successful
ASCONF_ACK for the replacement address releases the queued HEARTBEAT and

    [39 lines not shown]
DeltaFile
+3-0net/sctp/associola.c
+3-01 files

Linux/linux 9e6869bdrivers/dibs dibs_loopback.c dibs_main.c

net/dibs: Correct freeing of dmb_clientid_arr

A dibs device interrupt handler can be active after dibs_dev_del() and
may still access dmb_clientid_arr. (UAF)

In case of a failure in dibs_dev_add() being called by dibs_lo_dev_probe()
dmb_clientid_arr is freed twice (double free).

Free dmb_clientid_arr in dibs_dev_release() after last reference is gone.
Note that allocating in dibs_dev_add() instead of dibs_dev_alloc() is ok
for now, because no dmbs can be registered before dibs_dev_add().

Fixes: cc21191b584c ("dibs: Move data path to dibs layer")
Cc: stable at vger.kernel.org
Co-developed-by: Hidayath Khan <hidayath at linux.ibm.com>
Signed-off-by: Hidayath Khan <hidayath at linux.ibm.com>
Signed-off-by: Alexandra Winter <wintera at linux.ibm.com>
Reviewed-by: Dust Li <dust.li at linux.alibaba.com>
Link: https://patch.msgid.link/20260810111432.2334900-1-wintera@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
DeltaFile
+4-10drivers/dibs/dibs_main.c
+0-1drivers/dibs/dibs_loopback.c
+4-112 files

Linux/linux 3d6d817drivers/scsi scsi_debug.c scsi_error.c, drivers/ufs/core ufshcd.c

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Two minor core fixes: one for power management issues in error
  handling and the other to fix a deadlock in door locking of SCSI
  devices with removable media; and a minor bug fix for the debug
  driver"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: scsi_debug: Negate wrapped memcmp() result
  scsi: core: Do not block on tag allocation in scsi_eh_lock_door()
  scsi: core: pair EH runtime PM get and put
DeltaFile
+5-3drivers/scsi/scsi_error.c
+3-3include/scsi/scsi_host.h
+2-2drivers/ufs/core/ufshcd.c
+2-2drivers/scsi/scsi_debug.c
+12-104 files

Linux/linux 1fd495earch/m68k Kconfig.cpu

m68k: Define NR_CPUS to 1

This fixes a Kconfig warning

        fs/erofs/Kconfig:137:warning: range is invalid

which originates from EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS using
NR_CPUS which up to now didn't exist for ARCH=m68k.  All other
architectures define this symbol, so fix the outlier.

[geert] This also fixes:
  - CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS being set to the
    literal NR_CPUS instead of a number by automatic configs like
    "make allmodconfig" or "make olddefconfig",
  - An infinite loop in manual configs like "make oldconfig" when
    CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS is not present or
    has an invalid value in your existing .config.

Fixes: c9b47e6b2311 ("erofs: cap LZMA stream pool size")

    [4 lines not shown]
DeltaFile
+4-0arch/m68k/Kconfig.cpu
+4-01 files

Linux/linux 7b53449include/net ip_vs.h, net/netfilter nf_conntrack_proto_tcp.c

Merge tag 'nf-26-08-10' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf

Pablo Neira Ayuso says:

====================
Netfilter/IPVS fixes for net

The following patchset contains Netfilter/IPVS fixes for net. Still
large batch for this late -rc cycle but at least half of these fixes
in this batch have been cooking for several weeks before:

1) Fix race between ipset list:set GC and swap, use write_lock instead
   of rcu read lock section when accessing the index to ensure
   interference with ip_set_swap(), from Xiang Mei.

2) Release template conntrack in bridge conntrack when packet is
   neither IPv4 nor IPv6 before setting skb as untracked.
   From Zhiling Zou.


    [56 lines not shown]
DeltaFile
+88-44net/netfilter/nf_conntrack_proto_tcp.c
+66-15net/netfilter/ipvs/ip_vs_ctl.c
+14-31net/netfilter/ipvs/ip_vs_conn.c
+23-6include/net/ip_vs.h
+13-6net/netfilter/ipset/ip_set_core.c
+13-5net/netfilter/ipvs/ip_vs_core.c
+217-10718 files not shown
+270-15324 files

Linux/linux 6d3724enet/sched cls_u32.c

net/sched: cls_u32: skip hash tables in u32_bind_class()

u32_walk() enumerates both struct tc_u_hnode and struct tc_u_knode
through the walker callback. u32_bind_class() unconditionally casts the
passed fh to tc_u_knode and accesses &n->res, so when fh is actually a
tc_u_hnode, which has no tcf_result member, this results in a
slab-out-of-bounds read of res->classid in tc_cls_bind_class().

The issue can be reproduced with the following commands:

    tc qdisc add dev lo root handle 1: hfsc
    tc class add dev lo parent 1: classid 1:1 hfsc sc rate 1000kbit
    tc filter add dev lo parent 1:1 protocol ip prio 1 u32 match u32 0 0 flowid 1:1
    tc class add dev lo parent 1: classid 1:2 hfsc sc rate 2000kbit

Fix this by skipping hash tables via the TC_U32_KEY(handle) check.

Fixes: 07d79fc7d94e ("net_sched: add reverse binding for tc class")
Signed-off-by: Zhang Changzhong <zhangchangzhong at huawei.com>

    [3 lines not shown]
DeltaFile
+3-0net/sched/cls_u32.c
+3-01 files

Linux/linux 484ec2adrivers/net/ethernet/google/gve gve_rx_dqo.c gve_ptp.c

Merge branch 'gve-bug-fixes-for-header-split-and-ptp'

Harshitha Ramamurthy says:

====================
gve: Bug fixes for header-split and PTP

This series contains 2 bug fixes for gve.

Patch 1 fixes an issue which causes TX timeouts due to HW detection of
an illegal descriptor. This happens when receiving header-only packets
with header split enabled - this produces an SKB with a zero-length
fragment.

Patch 2 prevents a kernel NULL pointer dereference by stubbing the PTP
adjfine callback.
====================

Link: https://patch.msgid.link/20260807224315.234152-1-hramamurthy@google.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
DeltaFile
+6-0drivers/net/ethernet/google/gve/gve_ptp.c
+5-0drivers/net/ethernet/google/gve/gve_rx_dqo.c
+11-02 files

Linux/linux 3992ceddrivers/net/ethernet/google/gve gve_ptp.c

gve: fix NULL dereference due to missing ptp adjfine

Fix NULL dereference due to missing implementation of adjfine, which can
be triggered from usermode as follows:

sudo ./testptp -d /dev/ptp0 -f 0
[  551.943697] BUG: kernel NULL pointer dereference, address: 0000000000000000
[...]
[  552.061946] Call Trace:
[  552.064487]  <TASK>
[  552.066681]  ptp_clock_adjtime+0x1c0/0x2c0
[  552.070874]  ? get_clock_desc+0x6b/0xb0
[  552.074825]  pc_clock_adjtime+0x78/0xc0
[  552.078755]  __do_sys_clock_adjtime+0x85/0x110
[  552.083293]  do_syscall_64+0xea/0x610

Cc: stable at vger.kernel.org
Fixes: acd16380523b ("gve: Add initial PTP device support")
Signed-off-by: Jordan Rhee <jordanrhee at google.com>

    [4 lines not shown]
DeltaFile
+6-0drivers/net/ethernet/google/gve/gve_ptp.c
+6-01 files

Linux/linux 6bf1457drivers/net/ethernet/google/gve gve_rx_dqo.c

gve: fix zero-length skb frag with header-split

When header split is enabled and a header-only packet is
received such as a pure TCP ACK, GVE will indicate an
RX SKB with a zero-length fragment. If this SKB is then
hairpinned and sent back out, the GVE TX path will emit
a zero-length descriptor. Hardware considers this
an illegal descriptor and stops the queue, causing a
TX timeout and interface reset.

Fix it by not adding the zero-length skb frag.

Cc: stable at vger.kernel.org
Fixes: 5e37d8254e7f ("gve: Add header split data path")
Suggested-by: Praveen Kaligineedi <pkaligineedi at google.com>
Co-developed-by: Ziwei Xiao <ziweixiao at google.com>
Signed-off-by: Ziwei Xiao <ziweixiao at google.com>
Signed-off-by: Jordan Rhee <jordanrhee at google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy at google.com>

    [2 lines not shown]
DeltaFile
+5-0drivers/net/ethernet/google/gve/gve_rx_dqo.c
+5-01 files

Linux/linux f60b396net/sched act_api.c

net/sched: act_api: fix TOCTOU NULL deref on a->goto_chain

tcf_action_exec() handles TC_ACT_GOTO_CHAIN by first checking
rcu_access_pointer(a->goto_chain) and then calling
tcf_action_goto_chain_exec(), which does a second, independent
rcu_dereference_bh(a->goto_chain) read and immediately dereferences
chain->filter_chain. A concurrent tcf_action_set_ctrlact() (e.g. the gact
replace path) can clear a->goto_chain between the two reads, so the second
read returns NULL and tcf_action_goto_chain_exec() dereferences NULL.

Fix the race by doing a single rcu_dereference_bh() read of a->goto_chain
in tcf_action_exec(), checking it once for NULL, and passing the resulting
chain pointer into tcf_action_goto_chain_exec(). This turns the split
check/use into a single check/use on one value.

Fixes: ee3bbfe806cd ("net/sched: let actions use RCU to access 'goto_chain'")
Reported-by: vega at nebusec.ai
Tested-by: Victor Nogueira <victor at mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs at mojatatu.com>

    [3 lines not shown]
DeltaFile
+5-5net/sched/act_api.c
+5-51 files

Linux/linux 6bcd76cnet/packet af_packet.c

af_packet: Don't send zero-byte data in tpacket_snd().

syzbot reported a WARNING in __dev_queue_xmit() triggered via tpacket_snd():

skb_assert_len
WARNING: at include/linux/skbuff.h:2753 skb_assert_len
WARNING: at __dev_queue_xmit+0x21bc/0x4970 net/core/dev.c:4781

Call Trace:
 <TASK>
 dev_queue_xmit include/linux/netdevice.h:3448 [inline]
 packet_xmit+0x243/0x310 net/packet/af_packet.c:276
 tpacket_snd net/packet/af_packet.c:2907 [inline]
 packet_sendmsg+0x28d6/0x4eb0 net/packet/af_packet.c:3134

When sending 0-byte packets via TPACKET ring buffer on devices with no
hard header (e.g. dev->hard_header_len == 0), tpacket_fill_skb()
populates an skb with skb->len == 0 and returns 0. tpacket_snd() then
forwards this empty skb to packet_xmit(), causing __dev_queue_xmit() to

    [18 lines not shown]
DeltaFile
+3-0net/packet/af_packet.c
+3-01 files

Linux/linux f5bbbfetools/testing/selftests/ftrace/test.d/dynevent add_remove_uprobe.tc

Merge tag 'probes-fixes-v7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull probes fix from Masami Hiramatsu:

 - Convert ELF entry point to file offset in uprobe test

   Convert the ELF entry point address (e_entry) to a file offset using
   LOAD segment headers in add_remove_uprobe test. This fixes uprobe
   registration failures (-EINVAL) on non-PIE executables where vaddr
   exceeds file size.

* tag 'probes-fixes-v7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  selftests/ftrace: Convert ELF entry point to file offset in uprobe test
DeltaFile
+25-2tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe.tc
+25-21 files

Linux/linux cba9ccbnet/tipc node.c

tipc: read le->link under the node lock in tipc_node_link_down()

tipc_node_link_down() caches the link pointer before taking n->lock:

        struct tipc_link *l = le->link;         /* unlocked */

        if (!l)
                return;
        tipc_node_write_lock(n);
        if (!tipc_link_is_establishing(l)) {    /* deref l */
        ...
                tipc_link_reset(l);             /* write into l */
        if (delete) {
                kfree(l);
                le->link = NULL;

The delete=true caller frees that very object under n->lock, so the lock
does not protect the cached pointer against it:


    [44 lines not shown]
DeltaFile
+10-5net/tipc/node.c
+10-51 files

Linux/linux 71b3cednet/tls tls_sw.c, tools/testing/selftests/net tls.c

Merge branch 'net-tls-fail-splice-after-a-failed-async-decrypt'

Chuck Lever says:

====================
net/tls: Fail splice after a failed async decrypt

tls_sw_recvmsg() and tls_sw_read_sock() both read ctx->async_wait.err
once they hold the reader lock, so a record that failed
authentication fails the call. tls_sw_splice_read() has no such
check. sk_err does not stand in for one. The first reader to reach
sock_error() clears sk_err, while async_wait.err persists. A splice
therefore keeps delivering records on a connection the other two
readers have already refused.

Both patches come from a receive-path series for zero-length data
records. Jakub asked for them separately, since the rest of that
series is still under discussion.


    [6 lines not shown]
DeltaFile
+65-10tools/testing/selftests/net/tls.c
+5-0net/tls/tls_sw.c
+70-102 files

Linux/linux 976df67net/tls tls_sw.c

net/tls: Fail tls_sw_splice_read() after a failed async decrypt

When an async decrypt fails, tls_decrypt_done() records the error in
ctx->async_wait.err and calls tls_err_abort(), which stores it in
sk_err. tls_sw_recvmsg() and tls_sw_read_sock() each read
async_wait.err once they hold the reader lock and fail the call: a
record that did not authenticate breaks the connection.

tls_sw_splice_read() has no such check, and sk_err does not stand in
for one. tls_rx_rec_wait() tests sk_err only inside the loop it
skips whenever a record is already parsed, and the first reader to
reach sock_error() clears it, while async_wait.err persists. A
splice therefore keeps delivering records on a connection that
recvmsg() and read_sock() refuse to read.

Read async_wait.err in tls_sw_splice_read() as the other two readers
do.

Fixes: f314bfee81b1 ("tls: rx: return the already-copied data on crypto error")

    [5 lines not shown]
DeltaFile
+5-0net/tls/tls_sw.c
+5-01 files

Linux/linux 8a42229tools/testing/selftests/net tls.c

selftests: tls: cover splice after a failed decrypt

Nothing in this file splices a socket whose last decrypt failed, so
the check that fails tls_sw_splice_read() on a broken connection can
be removed without a test noticing. Such a splice hands the
application plaintext that recvmsg() and read_sock() already refuse
to return.

Extend the bad_auth pattern. Corrupt an authenticated record, confirm
recvmsg() reports EBADMSG, then splice the same socket and require
EBADMSG again. A synchronous decrypt fails again on the still-queued
record, so only an async decrypt reaches EBADMSG through the
recorded-failure check alone.

bad_auth builds the same corrupted record, so its construction moves
into a helper the two tests share.

Signed-off-by: Chuck Lever <cel at kernel.org>
Reviewed-by: Sabrina Dubroca <sd at queasysnail.net>

    [2 lines not shown]
DeltaFile
+65-10tools/testing/selftests/net/tls.c
+65-101 files

Linux/linux 5f3a13edrivers/net/ethernet/wangxun/ngbe ngbe_main.c

net: ngbe: fix NULL pointer dereference in non-MSI-X interrupt enabling

In non-MSI-X mode (such as legacy INTx or single MSI), wx->msix_entry is
not allocated or initialized. Calling NGBE_INTR_MISC(wx) dereferences
wx->msix_entry->entry, leading to a NULL pointer dereference crash.

This issue was introduced by fixing the IRQ vector when the number of
VFs is 7. Fix the issue by explicitly checking `pdev->msix_enabled` to
determine the correct vector index.

Additionally, as a side fix, set the interrupt mask to BIT(0) for the
non-MSI-X fallback. In MSI/INTx mode, the MISC and queue interrupts
share vector 0, and the WX_PX_MISC_IVAR register is only valid in the
MSI-X case. Thus, BIT(0) is the correct mask for the miscellaneous cause
when MSI-X is disabled.

Fixes: 4174c0c331a2 ("net: ngbe: specify IRQ vector when the number of VFs is 7")
Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>
Reviewed-by: Breno Leitao <leitao at debian.org>

    [3 lines not shown]
DeltaFile
+3-1drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
+3-11 files

Linux/linux 37aae6fdrivers/net tap.c, net/packet af_packet.c

Merge branch 'fix-wrong-transport_header-when-sending-vlan-tagged-frames'

Wei Fang says:

====================
Fix wrong transport_header when sending VLAN-tagged frames

When sending a VLAN-tagged frame via AF_PACKET or tap, calling
skb_set_network_header() before skb_probe_transport_header() causes
the flow dissector to misinterpret the inner protocol header as a
VLAN header. As a result, transport_header is never set and remains
at its uninitialized sentinel value (~0U).

Move skb_probe_transport_header() to before skb_set_network_header()
so the flow dissector sees network_header still pointing to the VLAN
header and can correctly identify the transport layer.
====================

Link: https://patch.msgid.link/20260807063405.688780-1-wei.fang@oss.nxp.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
DeltaFile
+2-2net/packet/af_packet.c
+2-1drivers/net/tap.c
+4-32 files

Linux/linux 01fdeccnet/packet af_packet.c

net: packet: fix wrong transport_header when sending VLAN-tagged frame

In packet_parse_headers(), when processing a VLAN-tagged frame,
skb_set_network_header() is called to advance network_header past the
VLAN tag to the inner protocol header. skb_probe_transport_header() is
then called with skb->protocol still set to the outer VLAN EtherType
(e.g. ETH_P_8021Q), while nhoff (derived from skb_network_offset())
already points past the VLAN tag to the inner protocol header.

In __skb_flow_dissect(), proto is initialized to ETH_P_8021Q and nhoff
points past the VLAN tag. When the dissector hits case ETH_P_8021Q, it
reads a struct vlan_hdr at nhoff via __skb_header_pointer(), but that
offset contains the inner protocol header (e.g. an IP header). The bytes
are misinterpreted as a VLAN header, yielding a garbage encapsulated
EtherType that matches no known protocol. The dissector returns false,
so skb_probe_transport_header() never calls skb_set_transport_header(),
leaving transport_header at its uninitialized sentinel value (~0U).

Move skb_probe_transport_header() to before skb_set_network_header(). At

    [12 lines not shown]
DeltaFile
+2-2net/packet/af_packet.c
+2-21 files