Linux/linux dd6c438fs eventpoll.c fs-writeback.c, include/linux eventpoll.h nstree.h

Merge tag 'vfs-7.1-rc1.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:

 - eventpoll: fix ep_remove() UAF and follow-up cleanup

 - fs: aio: set VMA_DONTCOPY_BIT in mmap to fix NULL-pointer-dereference
   error

 - writeback: Fix use after free in inode_switch_wbs_work_fn()

 - fuse: reject oversized dirents in page cache

 - fs: aio: reject partial mremap to avoid Null-pointer-dereference
   error

 - nstree: fix func. parameter kernel-doc warnings

 - fs: Handle multiply claimed blocks more gracefully with mmb

    [19 lines not shown]
DeltaFile
+78-80fs/eventpoll.c
+19-17fs/fs-writeback.c
+10-6include/linux/eventpoll.h
+8-1fs/buffer.c
+3-3include/linux/nstree.h
+3-2fs/aio.c
+121-1091 files not shown
+125-1097 files

Linux/linux bd1886dfs/smb/common/smbdirect smbdirect_connection.c smbdirect_connect.c, fs/smb/smbdirect connection.c connect.c

Merge tag 'v7.1-rc-part2-ksmbd-fixes' of git://git.samba.org/ksmbd

Pull more smb server updates from Steve French:

 - move fs/smb/common/smbdirect to fs/smb/smbdirect

 - change signature calc to use AES-CMAC library, simpler and faster

 - invalid signature fix

 - multichannel fix

 - open create options fix

 - fix durable handle leak

 - cap maximum lock count to avoid potential denial of service

 - four connection fixes: connection free and session destroy IDA fixes,

    [30 lines not shown]
DeltaFile
+0-2,181fs/smb/common/smbdirect/smbdirect_connection.c
+2,181-0fs/smb/smbdirect/connection.c
+0-925fs/smb/common/smbdirect/smbdirect_connect.c
+925-0fs/smb/smbdirect/connect.c
+0-857fs/smb/common/smbdirect/smbdirect_accept.c
+857-0fs/smb/smbdirect/accept.c
+3,963-3,96350 files not shown
+7,638-7,68856 files

Linux/linux d0ed69ffs/smb/client cifsacl.c smb2transport.c, fs/smb/client/compress lz77.c

Merge tag 'v7.1-rc1-part3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - Four bug fixes: OOB read in ioctl query info, 3 ACL fixes

 - SMB1 Unix extensions mount fix

 - Four crypto improvements: move to AES-CMAC library, simpler and faster

 - Remove drop_dir_cache to avoid potential crash, and move to /procfs

 - Seven SMB3.1.1 compression fixes

* tag 'v7.1-rc1-part3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: Drop 'allocate_crypto' arg from smb*_calc_signature()
  smb: client: Make generate_key() return void
  smb: client: Remove obsolete cmac(aes) allocation
  smb: client: Use AES-CMAC library for SMB3 signature calculation

    [14 lines not shown]
DeltaFile
+185-85fs/smb/client/compress/lz77.c
+85-30fs/smb/client/cifsacl.c
+29-84fs/smb/client/smb2transport.c
+21-43fs/smb/client/cifsencrypt.c
+0-57fs/smb/client/misc.c
+53-3fs/smb/client/cifs_debug.c
+373-30218 files not shown
+437-39124 files

Linux/linux e728258drivers/net/ethernet/intel/ice ice_ptp_hw.c, net/core dev_addr_lists_test.c dev_addr_lists.c

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

