Linux/linux 5f22fb2 — fs/fuse fuse_i.h virtio_fs.c, tools/testing/selftests/filesystems/fuse write_extend_eof_test.c

Merge tag 'fuse-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

Pull fuse fixes from Miklos Szeredi:

 - Fix  bugs reported by Sashiko

 - Fix a couple of issues introduced in this cycle

 - Misc bug fixes

* tag 'fuse-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: limit name size in listxattr
  fuse: clear the old EOF tail before writeback-cache writes
  fuse: fix UBSAN warning in fuse_iomap_writeback_range()
  fuse: skip dcache instantiation for readdirplus names with embedded NUL
  fuse: preserve ENOTCONN after failed initialization and disconnect
  fuse: set dentry epoch before making the dentry visible
  fuse: advertise support for DAX mappings
  fuse: don't mark inode DAX without CONFIG_FS_DAX

    [9 lines not shown]
DeltaFile
+125-18tools/testing/selftests/filesystems/fuse/write_extend_eof_test.c
+41-12fs/fuse/file.c
+37-9fs/fuse/inode.c
+23-16fs/fuse/readdir.c
+28-6fs/fuse/virtio_fs.c
+23-0fs/fuse/fuse_i.h
+277-616 files not shown
+308-8012 files

Linux/linux a5242bd — drivers/nvdimm namespace_devs.c

Merge tag 'libnvdimm-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm fix from Alison Schofield:
 "Nest namespace mapping locks under the bus lock"

* tag 'libnvdimm-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  nvdimm/namespace: Nest mapping locks under the bus lock
DeltaFile
+9-2drivers/nvdimm/namespace_devs.c
+9-21 files

Linux/linux b98adc1 — drivers/cxl port.c, drivers/cxl/core region.c

Merge tag 'cxl-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl

Pull cxl fixes from Dave Jiang:
 "A small collection of CXL fixes"

* tag 'cxl-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
  cxl/port: Fix endpoint RAS error unmasking
  cxl/test: Free the decoder registry when cxl_test_init() fails
  cxl/region: Reject a repeat write of an endpoint decoder to targetN
  cxl/region: Restore a target's position from its slot after sorting
DeltaFile
+13-11tools/testing/cxl/test/cxl.c
+9-7drivers/cxl/port.c
+8-3drivers/cxl/core/region.c
+30-213 files

Linux/linux ddefe07 — drivers/infiniband/hw/bnxt_re qplib_rcfw.c, drivers/infiniband/hw/ionic ionic_res.h

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma

Pull rdma fixes from Jason Gunthorpe:
 "Usual set of bug fixes, many found by tools:

   - Bound checks and counter widths in srpt for initiator controlled
     descriptor tables, out of bounds read and resource leaks are remote
     triggerable

   - Use after free races in siw MR lookup and in the rtrs event handler
     error unwind

   - Don't leak kernel heap memory to userspace through query_qp

   - Several rereg_mr bugs in irdma and mlx4 leaving stale or revived MR
     state after a failure

   - irdma FRWR and PBLE/AEQ setup was broken on PAGE_SIZE > 4K


    [36 lines not shown]
DeltaFile
+51-22drivers/infiniband/hw/irdma/verbs.c
+59-14drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
+16-7drivers/infiniband/hw/mlx5/ib_rep.c
+16-7drivers/infiniband/hw/ionic/ionic_res.h
+13-9drivers/infiniband/hw/irdma/utils.c
+20-1drivers/infiniband/ulp/srpt/ib_srpt.c
+175-6018 files not shown
+229-9724 files

Linux/linux a904dcf — block error-injection.c, drivers/nvme/host core.c tcp.c

Merge tag 'block-7.4-20261119' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux

Pull block fixes from Jens Axboe:

 - NVMe fixes via Keith:
     - nvme-tcp fixes for TLS record handling and waiting for an
       in-flight TLS handshake callback
     - Fix a deadlock on nvme_subsystems_lock in nvme_init_subsystem()
     - Fix a gendisk leak in nvme_alloc_ns()
     - Stop AEN work before ANA teardown
     - Remove namespaces in parallel
     - Various nvmet fixes for auth, the file backend, fc, tcp, loop,
       and connection failure rollback
     - sysfs input validation and kfree_sensitive() for DH-HMAC-CHAP
       secrets
     - Dead code removal

 - Fix a 32-bit overflow in the blk-iocost donation weight calculation


    [37 lines not shown]
DeltaFile
+139-36drivers/nvme/host/tcp.c
+132-18block/error-injection.c
+50-33drivers/nvme/target/auth.c
+41-11drivers/nvme/target/admin-cmd.c
+34-13drivers/nvme/target/io-cmd-file.c
+30-14drivers/nvme/host/core.c
+426-12531 files not shown
+615-23637 files

Linux/linux 78d9aed — io_uring rw.c rsrc.c

Merge tag 'io_uring-7.4-20261119' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux

Pull io_uring fixes from Jens Axboe:

 - Don't run canceled local work from a task that doesn't share the mm
   of the submitter on ring release

 - Fail soft links on negative IOU_COMPLETE results, on cancelled futex
   waits, and on short or failed IOPOLL IO

 - Show the stuck io-wq workers rather than WARN on a slow exit, as the
   WARN can be triggered at will and the exiting task's stack trace is
   never the interesting one

 - Don't rearm a multishot timeout on cancel, as that could delay ring
   teardown for a long time

 - Keep the old registered file when a file update fails


    [16 lines not shown]
DeltaFile
+60-8io_uring/io-wq.c
+9-3io_uring/io_uring.c
+11-0io_uring/tw.h
+4-3io_uring/tw.c
+4-2io_uring/rsrc.c
+3-1io_uring/rw.c
+91-173 files not shown
+95-189 files

Linux/linux 2d25709 — sound/hda/codecs ca0132.c, sound/hda/codecs/realtek alc269.c

Merge tag 'sound-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of various small fixes.  Nothing really stands out.
  While we still get more fixes than before, things look still well
  manageable (fingers crossed).  Here are the highlights:

  ALSA core:
   - Fix page leaks at buffer allocation retries
   - Fix in compress-offload API for setting metadata_set flag
   - Parameter flag handling fixes on setup and error in PCM OSS layer

  HD-audio:
   - Fix AE-5 LED strip color corruption during animation in ca0132
   - Correct boost values for CS35L41 on several HP laptops
   - Realtek quirk regression fixes for Lenovo Legion and V14 G2 ITL
   - Fix quiet speakers on HP 250 G6
   - Various Realtek quirks and mute LED fixups (HP, Lenovo, THUNDEROBOT)


    [37 lines not shown]
DeltaFile
+117-30sound/soc/codecs/cs35l56.c
+54-2sound/soc/sdw_utils/soc_sdw_utils.c
+20-34sound/hda/codecs/ca0132.c
+48-0sound/hda/codecs/realtek/alc269.c
+47-0sound/soc/rockchip/rockchip_i2s_tdm.c
+5-33sound/soc/codecs/cs35l56-shared.c
+291-9935 files not shown
+510-16341 files

Linux/linux 0097b4a — drivers/gpio gpio-omap.c gpio-ljca.c

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

Pull gpio fixes from Bartosz Golaszewski:
 "GPIO core fixes:
   - delay freeing the line state workqueue to device release and
     fix a UAF bug
   - fix races in access to the flags field of GPIO descriptors
   - clear the debounce period field of struct gpio_desc before
     clearing the "requested" flag
   - propagate -ENOTSUPP from .set_config() in gpio-shared-proxy

  GPIO driver fixes:
   - check the return value of clk_prepare in gpio-omap
   - reject bulk-in endpoints smaller than 3 bytes in gpio-mpsse
   - validate the pin index of interrupt events in gpio-ljca
   - disable interrupts around the chip lock in direction callbacks
     in gpio-mlxbf2
   - fix line name handling in gpio-virtio


    [19 lines not shown]