Pull  networking fixes from Jakub Kicinski:
 "Including fixes from Netfilter.

  Steady stream of fixes. Last two weeks feel comparable to the two
  weeks before the merge window. Lots of AI-aided bug discovery. A newer
  big source is Sashiko/Gemini (Roman Gushchin's system), which points
  out issues in existing code during patch review (maybe 25% of fixes
  here likely originating from Sashiko). Nice thing is these are often
  fixed by the respective maintainers, not drive-bys.

  Current release - new code bugs:

   - kconfig: MDIO_PIC64HPSC should depend on ARCH_MICROCHIP

  Previous releases - regressions:

   - add async ndo_set_rx_mode and switch drivers which we promised to

    [46 lines not shown]
DeltaFile
+291-136tools/testing/selftests/net/ovpn/test.sh
+385-2net/core/dev_addr_lists_test.c
+384-1net/core/dev_addr_lists.c
+272-91tools/testing/selftests/net/ovpn/common.sh
+249-10drivers/net/ethernet/intel/ice/ice_ptp_hw.c
+154-79tools/testing/selftests/net/ovpn/test-mark.sh
+1,735-319166 files not shown
+3,537-1,417172 files

Linux/linux e8df5a0. MAINTAINERS .mailmap, Documentation/devicetree/bindings/i2c cnxt,cx92755-i2c.yaml i2c-digicolor.txt

Merge tag 'i2c-for-7.1-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull more i2c updates from Wolfram Sang:

 - cx92755: convert I2C bindings to DT schema

 - mediatek: add optional bus power management during transfers

 - pxa: handle early bus busy condition

 - MAINTAINERS: update I2C RUST entry

* tag 'i2c-for-7.1-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  MAINTAINERS: add Rust I2C tree and update Igor Korotin's email
  i2c: mediatek: add bus regulator control for power saving
  dt-bindings: i2c: cnxt,cx92755-i2c: Convert to DT schema
  i2c: pxa: handle 'Early Bus Busy' condition on Armada 3700
DeltaFile
+49-0Documentation/devicetree/bindings/i2c/cnxt,cx92755-i2c.yaml
+0-25Documentation/devicetree/bindings/i2c/i2c-digicolor.txt
+12-6drivers/i2c/busses/i2c-pxa.c
+12-1drivers/i2c/busses/i2c-mt65xx.c
+2-1MAINTAINERS
+1-0.mailmap
+76-336 files

Linux/linux 5fb4fdearch/xtensa/include/asm ucontext.h, arch/xtensa/include/uapi/asm Kbuild

Merge tag 'xtensa-20260422' of https://github.com/jcmvbkbc/linux-xtensa

Pull Xtensa updates from Max Filippov:

 - use register_sys_off_handler(SYS_OFF_MODE_RESTART) instead of
   the deprecated register_restart_handler()

 - drop custom ucontext.h and reuse asm-generic ucontext.h

* tag 'xtensa-20260422' of https://github.com/jcmvbkbc/linux-xtensa:
  xtensa: uapi: Reuse asm-generic ucontext.h
  xtensa: xtfpga: Use register_sys_off_handler(SYS_OFF_MODE_RESTART)
  xtensa: xt2000: Use register_sys_off_handler(SYS_OFF_MODE_RESTART)
  xtensa: ISS: Use register_sys_off_handler(SYS_OFF_MODE_RESTART)
DeltaFile
+0-22arch/xtensa/include/asm/ucontext.h
+4-7arch/xtensa/platforms/xtfpga/setup.c
+4-7arch/xtensa/platforms/iss/setup.c
+4-7arch/xtensa/platforms/xt2000/setup.c
+1-0arch/xtensa/include/uapi/asm/Kbuild
+13-435 files

Linux/linux ac8777cfs eventpoll.c, include/linux eventpoll.h

Merge patch series "eventpoll: fix ep_remove() UAF and follow-up cleanup"

Christian Brauner <brauner at kernel.org> says:

ep_remove() (via __ep_remove_file()) cleared file->f_ep under
file->f_lock but then kept using @file in the same critical section:
is_file_epoll(), hlist_del_rcu() through the head, spin_unlock. A
concurrent __fput() on the watched eventpoll caught the transient
NULL in eventpoll_release()'s lockless fast path, skipped
eventpoll_release_file() entirely, and ran to ep_eventpoll_release()
-> ep_clear_and_put() -> ep_free(). That kfree()s the struct
eventpoll whose embedded ->refs hlist_head is exactly where
epi->fllink.pprev points and the subsequent hlist_del_rcu()'s
"*pprev = next" scribbles into freed kmalloc-192 memory, which is
the slab-use-after-free KASAN caught.

struct file is SLAB_TYPESAFE_BY_RCU on top of that so the same window
also lets the slot recycle while ep_remove() is still nominally
inside file->f_lock. The upshot is an attacker-influencable

    [42 lines not shown]
DeltaFile
+78-80fs/eventpoll.c
+10-6include/linux/eventpoll.h
+88-862 files

Linux/linux 07422c9fs eventpoll.c

eventpoll: drop vestigial epi->dying flag

With ep_remove() now pinning @file via epi_fget() across the
f_ep clear and hlist_del_rcu(), the dying flag no longer
orchestrates anything: it was set in eventpoll_release_file()
(which only runs from __fput(), i.e. after @file's refcount has
reached zero) and read in __ep_remove() / ep_remove() as a cheap
bail before attempting the same synchronization epi_fget() now
provides unconditionally.

The implication is simple: epi->dying == true always coincides
with file_ref_get(&file->f_ref) == false, because __fput() is
reachable only once the refcount hits zero and the refcount is
monotone in that state. The READ_ONCE(epi->dying) in ep_remove()
therefore selects exactly the same callers that epi_fget() would
reject, just one atomic cheaper. That's not worth a struct
field, a second coordination mechanism, and the comments on
both.


    [7 lines not shown]
DeltaFile
+7-20fs/eventpoll.c
+7-201 files

Linux/linux 3a4551efs eventpoll.c

eventpoll: drop dead bool return from ep_remove_epi()

ep_remove_epi() always returns true -- the "can be disposed"
answer was meaningful back when the dying-check lived inside the
pre-split __ep_remove(), but after that check moved to ep_remove()
the return value is just noise. Both callers gate on it
unconditionally:

  if (ep_remove_epi(ep, epi))
      WARN_ON_ONCE(ep_refcount_dec_and_test(ep));

  dispose = ep_remove_epi(ep, epi);
  ...
  if (dispose && ep_refcount_dec_and_test(ep))
      ep_free(ep);

Make ep_remove_epi() return void, drop the dispose local in
eventpoll_release_file(), and the useless conditionals at both
callers. No functional change.

    [3 lines not shown]
DeltaFile
+5-8fs/eventpoll.c
+5-81 files

Linux/linux 33e92e9include/linux eventpoll.h

eventpoll: refresh eventpoll_release() fast-path comment

The old comment justified the lockless READ_ONCE(file->f_ep) check
with "False positives simply cannot happen because the file is on
the way to be removed and nobody ( but eventpoll ) has still a
reference to this file." That reasoning was the root of the UAF
fixed in "eventpoll: fix ep_remove struct eventpoll / struct file
UAF": __ep_remove() could clear f_ep while another close raced
past the fast path and freed the watched eventpoll / recycled the
struct file slot.

With ep_remove() now pinning @file via epi_fget() across the f_ep
clear and hlist_del_rcu(), the invariant is re-established for the
right reason: anyone who might clear f_ep holds @file alive for
the duration, so a NULL observation really does mean no
concurrent eventpoll path has work left on this file. Refresh the
comment accordingly so the next reader doesn't inherit the broken
model.


    [2 lines not shown]
DeltaFile
+10-6include/linux/eventpoll.h
+10-61 files

Linux/linux d30deebfs eventpoll.c

eventpoll: move f_lock acquisition into ep_remove_file()

Let the helper own its critical section end-to-end: take &file->f_lock
at the top, read file->f_ep inside the lock, release on exit. Callers
(ep_remove() and eventpoll_release_file()) no longer need to wrap the
call, and the function-comment lock-handoff contract is gone.

Link: https://patch.msgid.link/20260423-work-epoll-uaf-v1-7-2470f9eec0f5@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
DeltaFile
+4-6fs/eventpoll.c
+4-61 files

Linux/linux a6dc643fs eventpoll.c

eventpoll: fix ep_remove struct eventpoll / struct file UAF

ep_remove() (via ep_remove_file()) cleared file->f_ep under
file->f_lock but then kept using @file inside the critical section
(is_file_epoll(), hlist_del_rcu() through the head, spin_unlock).
A concurrent __fput() taking the eventpoll_release() fastpath in
that window observed the transient NULL, skipped
eventpoll_release_file() and ran to f_op->release / file_free().

For the epoll-watches-epoll case, f_op->release is
ep_eventpoll_release() -> ep_clear_and_put() -> ep_free(), which
kfree()s the watched struct eventpoll. Its embedded ->refs
hlist_head is exactly where epi->fllink.pprev points, so the
subsequent hlist_del_rcu()'s "*pprev = next" scribbles into freed
kmalloc-192 memory.

In addition, struct file is SLAB_TYPESAFE_BY_RCU, so the slot
backing @file could be recycled by alloc_empty_file() --
reinitializing f_lock and f_ep -- while ep_remove() is still

    [28 lines not shown]
DeltaFile
+10-6fs/eventpoll.c
+10-61 files

Linux/linux 86e8705fs eventpoll.c

eventpoll: move epi_fget() up

We'll need it when removing files so move it up. No functional change.

Link: https://patch.msgid.link/20260423-work-epoll-uaf-v1-5-2470f9eec0f5@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
DeltaFile
+28-28fs/eventpoll.c
+28-281 files

Linux/linux 0bade23fs eventpoll.c

eventpoll: rename ep_remove_safe() back to ep_remove()

The current name is just confusing and doesn't clarify anything.

Link: https://patch.msgid.link/20260423-work-epoll-uaf-v1-4-2470f9eec0f5@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
DeltaFile
+8-8fs/eventpoll.c
+8-81 files

Linux/linux 0feaf64fs eventpoll.c

eventpoll: drop vestigial __ prefix from ep_remove_{file,epi}()

With __ep_remove() gone, the double-underscore on __ep_remove_file()
and __ep_remove_epi() no longer contrasts with a __-less parent and
just reads as noise. Rename both to ep_remove_file() and
ep_remove_epi(). No functional change.

Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
DeltaFile
+6-6fs/eventpoll.c
+6-61 files

Linux/linux e9e5cd4fs eventpoll.c

eventpoll: kill __ep_remove()

Remove the boolean conditional in __ep_remove() and restructure the code
so the check for racing with eventpoll_release_file() are only done in
the ep_remove_safe() path where they belong.

Link: https://patch.msgid.link/20260423-work-epoll-uaf-v1-3-2470f9eec0f5@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
DeltaFile
+30-37fs/eventpoll.c
+30-371 files

Linux/linux 0f7bdfdfs eventpoll.c

eventpoll: split __ep_remove()

Split __ep_remove() to delineate file removal from epoll item removal.

Suggested-by: Linus Torvalds <torvalds at linux-foundation.org>
Link: https://patch.msgid.link/20260423-work-epoll-uaf-v1-2-2470f9eec0f5@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
DeltaFile
+23-4fs/eventpoll.c
+23-41 files

Linux/linux 3d9fd0afs eventpoll.c

eventpoll: use hlist_is_singular_node() in __ep_remove()

Replace the open-coded "epi is the only entry in file->f_ep" check
with hlist_is_singular_node(). Same semantics, and the helper avoids
the head-cacheline access in the common false case.

Link: https://patch.msgid.link/20260423-work-epoll-uaf-v1-1-2470f9eec0f5@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
DeltaFile
+1-1fs/eventpoll.c
+1-11 files

Linux/linux 43eb354include/linux nstree.h

nstree: fix func. parameter kernel-doc warnings

Use the correct parameter name ("__ns") for function parameter kernel-doc
to avoid 3 warnings:

Warning: include/linux/nstree.h:68 function parameter '__ns' not described in 'ns_tree_add_raw'
Warning: include/linux/nstree.h:77 function parameter '__ns' not described in 'ns_tree_add'
Warning: include/linux/nstree.h:88 function parameter '__ns' not described in 'ns_tree_remove'

Fixes: 885fc8ac0a4d ("nstree: make iterator generic")
Signed-off-by: Randy Dunlap <rdunlap at infradead.org>
Link: https://patch.msgid.link/20260416215429.948898-1-rdunlap@infradead.org
Signed-off-by: Christian Brauner <brauner at kernel.org>
DeltaFile
+3-3include/linux/nstree.h
+3-31 files

Linux/linux 3adf7aefs aio.c

fs: aio: reject partial mremap to avoid Null-pointer-dereference error

[BUG]
Recently, our internal syzkaller testing uncovered a null pointer
dereference issue:
BUG: kernel NULL pointer dereference, address: 0000000000000000
...
[   51.111664]  filemap_read_folio+0x25/0xe0
[   51.112410]  filemap_fault+0xad7/0x1250
[   51.113112]  __do_fault+0x4b/0x460
[   51.113699]  do_pte_missing+0x5bc/0x1db0
[   51.114250]  ? __pte_offset_map+0x23/0x170
[   51.114822]  __handle_mm_fault+0x9f8/0x1680
...
Crash analysis showed the file involved was an AIO ring file. The
phenomenon triggered is the same as the issue described in [1].

[CAUSE]
Consider the following scenario: userspace sets up an AIO context via

    [50 lines not shown]
DeltaFile
+2-1fs/aio.c
+2-11 files

Linux/linux 9a46638fs buffer.c

fs: Handle multiply claimed blocks more gracefully with mmb

When a metadata block is referenced by multiple inodes and tracked by
metadata bh infrastructure (which is forbidden and generally indicates
filesystem corruption), it can happen that mmb_mark_buffer_dirty() is
called for two different mmb structures in parallel. This can lead to a
corruption of mmb linked list. Handle that situation gracefully (at
least from mmb POV) by serializing on setting bh->b_mmb.

Reported-by: Ruikai Peng <ruikai at pwno.io>
Signed-off-by: Jan Kara <jack at suse.cz>
Link: https://patch.msgid.link/20260423090311.10955-2-jack@suse.cz
Signed-off-by: Christian Brauner <brauner at kernel.org>
DeltaFile
+8-1fs/buffer.c
+8-11 files

Linux/linux 6689f01fs fs-writeback.c

writeback: Fix use after free in inode_switch_wbs_work_fn()

inode_switch_wbs_work_fn() has a loop like:

  wb_get(new_wb);
  while (1) {
    list = llist_del_all(&new_wb->switch_wbs_ctxs);
    /* Nothing to do? */
    if (!list)
      break;
    ... process the items ...
  }

Now adding of items to the list looks like:

wb_queue_isw()
  if (llist_add(&isw->list, &wb->switch_wbs_ctxs))
    queue_work(isw_wq, &wb->switch_work);


    [23 lines not shown]
DeltaFile
+19-17fs/fs-writeback.c
+19-171 files

Linux/linux c03ce41fs aio.c

fs: aio: set VMA_DONTCOPY_BIT in mmap to fix NULL-pointer-dereference error

[BUG]
Recently, our internal syzkaller testing uncovered a null pointer
dereference issue:
BUG: kernel NULL pointer dereference, address: 0000000000000000
...
[   51.111664]  filemap_read_folio+0x25/0xe0
[   51.112410]  filemap_fault+0xad7/0x1250
[   51.113112]  __do_fault+0x4b/0x460
[   51.113699]  do_pte_missing+0x5bc/0x1db0
[   51.114250]  ? __pte_offset_map+0x23/0x170
[   51.114822]  __handle_mm_fault+0x9f8/0x1680
[   51.115408]  handle_mm_fault+0x24c/0x570
[   51.115958]  do_user_addr_fault+0x226/0xa50
...
Crash analysis showed the file involved was an AIO ring file.

[CAUSE]

    [45 lines not shown]
DeltaFile
+1-1fs/aio.c
+1-11 files

Linux/linux 51a8de6fs/fuse readdir.c

fuse: reject oversized dirents in page cache

fuse_add_dirent_to_cache() computes a serialized dirent size from the
server-controlled namelen field and copies the dirent into a single
page-cache page. The existing logic only checks whether the dirent fits
in the remaining space of the current page and advances to a fresh page
if not. It never checks whether the dirent itself exceeds PAGE_SIZE.

As a result, a malicious FUSE server can return a dirent with
namelen=4095, producing a serialized record size of 4120 bytes. On 4 KiB
page systems this causes memcpy() to overflow the cache page by 24 bytes
into the following kernel page.

Reject dirents that cannot fit in a single page before copying them into
the readdir cache.

Fixes: 69e34551152a ("fuse: allow caching readdir")
Cc: stable at vger.kernel.org # v6.16+
Assisted-by: Bynario AI

    [6 lines not shown]
DeltaFile
+4-0fs/fuse/readdir.c
+4-01 files

Linux/linux 5e6391dinclude/trace/events rxrpc.h, net/rxrpc conn_event.c call_event.c

Merge branch 'rxrpc-miscellaneous-fixes'

David Howells says:

====================
rxrpc: Miscellaneous fixes

Here are some fixes for rxrpc, as found by Sashiko[1]:

 (1) Fix rxrpc_input_call_event() to only unshare DATA packets.

 (2) Fix re-decryption of RESPONSE packets where a partially decrypted
     skbuff gets requeued if there was a failure due to ENOMEM.

 (3) Fix error handling in rxgk_extract_token() where the ENOMEM case is
     unhandled.

Link: https://sashiko.dev/#/patchset/20260422161438.2593376-4-dhowells@redhat.com [1]
====================

    [3 lines not shown]
DeltaFile
+2-12net/rxrpc/conn_event.c
+2-1net/rxrpc/call_event.c
+1-0net/rxrpc/rxgk_app.c
+0-1include/trace/events/rxrpc.h
+5-144 files

Linux/linux 3476c8bnet/rxrpc rxgk_app.c

rxrpc: Fix error handling in rxgk_extract_token()

Fix a missing bit of error handling in rxgk_extract_token(): in the event
that rxgk_decrypt_skb() returns -ENOMEM, it should just return that rather
than continuing on (for anything else, it generates an abort).

Fixes: 64863f4ca494 ("rxrpc: Fix unhandled errors in rxgk_verify_packet_integrity()")
Closes: https://sashiko.dev/#/patchset/20260422161438.2593376-4-dhowells@redhat.com
Signed-off-by: David Howells <dhowells at redhat.com>
cc: Marc Dionne <marc.dionne at auristor.com>
cc: Jeffrey Altman <jaltman at auristor.com>
cc: Simon Horman <horms at kernel.org>
cc: linux-afs at lists.infradead.org
cc: stable at kernel.org
Link: https://patch.msgid.link/20260423200909.3049438-4-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
DeltaFile
+1-0net/rxrpc/rxgk_app.c
+1-01 files

Linux/linux 55b2984net/rxrpc call_event.c

rxrpc: Fix rxrpc_input_call_event() to only unshare DATA packets

Fix rxrpc_input_call_event() to only unshare DATA packets and not ACK,
ABORT, etc..

And with that, rxrpc_input_packet() doesn't need to take a pointer to the
pointer to the packet, so change that to just a pointer.

Fixes: 1f2740150f90 ("rxrpc: Fix potential UAF after skb_unshare() failure")
Closes: https://sashiko.dev/#/patchset/20260422161438.2593376-4-dhowells@redhat.com
Signed-off-by: David Howells <dhowells at redhat.com>
cc: Marc Dionne <marc.dionne at auristor.com>
cc: Jeffrey Altman <jaltman at auristor.com>
cc: Simon Horman <horms at kernel.org>
cc: linux-afs at lists.infradead.org
cc: stable at kernel.org
Link: https://patch.msgid.link/20260423200909.3049438-2-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
DeltaFile
+2-1net/rxrpc/call_event.c
+2-11 files

Linux/linux 0422e7ainclude/trace/events rxrpc.h, net/rxrpc conn_event.c

rxrpc: Fix re-decryption of RESPONSE packets

If a RESPONSE packet gets a temporary failure during processing, it may end
up in a partially decrypted state - and then get requeued for a retry.

Fix this by just discarding the packet; we will send another CHALLENGE
packet and thereby elicit a further response.  Similarly, discard an
incoming CHALLENGE packet if we get an error whilst generating a RESPONSE;
the server will send another CHALLENGE.

Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
Closes: https://sashiko.dev/#/patchset/20260422161438.2593376-4-dhowells@redhat.com
Signed-off-by: David Howells <dhowells at redhat.com>
cc: Marc Dionne <marc.dionne at auristor.com>
cc: Jeffrey Altman <jaltman at auristor.com>
cc: Simon Horman <horms at kernel.org>
cc: linux-afs at lists.infradead.org
cc: stable at kernel.org
Link: https://patch.msgid.link/20260423200909.3049438-3-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
DeltaFile
+2-12net/rxrpc/conn_event.c
+0-1include/trace/events/rxrpc.h
+2-132 files

Linux/linux 27ae4bcinclude/trace/events rxrpc.h, net/rxrpc rxkad.c conn_event.c

Merge branch 'rxrpc-miscellaneous-fixes'

David Howells says:

====================
rxrpc: Miscellaneous fixes

Here are some fixes for rxrpc, as found by Sashiko[1]:

 (1) Fix leaks in rxkad_verify_response().

 (2) Fix handling of rxkad-encrypted packets with crypto-misaligned
     lengths.

 (3) Fix problem with unsharing DATA packets potentially causing a crash in
     the caller.

 (4) Fix lack of unsharing of RESPONSE packets.


    [7 lines not shown]
DeltaFile
+49-63net/rxrpc/rxkad.c
+28-1net/rxrpc/conn_event.c
+2-22net/rxrpc/io_thread.c
+18-1net/rxrpc/call_event.c
+0-9net/rxrpc/skbuff.c
+3-2include/trace/events/rxrpc.h
+100-984 files not shown
+106-10010 files

Linux/linux ac33733net/rxrpc key.c

rxrpc: Fix missing validation of ticket length in non-XDR key preparsing

In rxrpc_preparse(), there are two paths for parsing key payloads: the
XDR path (for large payloads) and the non-XDR path (for payloads <= 28
bytes). While the XDR path (rxrpc_preparse_xdr_rxkad()) correctly
validates the ticket length against AFSTOKEN_RK_TIX_MAX, the non-XDR
path fails to do so.

This allows an unprivileged user to provide a very large ticket length.
When this key is later read via rxrpc_read(), the total
token size (toksize) calculation results in a value that exceeds
AFSTOKEN_LENGTH_MAX, triggering a WARN_ON().

[ 2001.302904] WARNING: CPU: 2 PID: 2108 at net/rxrpc/key.c:778 rxrpc_read+0x109/0x5c0 [rxrpc]

Fix this by adding a check in the non-XDR parsing path of rxrpc_preparse()
to ensure the ticket length does not exceed AFSTOKEN_RK_TIX_MAX,
bringing it into parity with the XDR parsing logic.


    [12 lines not shown]
DeltaFile
+4-0net/rxrpc/key.c
+4-01 files