DeltaFile
+47-48drivers/gpio/gpiolib-cdev.c
+21-18drivers/gpio/gpiolib.c
+20-9drivers/gpio/gpio-mlxbf2.c
+7-6drivers/gpio/gpio-virtio.c
+8-3drivers/gpio/gpio-ljca.c
+2-8drivers/gpio/gpio-omap.c
+105-924 files not shown
+113-9710 files

Linux/linux 7032230 — drivers/ata libata-core.c libata-scsi.c

Merge tag 'ata-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux

Pull ata fixes from Niklas Cassel:

 - Fix an off-by-one in the REMOVE ELEMENT AND TRUNCATE translation,
   which asked the device for one block more than requested (Nick)

 - Fix the INC_512 bit test in the SECURITY PROTOCOL IN/OUT
   translation, which treated lengths in 512-byte units as bytes (me)

 - Limit max_sectors to 8191 on the INTEL SSDSCKKB240G8 SSD to avoid
   NCQ command timeouts (Justinien)

* tag 'ata-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8
  ata: libata-scsi: fix the INC_512 bit test for SECURITY PROTOCOL IN/OUT
  ata: libata-scsi: fix REQUESTED MAX LBA field for REMOVE ELEMENT AND TRUNCATE
DeltaFile
+4-1drivers/ata/libata-scsi.c
+3-0drivers/ata/libata-core.c
+7-12 files

Linux/linux d0f871b — arch/arm64/include/asm neon-intrinsics.h, arch/arm64/kernel relocate_kernel.S

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

Pull arm64 fixes from Catalin Marinas:
 "BBML3 allow-list corrections for Cortex-X4 and Neoverse-V3/V3AE
  following updated errata, a kCFI oops during kexec relocation and NEON
  intrinsics type mismatches causing CRC64 and XOR build failures with
  tip-of-tree Clang:

   - Remove Cortex-X4 and Neoverse-V3/V3AE from the BBML3 allow list

     Updated errata documents show that revisions previously reported as
     fixed remain affected by load/store livelocks when changing mapping
     sizes without break-before-make

   - Fix a kCFI oops during kexec image relocation. Give the relocation
     routine a type hash and enter the copied code at the correct offset

   - Fix the build with recent Clang versions by removing the stdint.h
     type overrides for NEON intrinsics. The CRC64 and XOR intrinsics

    [9 lines not shown]
DeltaFile
+27-4lib/raid/xor/arm64/xor-neon.h
+5-19arch/arm64/include/asm/neon-intrinsics.h
+4-12lib/raid/xor/xor-neon.c
+14-2lib/raid/xor/arm/xor-neon.h
+3-12lib/raid/xor/arm64/xor-eor3.c
+7-4arch/arm64/kernel/relocate_kernel.S
+60-538 files not shown
+89-6514 files

Linux/linux 8a1a8c3 — arch/s390/appldata appldata_base.c, arch/s390/include/asm syscall.h ptrace.h

Merge tag 's390-7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Alexander Gordeev:

 - Fix error handling for monitor start and stop operations

   Return failures to userspace, prevent inconsistent state
   and potential use-after-free scenarios

 - Ensure skipped syscalls return -ENOSYS as expected

   Preserve existing ptrace behavior while separating syscall
   number handling from the return value stored in gpr2

 - Fix a race during module initialization where sysfs handlers
   could access an uninitialized device list semaphore

* tag 's390-7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/dcssblk: Initialize device semaphore before sysfs registration

    [2 lines not shown]
DeltaFile
+23-5arch/s390/kernel/ptrace.c
+9-11arch/s390/kernel/syscall.c
+8-4arch/s390/appldata/appldata_base.c
+2-2arch/s390/include/asm/ptrace.h
+1-2drivers/s390/block/dcssblk.c
+0-1arch/s390/include/asm/syscall.h
+43-256 files

Linux/linux 7f7b822 — fs/fuse xattr.c

fuse: limit name size in listxattr

Limit the size of names to XATTR_NAME_MAX.  Return -EIO to the listxattr()
caller if the server exceeds this limit.

Fixes: 92a8780e1136 ("[PATCH] FUSE - extended attribute operations")
Cc: stable at vger.kernel.org
Signed-off-by: Miklos Szeredi <mszeredi at redhat.com>
DeltaFile
+1-1fs/fuse/xattr.c
+1-11 files

Linux/linux d9013d1 — fs/fuse file.c

fuse: clear the old EOF tail before writeback-cache writes

Buffered writeback-cache writes go through iomap_file_buffered_write(),
but do not clear cached data between the old EOF and the write position.
If a shared mapping dirtied the tail of the old EOF page, an extending
write can expose those bytes as file contents instead of zeros. A later
writeback can also send them to the server.

Clear the gap under the existing inode lock before the buffered write.
Use the same page-cache cleanup as fuse_perform_write() does for
write-through writes, leaving the write range itself untouched.

Fixes: 4d99ff8f12eb ("fuse: Turn writeback cache on")
Cc: stable at vger.kernel.org
Signed-off-by: Hungyu Lin <dennylin0707 at gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi at redhat.com>
DeltaFile
+5-0fs/fuse/file.c
+5-01 files

Linux/linux 71b2caf — fs/fuse file.c

fuse: fix UBSAN warning in fuse_iomap_writeback_range()

In fuse_iomap_writeback_range() 'ap' is initialized to '&wpa->ia.ap'
unconditionally, but 'wpa' (== data->wpa) is NULL when the writeback
of the first folio of a batch starts: 'data' is zero-initialized in
fuse_writepages() and fuse_launder_folio(), and fuse_writepages_send()
resets data->wpa to NULL after every batch.

Taking the address of a member of a NULL pointer is undefined
behavior.  The bogus initial value of 'ap' is never actually
dereferenced: all uses are either guarded by 'if (wpa)' or run after
'ap' has been reassigned in the 'data->wpa == NULL' branch, where a
new 'wpa' is allocated first.  Still, the expression lets the
compiler assume that 'wpa' is non-NULL for the whole function, which
could break the 'if (wpa)' check below and turn the latent UB into a
real NULL pointer dereference.

This can be observed with a kernel built with -fsanitize=null (not
part of the default CONFIG_UBSAN flag set) when writeback of an mmap

    [17 lines not shown]
DeltaFile
+1-1fs/fuse/file.c
+1-11 files

Linux/linux 31678e6 — drivers/gpio gpio-shared-proxy.c

gpio: shared-proxy: propagate -ENOTSUPP from .set_config()

The gpio-shared-proxy driver does not propagate -ENOTSUPP returned from
the set_config() callback by real GPIO drivers controlling the shared
GPIOs. This can lead to a situation where for an open-drain, shared GPIO,
we take the emulation path on request - ending up setting the direction
to input for the initial user - and then fail to allow simulated output
direction for the second user if the driver in question does not
support using "real" open-drain.

Propagate all errors from the underlying .set_config() call in
gpio_shared_proxy_set_config().

Reported-by: Igor Velkov <iav at iav.lv>
Closes: https://lore.kernel.org/all/20261115-hc4-gpio-shared-od-1@iav.lv/
Fixes: e992d54c6f97 ("gpio: shared-proxy: implement the shared GPIO proxy driver")
Tested-by: Igor Velkov <iav at iav.lv>
Link: https://patch.msgid.link/20261118-gpio-shared-proxy-enotsupp-v1-1-39d3fe4d3aa7@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
DeltaFile
+1-1drivers/gpio/gpio-shared-proxy.c
+1-11 files

Linux/linux 3c3db0d — fs/smb/client file.c, kernel/cgroup cpuset.c

Merge tag 'asoc-fix-v7.4-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v7.4

Quite a lot of fixes here together with a few quriks for new devices,
mostly not particularly remarkable.  The Cirrus changes are relatively
large but reasonably so, there's a bunch of data table updates and a
couple of new functions needed and they come with clear reasonining.
DeltaFile
+908-0tools/testing/selftests/drivers/net/hw/tls_hw_offload.c
+699-0tools/testing/selftests/net/sctp_ifwdtsn.c
+624-45fs/smb/client/file.c
+336-17tools/testing/selftests/net/tls.c
+321-0tools/testing/selftests/drivers/net/hw/tls_hw_offload.py
+157-159kernel/cgroup/cpuset.c
+3,045-221844 files not shown
+14,577-5,385850 files

Linux/linux 65e4fd9 — security/selinux hooks.c

Merge tag 'selinux-pr-20261119' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux

Pull selinux fix from Paul Moore:
 "A single SELinux fix for a problem where we were not properly handling
  MAP_SHARED_VALIDATE"

* tag 'selinux-pr-20261119' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
  selinux: check MAP_SHARED_VALIDATE mappings as shared
DeltaFile
+4-1security/selinux/hooks.c
+4-11 files

Linux/linux d3e1fcc — drivers/thermal/intel/int340x_thermal processor_thermal_rfim.c processor_thermal_device.h

Merge tag 'thermal-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fix from Rafael Wysocki:
 "Fix the Nova Lake-S PCI device ID in the int340x thermal driver
  (Sankara Tankala)"

* tag 'thermal-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal: int340x: processor_thermal: Fix Nova Lake-S PCI device ID
DeltaFile
+1-6drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
+1-2drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
+1-2drivers/thermal/intel/int340x_thermal/processor_thermal_device.h
+3-103 files

Linux/linux 75099ce — drivers/acpi glue.c cppc_acpi.c, drivers/cpufreq cpufreq.c cppc_cpufreq.c

Merge tag 'pm-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management and ACPI fixes from Rafael Wysocki:
 "These fix two recent regressions related to power management, one in
  the ACPI CPPC library (affects the CPPC interface in sysfs and the
  intel_pstate driver), and one in the ACPI device PM core code (affects
  platforms with shared ACPI power resources assigned to devices
  reported as "not present" by firmware), another ACPI CPPC library
  issue and two cpufreq issues, one in the core and one in the CPPC
  cpufreq driver:

   - Avoid initializing power management for absent devices in the core
     ACPI PM code to unbreak power management on platforms where an ACPI
     shared power resource is assigned to a device reported by the
     platform firmware as absent (Rafael Wysocki)

   - Drop compliance checks involving nominal performance from the ACPI
     CPPC library to unbreak the CPPC sysfs interface and the
     intel_pstate driver on some Intel platforms after a recent change

    [19 lines not shown]
DeltaFile
+17-6drivers/acpi/device_pm.c
+13-1drivers/cpufreq/cppc_cpufreq.c
+11-2drivers/acpi/cppc_acpi.c
+2-6drivers/acpi/glue.c
+8-0drivers/cpufreq/cpufreq.c
+51-155 files

Linux/linux d40cb8a — drivers/acpi cppc_acpi.c, drivers/cpufreq cpufreq.c cppc_cpufreq.c

Merge branches 'acpi-cppc-fixes' and 'pm-cpufreq-fixes'

Merge ACPI CPPC library fixes and cpufreq fixes for 7.4-rc1:

 - Drop compliance checks involving nominal performance from the ACPI
   CPPC library to unbreak the CPPC sysfs interface and the intel_pstate
   driver on some Intel platforms after a recent change that added those
   checks (Rafael Wysocki)

 - Make the ACPI CPPC library reject EPP registers that are too small to
   store all of the possible EPP values (Christian Loehle)

 - Make cpufreq_driver_target() skip inactive policies to avoid a NULL
   pointer dereference on a frequency table access attempt (Zhongqiu Han)

 - Set the CPPC Enable register in cpu_init() in the CPPC cpufreq driver
   to enable CPPC on platforms that wait for the OS to enable it (Sumit
   Gupta)


    [7 lines not shown]
DeltaFile
+13-1drivers/cpufreq/cppc_cpufreq.c
+11-2drivers/acpi/cppc_acpi.c
+8-0drivers/cpufreq/cpufreq.c
+32-33 files

Linux/linux f66297b — sound/soc/codecs tas2781-fmwlib.c

ASoC: tas2781: Avoid possible zero-division

The calibration preprocessing code in TAS2781 codec driver has a
division with the value calculated from the firmware data, and when a
malformed firmware is given, this could lead to a zero-division error.
We already hit and addressed such a case (commit 8dbab764f1e0 "ALSA:
hda/tas2781: Only accept CRC-less V1 data if all entries are valid")
which was fixed in the caller side (HD-audio TAS2781 driver).

For avoiding such a breakage in future, let's add a safety check for
zero division in the callee side, too.

Fixes: 05ac3846ffe5 ("ALSA: hda/tas2781: A workaround solution to lower-vol issue among lower calibrated-impedance micro-speaker on TAS2781")
Signed-off-by: Takashi Iwai <tiwai at suse.de>
Link: https://patch.msgid.link/20261119131045.2152868-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie at kernel.org>
DeltaFile
+1-1sound/soc/codecs/tas2781-fmwlib.c
+1-11 files

Linux/linux ae932b1 — fs/fuse readdir.c

fuse: skip dcache instantiation for readdirplus names with embedded NUL

FUSE READDIRPLUS can pass a length-bearing qstr with an embedded NUL to
d_splice_alias().  Unlike verify_dirent_name() in fs/readdir.c, this
path can create a dentry whose d_name.len extends past the NUL.

For such a name, strscpy() in inotify_handle_inode_event() and the
fanotify name-copy helpers stop early.  The kmalloc() and kvmalloc()
event-name buffers retain uninitialized bytes within the recorded name
length, which copy_event_to_user() and copy_fid_info_to_user() can expose.

Some FUSE servers include a terminating NUL in namelen.  Follow
nfs_prime_dcache() in commit 78d04af4995a1 ("NFS: nfs_prime_dcache must
validate the filename") by skipping dcache instantiation without
failing getdents().  Return -EIO from fuse_direntplus_link() so
parse_dirplusfile() sends FUSE_FORGET for the unused lookup reference
and continues readdir.

Fixes: 0b05b18381ee ("fuse: implement NFS-like readdirplus support")

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

Linux/linux 2eb2329 — fs/fuse fuse_dev_i.h dev.c

fuse: preserve ENOTCONN after failed initialization and disconnect

Commit 794e811d1443 ("fuse: split out filesystem part of request
sending") moved the INIT failure check into fuse_req_prep(), before
the channel checks whether it is still connected.

If a daemon closes /dev/fuse before replying to INIT, aborting the
channel completes INIT with an error. stat() and open() on the mount
then return ECONNREFUSED instead of the previous ENOTCONN. The same
change occurs when INIT is rejected before the daemon closes the fd.

Record INIT failure in the channel before publishing initialized, and
check it in fuse_get_req() after waiting for initialization and checking
for disconnection. This preserves ECONNREFUSED for failed INIT while
the device remains open, and restores ENOTCONN after disconnection.

Set the failure flag only while the channel is connected, since abort
also marks it initialized to wake waiters after a successful INIT.


    [4 lines not shown]
DeltaFile
+3-12fs/fuse/req.c
+8-0fs/fuse/dev.c
+3-0fs/fuse/fuse_dev_i.h
+14-123 files

Linux/linux fea42fa — fs/fuse readdir.c dir.c

fuse: set dentry epoch before making the dentry visible

fuse_lookup(), create_new_entry(), fuse_create_open() and
fuse_direntplus_link() set the dentry epoch only after d_splice_alias()
or d_instantiate() has made the dentry visible.  A new dentry starts at
epoch 0 and the connection at epoch 1, so in that window a concurrent
lookup can find the dentry, fail fuse_dentry_revalidate() and
d_invalidate() it.  The original lookup then returns an unhashed dentry,
and readlink() of /proc/self/fd/N on an O_PATH fd for it says
"<path> (deleted)" for a file that exists.

Anything that resolves real paths with open(O_PATH) + readlink() can
pick up the bogus path; TypeScript's native compiler (tsgo)
intermittently fails to find installed packages this way.  It got much
more common after commit 5a6baf204610 ("fuse: fix uninit-value in
fuse_dentry_revalidate()") zeroed the initial epoch; before that, slab
garbage usually passed the check.

Set the epoch before the dentry is published, and keep setting it on

    [12 lines not shown]
DeltaFile
+8-4fs/fuse/dir.c
+4-1fs/fuse/readdir.c
+12-52 files

Linux/linux 6df9846 — fs/fuse virtio_fs.c

virtiofs: fix use-after-free of fs->tag on device removal

The virtio_fs object is refcounted via its kobject, so a mount can keep it
alive well beyond the lifetime of the virtio device binding.  The tag
string, however, was allocated with devm_kmalloc() and is therefore freed
by devres_release_all() as soon as the device is unbound, i.e. right after
virtio_fs_remove() returns (see device_unbind_cleanup() in
drivers/base/dd.c).

virtio_fs_get_tree() looks up the instance, takes a kobject reference and
then drops virtio_fs_mutex before doing the sleepable part of the mount
(allocations, fuse_conn_init(), sget_fc()).  A concurrent device removal
can complete in that window:

  CPU 0 (mount)                         CPU 1 (remove)
  -------------                         --------------
  virtio_fs_get_tree()
    virtio_fs_find_instance()
    // reference taken, mutex dropped

    [30 lines not shown]
DeltaFile
+7-2fs/fuse/virtio_fs.c
+7-21 files

Linux/linux 6704a78 — fs/fuse virtio_fs.c fuse_i.h, include/uapi/linux fuse.h

fuse: advertise support for DAX mappings

Reuse the FUSE_HAS_INODE_DAX flag, which previously was only used for the
virtiofs case.

The two uses are unrelated: for virtiofs the flag means that host memory
can be mapped directly into the guest, while here it means that the server
may back an inode with a dax device opened via FUSE_DEV_IOC_BACKING_OPEN.

Gate the advertisement on IS_REACHABLE(CONFIG_DEV_DAX_FSDEV), which is
what fuse_backing_open_file() requires before it accepts a dax device as
backing; CONFIG_FS_DAX alone is not sufficient.

Plain fuse servers should check both FUSE_HAS_INODE_DAX and
FUSE_PASSTHROUGH_V2 before enabling passthrough dax support.

Stop advertising FUSE_PASSTHROUGH(_V2) in the virtiofs case, which doesn't
support passthrough mode.


    [11 lines not shown]
DeltaFile
+25-7fs/fuse/inode.c
+13-0fs/fuse/fuse_i.h
+8-2include/uapi/linux/fuse.h
+1-0fs/fuse/virtio_fs.c
+47-94 files

Linux/linux 0d2eb89 — fs/fuse virtio_fs.c

virtiofs: zero the reply region of the argument buffer

copy_args_to_argbuf() allocates one buffer for the fixed in- and out-args
and fills only the in-arg part.  The remainder is handed to the server as
a device-writable buffer, and the server is under no obligation to write
it: the used length it reports is its own claim and
virtio_fs_verify_response() has nothing to cross-check it against.

A reply that declares its full length without filling the buffer makes
copy_args_from_argbuf() copy the uninitialized remainder to the caller,
so a server that fails partway through writing a reply returns stale heap
contents from e.g. fuse_statfs() or fuse_getxattr() instead of an error.

Commit 5364d081125a ("virtiofs: validate fixed-output response length")
covers the case where the declared length is short.  Zero the reply
region so that the remaining case yields zeroes rather than whatever the
allocator last held.  Only that region is zeroed; the in-arg part is
overwritten by the copy below and the buffer can be as large as
XATTR_SIZE_MAX.

    [5 lines not shown]
DeltaFile
+13-4fs/fuse/virtio_fs.c
+13-41 files

Linux/linux a8fdb9d — fs/fuse file.c

fuse: don't pass a NULL inode to fuse_inode_backing() on release

cuse_release() and the error path of fuse_create_open() call
fuse_prepare_release() with a NULL fuse_inode. Since commit bbe2d73a8231
("fuse: don't assume ff->passthrough is set for FOPEN_PASSTHROUGH"),
fuse_prepare_release() calls fuse_inode_backing(fi) whenever the open
reply had FOPEN_PASSTHROUGH set, not only when ff->passthrough was set
up. A CUSE server that sets FOPEN_PASSTHROUGH thus makes the kernel
dereference a NULL pointer when the device is closed.

Pass a NULL backing when there is no inode. fuse_passthrough_release()
only prints it.

Found with AI-assisted code review (Claude Code).

Fixes: bbe2d73a8231 ("fuse: don't assume ff->passthrough is set for FOPEN_PASSTHROUGH")
Signed-off-by: Orkun Emin Sarı <sariorkunemin at gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi at redhat.com>
DeltaFile
+1-1fs/fuse/file.c
+1-11 files

Linux/linux 16fabae — fs/fuse virtio_fs.c inode.c

virtiofs: disable request timeout

The request timeout is implemented by aborting the connection:
fuse_check_timeout() calls fuse_chan_abort(), which splices
fpq->processing onto a local list and ends those requests.  Ending a
request wakes the waiting caller, which then drops the last reference and
frees it.

That is safe for /dev/fuse, where the request has already been copied out
to userspace and nothing outside the kernel retains a pointer to it.  It
is not safe for virtiofs.  virtio_fs_enqueue_req() passes the bare req as
the virtqueue token, and the scatterlists point at req->in.h, req->out.h,
req->argbuf and the request's folios; the device still owns all of that
after the abort.  When the device eventually completes the request,
virtio_fs_requests_done_work() gets the freed req back from
virtqueue_get_buf() and passes it to virtio_fs_verify_response() and
virtio_fs_request_complete(), which dereference req->args - the caller's
stack frame, long gone - and kfree() whatever req->argbuf now reads as.
The device may also have written the reply into the freed request or into

    [29 lines not shown]
DeltaFile
+10-0fs/fuse/fuse_i.h
+6-3fs/fuse/inode.c
+7-0fs/fuse/virtio_fs.c
+23-33 files

Linux/linux f7e0ed3 — fs/fuse inode.c

fuse: don't mark inode DAX without CONFIG_FS_DAX

fuse_init_inode() installs fuse_dax_aops and sets S_DAX for any regular
file whose lookup reply carries FUSE_ATTR_DAX.

Without CONFIG_FS_DAX, S_DAX is zero and IS_DAX() is constant false, so
all of the checks that keep such inodes away from the page cache are
compiled out: the "DAX inode without FOPEN_PASSTHROUGH" rejection in
fuse_file_io_open(), the O_TRUNC check in fuse_open(), the truncate check
in fuse_do_setattr(), the check in fuse_file_fallocate() and the one in
fuse_passthrough_open().  The address space operations are installed
regardless, so the inode ends up in caching I/O mode with aops that have
neither ->read_folio nor ->readahead, and a buffered read, mmap fault or
splice oopses on a NULL callback.  Any user able to mount a fuse
filesystem can trigger this.

Only honor FUSE_ATTR_DAX if DAX can work at all.

Fixes: 2fbe4586cff3 ("fuse: add support for opening dax device as backing")

    [3 lines not shown]
DeltaFile
+8-1fs/fuse/inode.c
+8-11 files