Changelog in Linux kernel 6.6.136

 
af_unix: read UNIX_DIAG_VFS data under unix_state_lock [+ + +]
Author: Jiexun Wang <wangjiexun2025@gmail.com>
Date:   Tue Apr 7 16:00:14 2026 +0800

    af_unix: read UNIX_DIAG_VFS data under unix_state_lock
    
    [ Upstream commit 39897df386376912d561d4946499379effa1e7ef ]
    
    Exact UNIX diag lookups hold a reference to the socket, but not to
    u->path. Meanwhile, unix_release_sock() clears u->path under
    unix_state_lock() and drops the path reference after unlocking.
    
    Read the inode and device numbers for UNIX_DIAG_VFS while holding
    unix_state_lock(), then emit the netlink attribute after dropping the
    lock.
    
    This keeps the VFS data stable while the reply is being built.
    
    Fixes: 5f7b0569460b ("unix_diag: Unix inode info NLA")
    Reported-by: Yifan Wu <yifanwucs@gmail.com>
    Reported-by: Juefei Pu <tomapufckgml@gmail.com>
    Co-developed-by: Yuan Tan <yuantan098@gmail.com>
    Signed-off-by: Yuan Tan <yuantan098@gmail.com>
    Suggested-by: Xin Liu <bird@lzu.edu.cn>
    Tested-by: Ren Wei <enjou1224z@gmail.com>
    Signed-off-by: Jiexun Wang <wangjiexun2025@gmail.com>
    Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
    Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
    Link: https://patch.msgid.link/20260407080015.1744197-1-n05ec@lzu.edu.cn
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ALSA: 6fire: fix use-after-free on disconnect [+ + +]
Author: Berk Cem Goksel <berkcgoksel@gmail.com>
Date:   Fri Apr 10 08:13:41 2026 +0300

    ALSA: 6fire: fix use-after-free on disconnect
    
    commit b9c826916fdce6419b94eb0cd8810fdac18c2386 upstream.
    
    In usb6fire_chip_abort(), the chip struct is allocated as the card's
    private data (via snd_card_new with sizeof(struct sfire_chip)).  When
    snd_card_free_when_closed() is called and no file handles are open, the
    card and embedded chip are freed synchronously.  The subsequent
    chip->card = NULL write then hits freed slab memory.
    
    Call trace:
      usb6fire_chip_abort sound/usb/6fire/chip.c:59 [inline]
      usb6fire_chip_disconnect+0x348/0x358 sound/usb/6fire/chip.c:182
      usb_unbind_interface+0x1a8/0x88c drivers/usb/core/driver.c:458
      ...
      hub_event+0x1a04/0x4518 drivers/usb/core/hub.c:5953
    
    Fix by moving the card lifecycle out of usb6fire_chip_abort() and into
    usb6fire_chip_disconnect().  The card pointer is saved in a local
    before any teardown, snd_card_disconnect() is called first to prevent
    new opens, URBs are aborted while chip is still valid, and
    snd_card_free_when_closed() is called last so chip is never accessed
    after the card may be freed.
    
    Fixes: a0810c3d6dd2 ("ALSA: 6fire: Release resources at card release")
    Cc: stable@vger.kernel.org
    Cc: Andrey Konovalov <andreyknvl@gmail.com>
    Signed-off-by: Berk Cem Goksel <berkcgoksel@gmail.com>
    Link: https://patch.msgid.link/20260410051341.1069716-1-berkcgoksel@gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ALSA: asihpi: avoid write overflow check warning [+ + +]
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Wed Mar 18 13:40:07 2026 +0100

    ALSA: asihpi: avoid write overflow check warning
    
    [ Upstream commit 591721223be9e28f83489a59289579493b8e3d83 ]
    
    clang-22 rightfully warns that the memcpy() in adapter_prepare() copies
    between different structures, crossing the boundary of nested
    structures inside it:
    
    In file included from sound/pci/asihpi/hpimsgx.c:13:
    In file included from include/linux/string.h:386:
    include/linux/fortify-string.h:569:4: error: call to '__write_overflow_field' declared with 'warning' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror,-Wattribute-warning]
      569 |                         __write_overflow_field(p_size_field, size);
    
    The two structures seem to refer to the same layout, despite the
    separate definitions, so the code is in fact correct.
    
    Avoid the warning by copying the two inner structures separately.
    I see the same pattern happens in other functions in the same file,
    so there is a chance that this may come back in the future, but
    this instance is the only one that I saw in practice, hitting it
    multiple times per day in randconfig build.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Link: https://patch.msgid.link/20260318124016.3488566-1-arnd@kernel.org
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ALSA: caiaq: take a reference on the USB device in create_card() [+ + +]
Author: Berk Cem Goksel <berkcgoksel@gmail.com>
Date:   Mon Apr 13 06:49:41 2026 +0300

    ALSA: caiaq: take a reference on the USB device in create_card()
    
    commit 80bb50e2d459213cccff3111d5ef98ed4238c0d5 upstream.
    
    The caiaq driver stores a pointer to the parent USB device in
    cdev->chip.dev but never takes a reference on it. The card's
    private_free callback, snd_usb_caiaq_card_free(), can run
    asynchronously via snd_card_free_when_closed() after the USB
    device has already been disconnected and freed, so any access to
    cdev->chip.dev in that path dereferences a freed usb_device.
    
    On top of the refcounting issue, the current card_free implementation
    calls usb_reset_device(cdev->chip.dev). A reset in a free callback
    is inappropriate: the device is going away, the call takes the
    device lock in a teardown context, and the reset races with the
    disconnect path that the callback is already cleaning up after.
    
    Take a reference on the USB device in create_card() with
    usb_get_dev(), drop it with usb_put_dev() in the free callback,
    and remove the usb_reset_device() call.
    
    Fixes: b04dcbb7f7b1 ("ALSA: caiaq: Use snd_card_free_when_closed() at disconnection")
    Cc: stable@vger.kernel.org
    Cc: Andrey Konovalov <andreyknvl@gmail.com>
    Signed-off-by: Berk Cem Goksel <berkcgoksel@gmail.com>
    Link: https://patch.msgid.link/20260413034941.1131465-3-berkcgoksel@gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ALSA: ctxfi: Limit PTP to a single page [+ + +]
Author: Harin Lee <me@harin.net>
Date:   Mon Apr 6 16:48:57 2026 +0900

    ALSA: ctxfi: Limit PTP to a single page
    
    commit e9418da50d9e5c496c22fe392e4ad74c038a94eb upstream.
    
    Commit 391e69143d0a increased CT_PTP_NUM from 1 to 4 to support 256
    playback streams, but the additional pages are not used by the card
    correctly. The CT20K2 hardware already has multiple VMEM_PTPAL
    registers, but using them separately would require refactoring the
    entire virtual memory allocation logic.
    
    ct_vm_map() always uses PTEs in vm->ptp[0].area regardless of
    CT_PTP_NUM. On AMD64 systems, a single PTP covers 512 PTEs (2M). When
    aggregate memory allocations exceed this limit, ct_vm_map() tries to
    access beyond the allocated space and causes a page fault:
    
      BUG: unable to handle page fault for address: ffffd4ae8a10a000
      Oops: Oops: 0002 [#1] SMP PTI
      RIP: 0010:ct_vm_map+0x17c/0x280 [snd_ctxfi]
      Call Trace:
      atc_pcm_playback_prepare+0x225/0x3b0
      ct_pcm_playback_prepare+0x38/0x60
      snd_pcm_do_prepare+0x2f/0x50
      snd_pcm_action_single+0x36/0x90
      snd_pcm_action_nonatomic+0xbf/0xd0
      snd_pcm_ioctl+0x28/0x40
      __x64_sys_ioctl+0x97/0xe0
      do_syscall_64+0x81/0x610
      entry_SYSCALL_64_after_hwframe+0x76/0x7e
    
    Revert CT_PTP_NUM to 1. The 256 SRC_RESOURCE_NUM and playback_count
    remain unchanged.
    
    Fixes: 391e69143d0a ("ALSA: ctxfi: Bump playback substreams to 256")
    Cc: stable@vger.kernel.org
    Signed-off-by: Harin Lee <me@harin.net>
    Link: https://patch.msgid.link/20260406074857.216034-1-me@harin.net
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ALSA: fireworks: bound device-supplied status before string array lookup [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Thu Apr 9 16:05:54 2026 +0200

    ALSA: fireworks: bound device-supplied status before string array lookup
    
    commit 07704bbf36f57e4379e4cadf96410dab14621e3b upstream.
    
    The status field in an EFW response is a 32-bit value supplied by the
    firewire device.  efr_status_names[] has 17 entries so a status value
    outside that range goes off into the weeds when looking at the %s value.
    
    Even worse, the status could return EFR_STATUS_INCOMPLETE which is
    0x80000000, and is obviously not in that array of potential strings.
    
    Fix this up by properly bounding the index against the array size and
    printing "unknown" if it's not recognized.
    
    Cc: Clemens Ladisch <clemens@ladisch.de>
    Cc: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Cc: Jaroslav Kysela <perex@perex.cz>
    Cc: Takashi Iwai <tiwai@suse.com>
    Fixes: bde8a8f23bbe ("ALSA: fireworks: Add transaction and some commands")
    Cc: stable <stable@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Link: https://patch.msgid.link/2026040953-astute-camera-1aa1@gregkh
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ALSA: hda/realtek: Add HP ENVY Laptop 13-ba0xxx quirk [+ + +]
Author: Andrii Kovalchuk <coderpy4@proton.me>
Date:   Sun Mar 15 01:08:51 2026 +0000

    ALSA: hda/realtek: Add HP ENVY Laptop 13-ba0xxx quirk
    
    [ Upstream commit 793b008cd39516385791a1d1d223d817e947a471 ]
    
    Add a PCI quirk for HP ENVY Laptop 13-ba0xxx (PCI device ID 0x8756)
    to enable proper mute LED and mic mute behavior using the
    ALC245_FIXUP_HP_X360_MUTE_LEDS fixup.
    
    Signed-off-by: Andrii Kovalchuk <coderpy4@proton.me>
    Link: https://patch.msgid.link/u0s-uRVegF9BN0t-4JnOUwsIAR-mVc4U4FJfJHdEHX7ro_laErHD9y35NebWybcN16gVaVHPJo1ap3AoJ1a2gqJImPvThgeNt_SYVY1KaDw=@proton.me
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-eg0xxx [+ + +]
Author: César Montoya <sprit152009@gmail.com>
Date:   Sat Mar 21 10:36:03 2026 -0500

    ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-eg0xxx
    
    [ Upstream commit 2f388b4e8fdd6b0f27cafd281658daacfd85807e ]
    
    The HP Pavilion 15-eg0xxx with subsystem ID 0x103c87cb uses a Realtek
    ALC287 codec with a mute LED wired to GPIO pin 4 (mask 0x10). The
    existing ALC287_FIXUP_HP_GPIO_LED fixup already handles this correctly,
    but the subsystem ID was missing from the quirk table.
    
    GPIO pin confirmed via manual hda-verb testing:
      hda-verb SET_GPIO_MASK 0x10
      hda-verb SET_GPIO_DIRECTION 0x10
      hda-verb SET_GPIO_DATA 0x10
    
    Signed-off-by: César Montoya <sprit152009@gmail.com>
    Link: https://patch.msgid.link/20260321153603.12771-1-sprit152009@gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ALSA: hda/realtek: Add quirk for ASUS ROG Flow Z13-KJP GZ302EAC [+ + +]
Author: Matthew Schwartz <matthew.schwartz@linux.dev>
Date:   Fri Mar 13 10:25:03 2026 -0700

    ALSA: hda/realtek: Add quirk for ASUS ROG Flow Z13-KJP GZ302EAC
    
    [ Upstream commit 59f68dc1d8df3142cb58fd2568966a9bb7b0ed8a ]
    
    Fixes lack of audio output on the ASUS ROG Flow Z13-KJP GZ302EAC model,
    similar to the ASUS ROG Flow Z13 GZ302EA.
    
    Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
    Link: https://patch.msgid.link/20260313172503.285846-1-matthew.schwartz@linux.dev
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ALSA: hda/realtek: add quirk for Framework F111:000F [+ + +]
Author: Dustin L. Howett <dustin@howett.net>
Date:   Fri Mar 27 10:54:40 2026 -0500

    ALSA: hda/realtek: add quirk for Framework F111:000F
    
    [ Upstream commit bac1e57adf08c9ee33e95fb09cd032f330294e70 ]
    
    Similar to commit 7b509910b3ad ("ALSA hda/realtek: Add quirk for
    Framework F111:000C") and previous quirks for Framework systems with
    Realtek codecs.
    
    000F is another new platform with an ALC285 which needs the same quirk.
    
    Signed-off-by: Dustin L. Howett <dustin@howett.net>
    Link: https://patch.msgid.link/20260327-framework-alsa-000f-v1-1-74013aba1c00@howett.net
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14IAH10 [+ + +]
Author: songxiebing <songxiebing@kylinos.cn>
Date:   Sun Apr 5 09:26:51 2026 +0800

    ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14IAH10
    
    [ Upstream commit f0541edb2e7333f320642c7b491a67912c1f65db ]
    
    The bass speakers are not working, and add the following entry
    in /etc/modprobe.d/snd.conf:
    options snd-sof-intel-hda-generic hda_model=alc287-yoga9-bass-spk-pin
    Fixes the bass speakers.
    
    So add the quick ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN here.
    
    Reported-by: Fernando Garcia Corona <fgarcor@gmail.com>
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221317
    Signed-off-by: songxiebing <songxiebing@kylinos.cn>
    Link: https://patch.msgid.link/20260405012651.133838-1-songxiebing@kylinos.cn
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ALSA: usb-audio: apply quirk for MOONDROP JU Jiu [+ + +]
Author: Cryolitia PukNgae <cryolitia.pukngae@linux.dev>
Date:   Thu Apr 2 13:36:57 2026 +0800

    ALSA: usb-audio: apply quirk for MOONDROP JU Jiu
    
    commit 4513d3e0bbc0585b86ccf2631902593ff97e88f5 upstream.
    
    It(ID 31b2:0111 JU Jiu) reports a MIN value -12800 for volume control, but
    will mute when setting it less than -10880.
    
    Thanks to my girlfriend Kagura for reporting this issue.
    
    Cc: Kagura <me@mail.kagurach.uk>
    Cc: stable@vger.kernel.org
    Signed-off-by: Cryolitia PukNgae <cryolitia.pukngae@linux.dev>
    Link: https://patch.msgid.link/20260402-syy-v1-1-068d3bc30ddc@linux.dev
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ALSA: usb-audio: Fix quirk flags for NeuralDSP Quad Cortex [+ + +]
Author: Phil Willoughby <willerz@gmail.com>
Date:   Sat Mar 28 08:07:34 2026 +0000

    ALSA: usb-audio: Fix quirk flags for NeuralDSP Quad Cortex
    
    [ Upstream commit bc5b4e5ae1a67700a618328217b6a3bd0f296e97 ]
    
    The NeuralDSP Quad Cortex does not support DSD playback. We need
    this product-specific entry with zero quirks because otherwise it
    falls through to the vendor-specific entry which marks it as
    supporting DSD playback.
    
    Cc: Yue Wang <yuleopen@gmail.com>
    Cc: Jaroslav Kysela <perex@perex.cz>
    Cc: Takashi Iwai <tiwai@suse.com>
    Signed-off-by: Phil Willoughby <willerz@gmail.com>
    Link: https://patch.msgid.link/20260328080921.3310-1-willerz@gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ALSA: usb-audio: Improve Focusrite sample rate filtering [+ + +]
Author: Geoffrey D. Bennett <g@b4.vu>
Date:   Sat Feb 21 02:33:45 2026 +1030

    ALSA: usb-audio: Improve Focusrite sample rate filtering
    
    [ Upstream commit 24d2d3c5f94007a5a0554065ab7349bb69e28bcb ]
    
    Replace the bLength == 10 max_rate check in
    focusrite_valid_sample_rate() with filtering that also examines the
    bmControls VAL_ALT_SETTINGS bit.
    
    When VAL_ALT_SETTINGS is readable, the device uses strict
    per-altsetting rate filtering (only the highest rate pair for that
    altsetting is valid). When it is not readable, all rates up to
    max_rate are valid.
    
    For devices without the bLength == 10 Format Type descriptor extension
    but with VAL_ALT_SETTINGS readable and multiple altsettings (only seen
    in Scarlett 18i8 3rd Gen playback), fall back to the Focusrite
    convention: alt 1 = 48kHz, alt 2 = 96kHz, alt 3 = 192kHz.
    
    This produces correct rate tables for all tested Focusrite devices
    (all Scarlett 2nd, 3rd, and 4th Gen, Clarett+, and Vocaster) using
    only USB descriptors, allowing QUIRK_FLAG_VALIDATE_RATES to be removed
    for Focusrite in the next commit.
    
    Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Link: https://patch.msgid.link/7e18c1f393a6ecb6fc75dd867a2c4dbe135e3e22.1771594828.git.g@b4.vu
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
arm64: dts: imx8mq: Set the correct gpu_ahb clock frequency [+ + +]
Author: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Date:   Wed Jan 28 00:28:28 2026 +0100

    arm64: dts: imx8mq: Set the correct gpu_ahb clock frequency
    
    [ Upstream commit 1f99b5d93d99ca17d50b386a674d0ce1f20932d8 ]
    
    According to i.MX 8M Quad Reference Manual, GPU_AHB_CLK_ROOT's maximum
    frequency is 400MHz.
    
    Fixes: 45d2c84eb3a2 ("arm64: dts: imx8mq: add GPU node")
    Reviewed-by: Frank Li <Frank.Li@nxp.com>
    Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
    Reviewed-by: Peng Fan <peng.fan@nxp.com>
    Reviewed-by: Fabio Estevam <festevam@gmail.com>
    Signed-off-by: Frank Li <Frank.Li@nxp.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ASoC: amd: yc: Add DMI entry for HP Laptop 15-fc0xxx [+ + +]
Author: Gilson Marquato Júnior <gilsonmandalogo@hotmail.com>
Date:   Mon Mar 30 02:43:48 2026 +0100

    ASoC: amd: yc: Add DMI entry for HP Laptop 15-fc0xxx
    
    [ Upstream commit 8ec017cf31299c4b6287ebe27afe81c986aeef88 ]
    
    The HP Laptop 15-fc0xxx (subsystem ID 0x103c8dc9) has an internal
    DMIC connected to the AMD ACP6x audio coprocessor. Add a DMI quirk
    entry so the internal microphone is properly detected on this model.
    
    Tested on HP Laptop 15-fc0237ns with Fedora 43 (kernel 6.19.9).
    
    Signed-off-by: Gilson Marquato Júnior <gilsonmandalogo@hotmail.com>
    Link: https://patch.msgid.link/20260330-hp-15-fc0xxx-dmic-v2-v1-1-6dd6f53a1917@hotmail.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: amd: yc: Add DMI quirk for ASUS EXPERTBOOK BM1403CDA [+ + +]
Author: Vee Satayamas <vsatayamas@gmail.com>
Date:   Sun Mar 15 21:25:12 2026 +0700

    ASoC: amd: yc: Add DMI quirk for ASUS EXPERTBOOK BM1403CDA
    
    [ Upstream commit f200b2f9a810c440c6750b56fc647b73337749a1 ]
    
    Add a DMI quirk for the Asus Expertbook BM1403CDA to resolve the issue of the
    internal microphone not being detected.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=221236
    Signed-off-by: Vee Satayamas <vsatayamas@gmail.com>
    Reviewed-by: Zhang Heng <zhangheng@kylinos.cn>
    Link: https://patch.msgid.link/20260315142511.66029-2-vsatayamas@gmail.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: amd: yc: Add DMI quirk for Thin A15 B7VF [+ + +]
Author: Zhang Heng <zhangheng@kylinos.cn>
Date:   Mon Mar 16 16:02:18 2026 +0800

    ASoC: amd: yc: Add DMI quirk for Thin A15 B7VF
    
    [ Upstream commit 1f182ec9d7084db7dfdb2372d453c28f0e5c3f0a ]
    
    Add a DMI quirk for the Thin A15 B7VF fixing the issue where
    the internal microphone was not detected.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=220833
    Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
    Link: https://patch.msgid.link/20260316080218.2931304-1-zhangheng@kylinos.cn
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: qcom: q6apm: move component registration to unmanaged version [+ + +]
Author: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Date:   Thu Apr 2 08:11:06 2026 +0000

    ASoC: qcom: q6apm: move component registration to unmanaged version
    
    commit 6ec1235fc941dac6c011b30ee01d9220ff87e0cd upstream.
    
    q6apm component registers dais dynamically from ASoC toplology, which
    are allocated using device managed version apis. Allocating both
    component and dynamic dais using managed version could lead to incorrect
    free ordering, dai will be freed while component still holding references
    to it.
    
    Fix this issue by moving component to unmanged version so
    that the dai pointers are only freeded after the component is removed.
    
    ==================================================================
    BUG: KASAN: slab-use-after-free in snd_soc_del_component_unlocked+0x3d4/0x400 [snd_soc_core]
    Read of size 8 at addr ffff00084493a6e8 by task kworker/u48:0/3426
    Tainted: [W]=WARN
    Hardware name: LENOVO 21N2ZC5PUS/21N2ZC5PUS, BIOS N42ET57W (1.31 ) 08/08/2024
    Workqueue: pdr_notifier_wq pdr_notifier_work [pdr_interface]
    Call trace:
     show_stack+0x28/0x7c (C)
     dump_stack_lvl+0x60/0x80
     print_report+0x160/0x4b4
     kasan_report+0xac/0xfc
     __asan_report_load8_noabort+0x20/0x34
     snd_soc_del_component_unlocked+0x3d4/0x400 [snd_soc_core]
     snd_soc_unregister_component_by_driver+0x50/0x88 [snd_soc_core]
     devm_component_release+0x30/0x5c [snd_soc_core]
     devres_release_all+0x13c/0x210
     device_unbind_cleanup+0x20/0x190
     device_release_driver_internal+0x350/0x468
     device_release_driver+0x18/0x30
     bus_remove_device+0x1a0/0x35c
     device_del+0x314/0x7f0
     device_unregister+0x20/0xbc
     apr_remove_device+0x5c/0x7c [apr]
     device_for_each_child+0xd8/0x160
     apr_pd_status+0x7c/0xa8 [apr]
     pdr_notifier_work+0x114/0x240 [pdr_interface]
     process_one_work+0x500/0xb70
     worker_thread+0x630/0xfb0
     kthread+0x370/0x6c0
     ret_from_fork+0x10/0x20
    
    Allocated by task 77:
     kasan_save_stack+0x40/0x68
     kasan_save_track+0x20/0x40
     kasan_save_alloc_info+0x44/0x58
     __kasan_kmalloc+0xbc/0xdc
     __kmalloc_node_track_caller_noprof+0x1f4/0x620
     devm_kmalloc+0x7c/0x1c8
     snd_soc_register_dai+0x50/0x4f0 [snd_soc_core]
     soc_tplg_pcm_elems_load+0x55c/0x1eb8 [snd_soc_core]
     snd_soc_tplg_component_load+0x4f8/0xb60 [snd_soc_core]
     audioreach_tplg_init+0x124/0x1fc [snd_q6apm]
     q6apm_audio_probe+0x10/0x1c [snd_q6apm]
     snd_soc_component_probe+0x5c/0x118 [snd_soc_core]
     soc_probe_component+0x44c/0xaf0 [snd_soc_core]
     snd_soc_bind_card+0xad0/0x2370 [snd_soc_core]
     snd_soc_register_card+0x3b0/0x4c0 [snd_soc_core]
     devm_snd_soc_register_card+0x50/0xc8 [snd_soc_core]
     x1e80100_platform_probe+0x208/0x368 [snd_soc_x1e80100]
     platform_probe+0xc0/0x188
     really_probe+0x188/0x804
     __driver_probe_device+0x158/0x358
     driver_probe_device+0x60/0x190
     __device_attach_driver+0x16c/0x2a8
     bus_for_each_drv+0x100/0x194
     __device_attach+0x174/0x380
     device_initial_probe+0x14/0x20
     bus_probe_device+0x124/0x154
     deferred_probe_work_func+0x140/0x220
     process_one_work+0x500/0xb70
     worker_thread+0x630/0xfb0
     kthread+0x370/0x6c0
     ret_from_fork+0x10/0x20
    
    Freed by task 3426:
     kasan_save_stack+0x40/0x68
     kasan_save_track+0x20/0x40
     __kasan_save_free_info+0x4c/0x80
     __kasan_slab_free+0x78/0xa0
     kfree+0x100/0x4a4
     devres_release_all+0x144/0x210
     device_unbind_cleanup+0x20/0x190
     device_release_driver_internal+0x350/0x468
     device_release_driver+0x18/0x30
     bus_remove_device+0x1a0/0x35c
     device_del+0x314/0x7f0
     device_unregister+0x20/0xbc
     apr_remove_device+0x5c/0x7c [apr]
     device_for_each_child+0xd8/0x160
     apr_pd_status+0x7c/0xa8 [apr]
     pdr_notifier_work+0x114/0x240 [pdr_interface]
     process_one_work+0x500/0xb70
     worker_thread+0x630/0xfb0
     kthread+0x370/0x6c0
     ret_from_fork+0x10/0x20
    
    Fixes: 5477518b8a0e ("ASoC: qdsp6: audioreach: add q6apm support")
    Cc: Stable@vger.kernel.org
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260402081118.348071-2-srinivas.kandagatla@oss.qualcomm.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ASoC: soc-core: call missing INIT_LIST_HEAD() for card_aux_list [+ + +]
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Fri Mar 27 02:43:54 2026 +0000

    ASoC: soc-core: call missing INIT_LIST_HEAD() for card_aux_list
    
    [ Upstream commit b9eff9732cb0f86a68c9d1592a98ceab47c01e95 ]
    
    Component has "card_aux_list" which is added/deled in bind/unbind aux dev
    function (A), and used in for_each_card_auxs() loop (B).
    
            static void soc_unbind_aux_dev(...)
            {
                    ...
                    for_each_card_auxs_safe(...) {
                            ...
    (A)                     list_del(&component->card_aux_list);
                    }                            ^^^^^^^^^^^^^
            }
    
            static int soc_bind_aux_dev(...)
            {
                    ...
                    for_each_card_pre_auxs(...) {
                            ...
    (A)                     list_add(&component->card_aux_list, ...);
                    }                            ^^^^^^^^^^^^^
                    ...
            }
    
            #define for_each_card_auxs(card, component)     \
    (B)             list_for_each_entry(component, ..., card_aux_list)
                                                        ^^^^^^^^^^^^^
    
    But it has been used without calling INIT_LIST_HEAD().
    
            > git grep card_aux_list sound/soc
            sound/soc/soc-core.c:           list_del(&component->card_aux_list);
            sound/soc/soc-core.c:           list_add(&component->card_aux_list, ...);
    
    call missing INIT_LIST_HEAD() for it.
    
    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Link: https://patch.msgid.link/87341mxa8l.wl-kuninori.morimoto.gx@renesas.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: SOF: topology: reject invalid vendor array size in token parser [+ + +]
Author: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Date:   Thu Mar 19 21:45:26 2026 -0300

    ASoC: SOF: topology: reject invalid vendor array size in token parser
    
    [ Upstream commit 215e5fe75881a7e2425df04aeeed47a903d5cd5d ]
    
    sof_parse_token_sets() accepts array->size values that can be invalid
    for a vendor tuple array header. In particular, a zero size does not
    advance the parser state and can lead to non-progress parsing on
    malformed topology data.
    
    Validate array->size against the minimum header size and reject values
    smaller than sizeof(*array) before parsing. This preserves behavior for
    valid topologies and hardens malformed-input handling.
    
    Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
    Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Link: https://patch.msgid.link/20260319-sof-topology-array-size-fix-v1-1-f9191b16b1b7@gmail.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: stm32_sai: fix incorrect BCLK polarity for DSP_A/B, LEFT_J [+ + +]
Author: Tomasz Merta <tomasz.merta@arrow.com>
Date:   Wed Apr 8 10:40:56 2026 +0200

    ASoC: stm32_sai: fix incorrect BCLK polarity for DSP_A/B, LEFT_J
    
    [ Upstream commit 0669631dbccd41cf3ca7aa70213fcd8bb41c4b38 ]
    
    The STM32 SAI driver do not set the clock strobing bit (CKSTR) for DSP_A,
    DSP_B and LEFT_J formats, causing data to be sampled on the wrong BCLK
    edge when SND_SOC_DAIFMT_NB_NF is used.
    
    Per ALSA convention, NB_NF requires sampling on the rising BCLK edge.
    The STM32MP25 SAI reference manual states that CKSTR=1 is required for
    signals received by the SAI to be sampled on the SCK rising edge.
    Without setting CKSTR=1, the SAI samples on the falling edge, violating
    the NB_NF convention. For comparison, the NXP FSL SAI driver correctly
    sets FSL_SAI_CR2_BCP for DSP_A, DSP_B and LEFT_J, consistent with its
    I2S handling.
    
    This patch adds SAI_XCR1_CKSTR for DSP_A, DSP_B and LEFT_J in
    stm32_sai_set_dai_fmt which was verified empirically with a cs47l35 codec.
    RIGHT_J (LSB) is not investigated and addressed by this patch.
    
    Note: the STM32 I2S driver (stm32_i2s_set_dai_fmt) may have the same issue
    for DSP_A mode, as I2S_CGFR_CKPOL is not set. This has not been verified
    and is left for a separate investigation.
    
    Signed-off-by: Tomasz Merta <tommerta@gmail.com>
    Link: https://patch.msgid.link/20260408084056.20588-1-tommerta@gmail.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ata: ahci: force 32-bit DMA for JMicron JMB582/JMB585 [+ + +]
Author: Arthur Husband <artmoty@gmail.com>
Date:   Mon Apr 6 15:23:35 2026 -0700

    ata: ahci: force 32-bit DMA for JMicron JMB582/JMB585
    
    [ Upstream commit 105c42566a550e2d05fc14f763216a8765ee5d0e ]
    
    The JMicron JMB585 (and JMB582) SATA controllers advertise 64-bit DMA
    support via the S64A bit in the AHCI CAP register, but their 64-bit DMA
    implementation is defective. Under sustained I/O, DMA transfers targeting
    addresses above 4GB silently corrupt data -- writes land at incorrect
    memory addresses with no errors logged.
    
    The failure pattern is similar to the ASMedia ASM1061
    (commit 20730e9b2778 ("ahci: add 43-bit DMA address quirk for ASMedia
    ASM1061 controllers")), which also falsely advertised full 64-bit DMA
    support. However, the JMB585 requires a stricter 32-bit DMA mask rather
    than 43-bit, as corruption occurs with any address above 4GB.
    
    On the Minisforum N5 Pro specifically, the combination of the JMB585's
    broken 64-bit DMA with the AMD Family 1Ah (Strix Point) IOMMU causes
    silent data corruption that is only detectable via checksumming
    filesystems (BTRFS/ZFS scrub). The corruption occurs when 32-bit IOVA
    space is exhausted and the kernel transparently switches to 64-bit DMA
    addresses.
    
    Add device-specific PCI ID entries for the JMB582 (0x0582) and JMB585
    (0x0585) before the generic JMicron class match, using a new board type
    that combines AHCI_HFLAG_IGN_IRQ_IF_ERR (preserving existing behavior)
    with AHCI_HFLAG_32BIT_ONLY to force 32-bit DMA masks.
    
    Signed-off-by: Arthur Husband <artmoty@gmail.com>
    Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
    Signed-off-by: Niklas Cassel <cassel@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
bcache: fix cached_dev.sb_bio use-after-free and crash [+ + +]
Author: Mingzhe Zou <mingzhe.zou@easystack.cn>
Date:   Sun Mar 22 21:41:02 2026 +0800

    bcache: fix cached_dev.sb_bio use-after-free and crash
    
    commit fec114a98b8735ee89c75216c45a78e28be0f128 upstream.
    
    In our production environment, we have received multiple crash reports
    regarding libceph, which have caught our attention:
    
    ```
    [6888366.280350] Call Trace:
    [6888366.280452]  blk_update_request+0x14e/0x370
    [6888366.280561]  blk_mq_end_request+0x1a/0x130
    [6888366.280671]  rbd_img_handle_request+0x1a0/0x1b0 [rbd]
    [6888366.280792]  rbd_obj_handle_request+0x32/0x40 [rbd]
    [6888366.280903]  __complete_request+0x22/0x70 [libceph]
    [6888366.281032]  osd_dispatch+0x15e/0xb40 [libceph]
    [6888366.281164]  ? inet_recvmsg+0x5b/0xd0
    [6888366.281272]  ? ceph_tcp_recvmsg+0x6f/0xa0 [libceph]
    [6888366.281405]  ceph_con_process_message+0x79/0x140 [libceph]
    [6888366.281534]  ceph_con_v1_try_read+0x5d7/0xf30 [libceph]
    [6888366.281661]  ceph_con_workfn+0x329/0x680 [libceph]
    ```
    
    After analyzing the coredump file, we found that the address of
    dc->sb_bio has been freed. We know that cached_dev is only freed when it
    is stopped.
    
    Since sb_bio is a part of struct cached_dev, rather than an alloc every
    time.  If the device is stopped while writing to the superblock, the
    released address will be accessed at endio.
    
    This patch hopes to wait for sb_write to complete in cached_dev_free.
    
    It should be noted that we analyzed the cause of the problem, then tell
    all details to the QWEN and adopted the modifications it made.
    
    Signed-off-by: Mingzhe Zou <mingzhe.zou@easystack.cn>
    Fixes: cafe563591446 ("bcache: A block layer cache")
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Coly Li <colyli@fnnas.com>
    Link: https://patch.msgid.link/20260322134102.480107-1-colyli@fnnas.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
blktrace: fix __this_cpu_read/write in preemptible context [+ + +]
Author: Chaitanya Kulkarni <kch@nvidia.com>
Date:   Thu Apr 16 18:08:59 2026 +0800

    blktrace: fix __this_cpu_read/write in preemptible context
    
    [ Upstream commit da46b5dfef48658d03347cda21532bcdbb521e67 ]
    
    tracing_record_cmdline() internally uses __this_cpu_read() and
    __this_cpu_write() on the per-CPU variable trace_cmdline_save, and
    trace_save_cmdline() explicitly asserts preemption is disabled via
    lockdep_assert_preemption_disabled(). These operations are only safe
    when preemption is off, as they were designed to be called from the
    scheduler context (probe_wakeup_sched_switch() / probe_wakeup()).
    
    __blk_add_trace() was calling tracing_record_cmdline(current) early in
    the blk_tracer path, before ring buffer reservation, from process
    context where preemption is fully enabled. This triggers the following
    using blktests/blktrace/002:
    
    blktrace/002 (blktrace ftrace corruption with sysfs trace)   [failed]
        runtime  0.367s  ...  0.437s
        something found in dmesg:
        [   81.211018] run blktests blktrace/002 at 2026-02-25 22:24:33
        [   81.239580] null_blk: disk nullb1 created
        [   81.357294] BUG: using __this_cpu_read() in preemptible [00000000] code: dd/2516
        [   81.362842] caller is tracing_record_cmdline+0x10/0x40
        [   81.362872] CPU: 16 UID: 0 PID: 2516 Comm: dd Tainted: G                 N  7.0.0-rc1lblk+ #84 PREEMPT(full)
        [   81.362877] Tainted: [N]=TEST
        [   81.362878] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.17.0-0-gb52ca86e094d-prebuilt.qemu.org 04/01/2014
        [   81.362881] Call Trace:
        [   81.362884]  <TASK>
        [   81.362886]  dump_stack_lvl+0x8d/0xb0
        ...
        (See '/mnt/sda/blktests/results/nodev/blktrace/002.dmesg' for the entire message)
    
    [   81.211018] run blktests blktrace/002 at 2026-02-25 22:24:33
    [   81.239580] null_blk: disk nullb1 created
    [   81.357294] BUG: using __this_cpu_read() in preemptible [00000000] code: dd/2516
    [   81.362842] caller is tracing_record_cmdline+0x10/0x40
    [   81.362872] CPU: 16 UID: 0 PID: 2516 Comm: dd Tainted: G                 N  7.0.0-rc1lblk+ #84 PREEMPT(full)
    [   81.362877] Tainted: [N]=TEST
    [   81.362878] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.17.0-0-gb52ca86e094d-prebuilt.qemu.org 04/01/2014
    [   81.362881] Call Trace:
    [   81.362884]  <TASK>
    [   81.362886]  dump_stack_lvl+0x8d/0xb0
    [   81.362895]  check_preemption_disabled+0xce/0xe0
    [   81.362902]  tracing_record_cmdline+0x10/0x40
    [   81.362923]  __blk_add_trace+0x307/0x5d0
    [   81.362934]  ? lock_acquire+0xe0/0x300
    [   81.362940]  ? iov_iter_extract_pages+0x101/0xa30
    [   81.362959]  blk_add_trace_bio+0x106/0x1e0
    [   81.362968]  submit_bio_noacct_nocheck+0x24b/0x3a0
    [   81.362979]  ? lockdep_init_map_type+0x58/0x260
    [   81.362988]  submit_bio_wait+0x56/0x90
    [   81.363009]  __blkdev_direct_IO_simple+0x16c/0x250
    [   81.363026]  ? __pfx_submit_bio_wait_endio+0x10/0x10
    [   81.363038]  ? rcu_read_lock_any_held+0x73/0xa0
    [   81.363051]  blkdev_read_iter+0xc1/0x140
    [   81.363059]  vfs_read+0x20b/0x330
    [   81.363083]  ksys_read+0x67/0xe0
    [   81.363090]  do_syscall_64+0xbf/0xf00
    [   81.363102]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
    [   81.363106] RIP: 0033:0x7f281906029d
    [   81.363111] Code: 31 c0 e9 c6 fe ff ff 50 48 8d 3d 66 63 0a 00 e8 59 ff 01 00 66 0f 1f 84 00 00 00 00 00 80 3d 41 33 0e 00 00 74 17 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 5b c3 66 2e 0f 1f 84 00 00 00 00 00 48 83 ec
    [   81.363113] RSP: 002b:00007ffca127dd48 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
    [   81.363120] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f281906029d
    [   81.363122] RDX: 0000000000001000 RSI: 0000559f8bfae000 RDI: 0000000000000000
    [   81.363123] RBP: 0000000000001000 R08: 0000002863a10a81 R09: 00007f281915f000
    [   81.363124] R10: 00007f2818f77b60 R11: 0000000000000246 R12: 0000559f8bfae000
    [   81.363126] R13: 0000000000000000 R14: 0000000000000000 R15: 000000000000000a
    [   81.363142]  </TASK>
    
    The same BUG fires from blk_add_trace_plug(), blk_add_trace_unplug(),
    and blk_add_trace_rq() paths as well.
    
    The purpose of tracing_record_cmdline() is to cache the task->comm for
    a given PID so that the trace can later resolve it. It is only
    meaningful when a trace event is actually being recorded. Ring buffer
    reservation via ring_buffer_lock_reserve() disables preemption, and
    preemption remains disabled until the event is committed :-
    
    __blk_add_trace()
            __trace_buffer_lock_reserve()
                    __trace_buffer_lock_reserve()
                            ring_buffer_lock_reserve()
                                    preempt_disable_notrace();  <---
    
    With this fix blktests for blktrace pass:
    
      blktests (master) # ./check blktrace
      blktrace/001 (blktrace zone management command tracing)      [passed]
          runtime  3.650s  ...  3.647s
      blktrace/002 (blktrace ftrace corruption with sysfs trace)   [passed]
          runtime  0.411s  ...  0.384s
    
    Fixes: 7ffbd48d5cab ("tracing: Cache comms only after an event occurred")
    Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
    Suggested-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
    Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Rajani Kantha <681739313@139.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
btrfs: merge btrfs_orig_bbio_end_io() into btrfs_bio_end_io() [+ + +]
Author: Qu Wenruo <wqu@suse.com>
Date:   Fri Apr 17 10:51:15 2026 +0800

    btrfs: merge btrfs_orig_bbio_end_io() into btrfs_bio_end_io()
    
    [ Upstream commit 9ca0e58cb752b09816f56f7a3147a39773d5e831 ]
    
    There are only two differences between the two functions:
    
    - btrfs_orig_bbio_end_io() does extra error propagation
      This is mostly to allow tolerance for write errors.
    
    - btrfs_orig_bbio_end_io() does extra pending_ios check
      This check can handle both the original bio, or the cloned one.
      (All accounting happens in the original one).
    
    This makes btrfs_orig_bbio_end_io() a much safer call.
    In fact we already had a double freeing error due to usage of
    btrfs_bio_end_io() in the error path of btrfs_submit_chunk().
    
    So just move the whole content of btrfs_orig_bbio_end_io() into
    btrfs_bio_end_io().
    
    For normal paths this brings no change, because they are already calling
    btrfs_orig_bbio_end_io() in the first place.
    
    For error paths (not only inside bio.c but also external callers), this
    change will introduce extra checks, especially for external callers, as
    they will error out without submitting the btrfs bio.
    
    But considering it's already in the error path, such slower but much
    safer checks are still an overall win.
    
    Signed-off-by: Qu Wenruo <wqu@suse.com>
    Reviewed-by: David Sterba <dsterba@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Ruohan Lan <ruohanlan@aliyun.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

btrfs: tracepoints: get correct superblock from dentry in event btrfs_sync_file() [+ + +]
Author: Goldwyn Rodrigues <rgoldwyn@suse.de>
Date:   Fri Mar 13 14:11:39 2026 -0400

    btrfs: tracepoints: get correct superblock from dentry in event btrfs_sync_file()
    
    [ Upstream commit a85b46db143fda5869e7d8df8f258ccef5fa1719 ]
    
    If overlay is used on top of btrfs, dentry->d_sb translates to overlay's
    super block and fsid assignment will lead to a crash.
    
    Use file_inode(file)->i_sb to always get btrfs_sb.
    
    Reviewed-by: Boris Burkov <boris@bur.io>
    Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
can: mcp251x: add error handling for power enable in open and resume [+ + +]
Author: Wenyuan Li <2063309626@qq.com>
Date:   Mon Mar 16 00:00:22 2026 +0800

    can: mcp251x: add error handling for power enable in open and resume
    
    [ Upstream commit 7a57354756c7df223abe2c33774235ad70cb4231 ]
    
    Add missing error handling for mcp251x_power_enable() calls in both
    mcp251x_open() and mcp251x_can_resume() functions.
    
    In mcp251x_open(), if power enable fails, jump to error path to close
    candev without attempting to disable power again.
    
    In mcp251x_can_resume(), properly check return values of power enable calls
    for both power and transceiver regulators. If any fails, return the error
    code to the PM framework and log the failure.
    
    This ensures the driver properly handles power control failures and
    maintains correct device state.
    
    Signed-off-by: Wenyuan Li <2063309626@qq.com>
    Link: https://patch.msgid.link/tencent_F3EFC5D7738AC548857B91657715E2D3AA06@qq.com
    [mkl: fix patch description]
    [mkl: mcp251x_can_resume(): replace goto by return]
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

can: raw: fix ro->uniq use-after-free in raw_rcv() [+ + +]
Author: Samuel Page <sam@bynar.io>
Date:   Wed Apr 8 15:30:13 2026 +0100

    can: raw: fix ro->uniq use-after-free in raw_rcv()
    
    commit a535a9217ca3f2fccedaafb2fddb4c48f27d36dc upstream.
    
    raw_release() unregisters raw CAN receive filters via can_rx_unregister(),
    but receiver deletion is deferred with call_rcu(). This leaves a window
    where raw_rcv() may still be running in an RCU read-side critical section
    after raw_release() frees ro->uniq, leading to a use-after-free of the
    percpu uniq storage.
    
    Move free_percpu(ro->uniq) out of raw_release() and into a raw-specific
    socket destructor. can_rx_unregister() takes an extra reference to the
    socket and only drops it from the RCU callback, so freeing uniq from
    sk_destruct ensures the percpu area is not released until the relevant
    callbacks have drained.
    
    Fixes: 514ac99c64b2 ("can: fix multiple delivery of a single CAN frame for overlapping CAN filters")
    Cc: stable@vger.kernel.org # v4.1+
    Assisted-by: Bynario AI
    Signed-off-by: Samuel Page <sam@bynar.io>
    Link: https://patch.msgid.link/26ec626d-cae7-4418-9782-7198864d070c@bynar.io
    Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
    [mkl: applied manually]
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
checkpatch: add support for Assisted-by tag [+ + +]
Author: Sasha Levin <sashal@kernel.org>
Date:   Wed Mar 11 17:58:17 2026 -0400

    checkpatch: add support for Assisted-by tag
    
    commit d1db4118489fffd2b2f612140b7acbb477880839 upstream.
    
    The Assisted-by tag was introduced in
    Documentation/process/coding-assistants.rst for attributing AI tool
    contributions to kernel patches.  However, checkpatch.pl did not recognize
    this tag, causing two issues:
    
      WARNING: Non-standard signature: Assisted-by:
      ERROR: Unrecognized email address: 'AGENT_NAME:MODEL_VERSION'
    
    Fix this by:
    1. Adding Assisted-by to the recognized $signature_tags list
    2. Skipping email validation for Assisted-by lines since they use the
       AGENT_NAME:MODEL_VERSION format instead of an email address
    3. Warning when the Assisted-by value doesn't match the expected format
    
    Link: https://lkml.kernel.org/r/20260311215818.518930-1-sashal@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Reported-by: Bart Van Assche <bvanassche@acm.org>
    Acked-by: Joe Perches <joe@perches.com>
    Cc: Andy Whitcroft <apw@canonical.com>
    Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
crypto: algif_aead - Fix minimum RX size check for decryption [+ + +]
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Sun Apr 12 13:32:21 2026 +0800

    crypto: algif_aead - Fix minimum RX size check for decryption
    
    [ Upstream commit 3d14bd48e3a77091cbce637a12c2ae31b4a1687c ]
    
    The check for the minimum receive buffer size did not take the
    tag size into account during decryption.  Fix this by adding the
    required extra length.
    
    Reported-by: syzbot+aa11561819dc42ebbc7c@syzkaller.appspotmail.com
    Reported-by: Daniel Pouzzner <douzzer@mega.nu>
    Fixes: d887c52d6ae4 ("crypto: algif_aead - overhaul memory management")
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

crypto: ccp: Don't attempt to copy CSR to userspace if PSP command failed [+ + +]
Author: Sean Christopherson <seanjc@google.com>
Date:   Fri Mar 13 10:43:16 2026 -0700

    crypto: ccp: Don't attempt to copy CSR to userspace if PSP command failed
    
    commit abe4a6d6f606113251868c2c4a06ba904bb41eed upstream.
    
    When retrieving the PEK CSR, don't attempt to copy the blob to userspace
    if the firmware command failed.  If the failure was due to an invalid
    length, i.e. the userspace buffer+length was too small, copying the number
    of bytes _firmware_ requires will overflow the kernel-allocated buffer and
    leak data to userspace.
    
      BUG: KASAN: slab-out-of-bounds in instrument_copy_to_user ../include/linux/instrumented.h:129 [inline]
      BUG: KASAN: slab-out-of-bounds in _inline_copy_to_user ../include/linux/uaccess.h:205 [inline]
      BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26
      Read of size 2084 at addr ffff898144612e20 by task syz.9.219/21405
    
      CPU: 14 UID: 0 PID: 21405 Comm: syz.9.219 Tainted: G     U     O        7.0.0-smp-DEV #28 PREEMPTLAZY
      Tainted: [U]=USER, [O]=OOT_MODULE
      Hardware name: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 12.62.0-0 11/19/2025
      Call Trace:
       <TASK>
       dump_stack_lvl+0xc5/0x110 ../lib/dump_stack.c:120
       print_address_description ../mm/kasan/report.c:378 [inline]
       print_report+0xbc/0x260 ../mm/kasan/report.c:482
       kasan_report+0xa2/0xe0 ../mm/kasan/report.c:595
       check_region_inline ../mm/kasan/generic.c:-1 [inline]
       kasan_check_range+0x264/0x2c0 ../mm/kasan/generic.c:200
       instrument_copy_to_user ../include/linux/instrumented.h:129 [inline]
       _inline_copy_to_user ../include/linux/uaccess.h:205 [inline]
       _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26
       copy_to_user ../include/linux/uaccess.h:236 [inline]
       sev_ioctl_do_pek_csr+0x31f/0x590 ../drivers/crypto/ccp/sev-dev.c:1872
       sev_ioctl+0x3a4/0x490 ../drivers/crypto/ccp/sev-dev.c:2562
       vfs_ioctl ../fs/ioctl.c:51 [inline]
       __do_sys_ioctl ../fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0x11d/0x1b0 ../fs/ioctl.c:583
       do_syscall_x64 ../arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0xe0/0x800 ../arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x76/0x7e
       </TASK>
    
    WARN if the driver says the command succeeded, but the firmware error code
    says otherwise, as __sev_do_cmd_locked() is expected to return -EIO on any
    firwmware error.
    
    Reported-by: Alexander Potapenko <glider@google.com>
    Reported-by: Sebastian Alba Vives <sebasjosue84@gmail.com>
    Fixes: e799035609e1 ("crypto: ccp: Implement SEV_PEK_CSR ioctl command")
    Cc: stable@vger.kernel.org
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

crypto: ccp: Don't attempt to copy ID to userspace if PSP command failed [+ + +]
Author: Sean Christopherson <seanjc@google.com>
Date:   Fri Mar 13 10:57:31 2026 -0700

    crypto: ccp: Don't attempt to copy ID to userspace if PSP command failed
    
    commit 4f685dbfa87c546e51d9dc6cab379d20f275e114 upstream.
    
    When retrieving the ID for the CPU, don't attempt to copy the ID blob to
    userspace if the firmware command failed.  If the failure was due to an
    invalid length, i.e. the userspace buffer+length was too small, copying
    the number of bytes _firmware_ requires will overflow the kernel-allocated
    buffer and leak data to userspace.
    
      BUG: KASAN: slab-out-of-bounds in instrument_copy_to_user ../include/linux/instrumented.h:129 [inline]
      BUG: KASAN: slab-out-of-bounds in _inline_copy_to_user ../include/linux/uaccess.h:205 [inline]
      BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26
      Read of size 64 at addr ffff8881867f5960 by task syz.0.906/24388
    
      CPU: 130 UID: 0 PID: 24388 Comm: syz.0.906 Tainted: G     U     O        7.0.0-smp-DEV #28 PREEMPTLAZY
      Tainted: [U]=USER, [O]=OOT_MODULE
      Hardware name: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 12.62.0-0 11/19/2025
      Call Trace:
       <TASK>
       dump_stack_lvl+0xc5/0x110 ../lib/dump_stack.c:120
       print_address_description ../mm/kasan/report.c:378 [inline]
       print_report+0xbc/0x260 ../mm/kasan/report.c:482
       kasan_report+0xa2/0xe0 ../mm/kasan/report.c:595
       check_region_inline ../mm/kasan/generic.c:-1 [inline]
       kasan_check_range+0x264/0x2c0 ../mm/kasan/generic.c:200
       instrument_copy_to_user ../include/linux/instrumented.h:129 [inline]
       _inline_copy_to_user ../include/linux/uaccess.h:205 [inline]
       _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26
       copy_to_user ../include/linux/uaccess.h:236 [inline]
       sev_ioctl_do_get_id2+0x361/0x490 ../drivers/crypto/ccp/sev-dev.c:2222
       sev_ioctl+0x25f/0x490 ../drivers/crypto/ccp/sev-dev.c:2575
       vfs_ioctl ../fs/ioctl.c:51 [inline]
       __do_sys_ioctl ../fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0x11d/0x1b0 ../fs/ioctl.c:583
       do_syscall_x64 ../arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0xe0/0x800 ../arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x76/0x7e
       </TASK>
    
    WARN if the driver says the command succeeded, but the firmware error code
    says otherwise, as __sev_do_cmd_locked() is expected to return -EIO on any
    firwmware error.
    
    Reported-by: Alexander Potapenko <glider@google.com>
    Reported-by: Sebastian Alba Vives <sebasjosue84@gmail.com>
    Fixes: d6112ea0cb34 ("crypto: ccp - introduce SEV_GET_ID2 command")
    Cc: stable@vger.kernel.org
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

crypto: ccp: Don't attempt to copy PDH cert to userspace if PSP command failed [+ + +]
Author: Sean Christopherson <seanjc@google.com>
Date:   Fri Mar 13 10:48:53 2026 -0700

    crypto: ccp: Don't attempt to copy PDH cert to userspace if PSP command failed
    
    commit e76239fed3cffd6d304d8ca3ce23984fd24f57d3 upstream.
    
    When retrieving the PDH cert, don't attempt to copy the blobs to userspace
    if the firmware command failed.  If the failure was due to an invalid
    length, i.e. the userspace buffer+length was too small, copying the number
    of bytes _firmware_ requires will overflow the kernel-allocated buffer and
    leak data to userspace.
    
      BUG: KASAN: slab-out-of-bounds in instrument_copy_to_user ../include/linux/instrumented.h:129 [inline]
      BUG: KASAN: slab-out-of-bounds in _inline_copy_to_user ../include/linux/uaccess.h:205 [inline]
      BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26
      Read of size 2084 at addr ffff8885c4ab8aa0 by task syz.0.186/21033
    
      CPU: 51 UID: 0 PID: 21033 Comm: syz.0.186 Tainted: G     U     O        7.0.0-smp-DEV #28 PREEMPTLAZY
      Tainted: [U]=USER, [O]=OOT_MODULE
      Hardware name: Google, Inc.                                                       Arcadia_IT_80/Arcadia_IT_80, BIOS 34.84.12-0 11/17/2025
      Call Trace:
       <TASK>
       dump_stack_lvl+0xc5/0x110 ../lib/dump_stack.c:120
       print_address_description ../mm/kasan/report.c:378 [inline]
       print_report+0xbc/0x260 ../mm/kasan/report.c:482
       kasan_report+0xa2/0xe0 ../mm/kasan/report.c:595
       check_region_inline ../mm/kasan/generic.c:-1 [inline]
       kasan_check_range+0x264/0x2c0 ../mm/kasan/generic.c:200
       instrument_copy_to_user ../include/linux/instrumented.h:129 [inline]
       _inline_copy_to_user ../include/linux/uaccess.h:205 [inline]
       _copy_to_user+0x66/0xa0 ../lib/usercopy.c:26
       copy_to_user ../include/linux/uaccess.h:236 [inline]
       sev_ioctl_do_pdh_export+0x3d3/0x7c0 ../drivers/crypto/ccp/sev-dev.c:2347
       sev_ioctl+0x2a2/0x490 ../drivers/crypto/ccp/sev-dev.c:2568
       vfs_ioctl ../fs/ioctl.c:51 [inline]
       __do_sys_ioctl ../fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0x11d/0x1b0 ../fs/ioctl.c:583
       do_syscall_x64 ../arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0xe0/0x800 ../arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x76/0x7e
       </TASK>
    
    WARN if the driver says the command succeeded, but the firmware error code
    says otherwise, as __sev_do_cmd_locked() is expected to return -EIO on any
    firwmware error.
    
    Reported-by: Alexander Potapenko <glider@google.com>
    Reported-by: Sebastian Alba Vives <sebasjosue84@gmail.com>
    Fixes: 76a2b524a4b1 ("crypto: ccp: Implement SEV_PDH_CERT_EXPORT ioctl command")
    Cc: stable@vger.kernel.org
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

crypto: testmgr - Hide ENOENT errors [+ + +]
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Tue Sep 3 07:33:40 2024 +0800

    crypto: testmgr - Hide ENOENT errors
    
    commit 4eded6d14f5b7bb857b68872970a40cf3105c015 upstream.
    
    When a crypto algorithm with a higher priority is registered, it
    kills the spawns of all lower-priority algorithms.  Thus it is to
    be expected for an algorithm to go away at any time, even during
    a self-test.  This is now much more common with asynchronous testing.
    
    Remove the printk when an ENOENT is encountered during a self-test.
    This is not really an error since the algorithm being tested is no
    longer there (i.e., it didn't fail the test which is what we care
    about).
    
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Cc: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

crypto: testmgr - Hide ENOENT errors better [+ + +]
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Sun Oct 6 09:24:56 2024 +0800

    crypto: testmgr - Hide ENOENT errors better
    
    commit 6318fbe26e67f9c27a1917fe63936b0fc6000373 upstream.
    
    The previous patch removed the ENOENT warning at the point of
    allocation, but the overall self-test warning is still there.
    
    Fix all of them by returning zero as the test result.  This is
    safe because if the algorithm has gone away, then it cannot be
    marked as tested.
    
    Fixes: 4eded6d14f5b ("crypto: testmgr - Hide ENOENT errors")
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Cc: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
dcache: Limit the minimal number of bucket to two [+ + +]
Author: Zhihao Cheng <chengzhihao1@huawei.com>
Date:   Fri Jan 30 11:48:53 2026 +0800

    dcache: Limit the minimal number of bucket to two
    
    commit f08fe8891c3eeb63b73f9f1f6d97aa629c821579 upstream.
    
    There is an OOB read problem on dentry_hashtable when user sets
    'dhash_entries=1':
      BUG: unable to handle page fault for address: ffff888b30b774b0
      #PF: supervisor read access in kernel mode
      #PF: error_code(0x0000) - not-present page
      Oops: Oops: 0000 [#1] SMP PTI
      RIP: 0010:__d_lookup+0x56/0x120
       Call Trace:
        d_lookup.cold+0x16/0x5d
        lookup_dcache+0x27/0xf0
        lookup_one_qstr_excl+0x2a/0x180
        start_dirop+0x55/0xa0
        simple_start_creating+0x8d/0xa0
        debugfs_start_creating+0x8c/0x180
        debugfs_create_dir+0x1d/0x1c0
        pinctrl_init+0x6d/0x140
        do_one_initcall+0x6d/0x3d0
        kernel_init_freeable+0x39f/0x460
        kernel_init+0x2a/0x260
    
    There will be only one bucket in dentry_hashtable when dhash_entries is
    set as one, and d_hash_shift is calculated as 32 by dcache_init(). Then,
    following process will access more than one buckets(which memory region
    is not allocated) in dentry_hashtable:
     d_lookup
      b = d_hash(hash)
        dentry_hashtable + ((u32)hashlen >> d_hash_shift)
        // The C standard defines the behavior of right shift amounts
        // exceeding the bit width of the operand as undefined. The
        // result of '(u32)hashlen >> d_hash_shift' becomes 'hashlen',
        // so 'b' will point to an unallocated memory region.
      hlist_bl_for_each_entry_rcu(b)
       hlist_bl_first_rcu(head)
        h->first  // read OOB!
    
    Fix it by limiting the minimal number of dentry_hashtable bucket to two,
    so that 'd_hash_shift' won't exceeds the bit width of type u32.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
    Link: https://patch.msgid.link/20260130034853.215819-1-chengzhihao1@huawei.com
    Reviewed-by: Yang Erkun <yangerkun@huawei.com>
    Signed-off-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Docs/admin-guide/mm/damon/reclaim: warn commit_inputs vs param updates race [+ + +]
Author: SeongJae Park <sj@kernel.org>
Date:   Sun Mar 29 08:30:49 2026 -0700

    Docs/admin-guide/mm/damon/reclaim: warn commit_inputs vs param updates race
    
    commit 0beba407d4585a15b0dc09f2064b5b3ddcb0e857 upstream.
    
    Patch series "Docs/admin-guide/mm/damon: warn commit_inputs vs other
    params race".
    
    Writing 'Y' to the commit_inputs parameter of DAMON_RECLAIM and
    DAMON_LRU_SORT, and writing other parameters before the commit_inputs
    request is completely processed can cause race conditions.  While the
    consequence can be bad, the documentation is not clearly describing that.
    Add clear warnings.
    
    The issue was discovered [1,2] by sashiko.
    
    
    This patch (of 2):
    
    DAMON_RECLAIM handles commit_inputs request inside kdamond thread,
    reading the module parameters.  If the user updates the module
    parameters while the kdamond thread is reading those, races can happen.
    To avoid this, the commit_inputs parameter shows whether it is still in
    the progress, assuming users wouldn't update parameters in the middle of
    the work.  Some users might ignore that.  Add a warning about the
    behavior.
    
    The issue was discovered in [1] by sashiko.
    
    Link: https://lore.kernel.org/20260329153052.46657-2-sj@kernel.org
    Link: https://lore.kernel.org/20260319161620.189392-3-objecting@objecting.org [1]
    Link: https://lore.kernel.org/20260319161620.189392-2-objecting@objecting.org [3]
    Fixes: 81a84182c343 ("Docs/admin-guide/mm/damon/reclaim: document 'commit_inputs' parameter")
    Signed-off-by: SeongJae Park <sj@kernel.org>
    Cc: <stable@vger.kernel.org> # 5.19.x
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/i915/psr: Do not use pipe_src as borders for SU area [+ + +]
Author: Jouni Högander <jouni.hogander@intel.com>
Date:   Mon Apr 13 12:26:31 2026 -0400

    drm/i915/psr: Do not use pipe_src as borders for SU area
    
    [ Upstream commit 75519f5df2a9b23f7bf305e12dc9a6e3e65c24b7 ]
    
    This far using crtc_state->pipe_src as borders for Selective Update area
    haven't caused visible problems as drm_rect_width(crtc_state->pipe_src) ==
    crtc_state->hw.adjusted_mode.crtc_hdisplay and
    drm_rect_height(crtc_state->pipe_src) ==
    crtc_state->hw.adjusted_mode.crtc_vdisplay when pipe scaling is not
    used. On the other hand using pipe scaling is forcing full frame updates and all the
    Selective Update area calculations are skipped. Now this improper usage of
    crtc_state->pipe_src is causing following warnings:
    
    <4> [7771.978166] xe 0000:00:02.0: [drm] drm_WARN_ON_ONCE(su_lines % vdsc_cfg->slice_height)
    
    after WARN_ON_ONCE was added by commit:
    
    "drm/i915/dsc: Add helper for writing DSC Selective Update ET parameters"
    
    These warnings are seen when DSC and pipe scaling are enabled
    simultaneously. This is because on full frame update SU area is improperly
    set as pipe_src which is not aligned with DSC slice height.
    
    Fix these by creating local rectangle using
    crtc_state->hw.adjusted_mode.crtc_hdisplay and
    crtc_state->hw.adjusted_mode.crtc_vdisplay. Use this local rectangle as
    borders for SU area.
    
    Fixes: d6774b8c3c58 ("drm/i915: Ensure damage clip area is within pipe area")
    Cc: <stable@vger.kernel.org> # v6.0+
    Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
    Reviewed-by: Mika Kahola <mika.kahola@intel.com>
    Link: https://patch.msgid.link/20260327114553.195285-1-jouni.hogander@intel.com
    (cherry picked from commit da0cdc1c329dd2ff09c41fbbe9fbd9c92c5d2c6e)
    Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    [ omitted hunks for DSC selective update ET alignment infrastructure ]
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/vc4: Fix a memory leak in hang state error path [+ + +]
Author: Maíra Canal <mcanal@igalia.com>
Date:   Mon Mar 30 14:51:45 2026 -0300

    drm/vc4: Fix a memory leak in hang state error path
    
    [ Upstream commit 9525d169e5fd481538cf8c663cc5839e54f2e481 ]
    
    When vc4_save_hang_state() encounters an early return condition, it
    returns without freeing the previously allocated `kernel_state`,
    leaking memory.
    
    Add the missing kfree() calls by consolidating the early return paths
    into a single place.
    
    Fixes: 214613656b51 ("drm/vc4: Add an interface for capturing the GPU state after a hang.")
    Reviewed-by: Melissa Wen <mwen@igalia.com>
    Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-3-92defc940a29@igalia.com
    Signed-off-by: Maíra Canal <mcanal@igalia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/vc4: Fix memory leak of BO array in hang state [+ + +]
Author: Maíra Canal <mcanal@igalia.com>
Date:   Mon Mar 30 14:51:44 2026 -0300

    drm/vc4: Fix memory leak of BO array in hang state
    
    [ Upstream commit f4dfd6847b3e5d24e336bca6057485116d17aea4 ]
    
    The hang state's BO array is allocated separately with kzalloc() in
    vc4_save_hang_state() but never freed in vc4_free_hang_state(). Add the
    missing kfree() for the BO array before freeing the hang state struct.
    
    Fixes: 214613656b51 ("drm/vc4: Add an interface for capturing the GPU state after a hang.")
    Reviewed-by: Melissa Wen <mwen@igalia.com>
    Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-2-92defc940a29@igalia.com
    Signed-off-by: Maíra Canal <mcanal@igalia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/vc4: platform_get_irq_byname() returns an int [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Feb 23 16:53:39 2026 +0100

    drm/vc4: platform_get_irq_byname() returns an int
    
    commit e597a809a2b97e927060ba182f58eb3e6101bc70 upstream.
    
    platform_get_irq_byname() will return a negative value if an error
    happens, so it should be checked and not just passed directly into
    devm_request_threaded_irq() hoping all will be ok.
    
    Cc: Maxime Ripard <mripard@kernel.org>
    Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>
    Cc: Maíra Canal <mcanal@igalia.com>
    Cc: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>
    Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Cc: Thomas Zimmermann <tzimmermann@suse.de>
    Cc: David Airlie <airlied@gmail.com>
    Cc: Simona Vetter <simona@ffwll.ch>
    Cc: stable <stable@kernel.org>
    Assisted-by: gkh_clanker_2000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://patch.msgid.link/2026022339-cornflake-t-shirt-2471@gregkh
    Signed-off-by: Maíra Canal <mcanal@igalia.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drm/vc4: Protect madv read in vc4_gem_object_mmap() with madv_lock [+ + +]
Author: Maíra Canal <mcanal@igalia.com>
Date:   Mon Mar 30 14:51:46 2026 -0300

    drm/vc4: Protect madv read in vc4_gem_object_mmap() with madv_lock
    
    [ Upstream commit 338c56050d8e892604da97f67bfa8cc4015a955f ]
    
    The mmap callback reads bo->madv without holding madv_lock, racing with
    concurrent DRM_IOCTL_VC4_GEM_MADVISE calls that modify the field under
    the same lock. Add the missing locking to prevent the data race.
    
    Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
    Reviewed-by: Melissa Wen <mwen@igalia.com>
    Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-4-92defc940a29@igalia.com
    Signed-off-by: Maíra Canal <mcanal@igalia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/vc4: Release runtime PM reference after binding V3D [+ + +]
Author: Maíra Canal <mcanal@igalia.com>
Date:   Mon Mar 30 14:51:43 2026 -0300

    drm/vc4: Release runtime PM reference after binding V3D
    
    [ Upstream commit aaefbdde9abdc43699e110679c0e10972a5e1c59 ]
    
    The vc4_v3d_bind() function acquires a runtime PM reference via
    pm_runtime_resume_and_get() to access V3D registers during setup.
    However, this reference is never released after a successful bind.
    This prevents the device from ever runtime suspending, since the
    reference count never reaches zero.
    
    Release the runtime PM reference by adding pm_runtime_put_autosuspend()
    after autosuspend is configured, allowing the device to runtime suspend
    after the delay.
    
    Fixes: 266cff37d7fc ("drm/vc4: v3d: Rework the runtime_pm setup")
    Reviewed-by: Melissa Wen <mwen@igalia.com>
    Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-1-92defc940a29@igalia.com
    Signed-off-by: Maíra Canal <mcanal@igalia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
dt-bindings: net: Fix Tegra234 MGBE PTP clock [+ + +]
Author: Jon Hunter <jonathanh@nvidia.com>
Date:   Wed Apr 1 11:29:40 2026 +0100

    dt-bindings: net: Fix Tegra234 MGBE PTP clock
    
    [ Upstream commit fb22b1fc5bca3c0aad95388933497ceb30f1fb26 ]
    
    The PTP clock for the Tegra234 MGBE device is incorrectly named
    'ptp-ref' and should be 'ptp_ref'. This is causing the following
    warning to be observed on Tegra234 platforms that use this device:
    
     ERR KERN tegra-mgbe 6800000.ethernet eth0: Invalid PTP clock rate
     WARNING KERN tegra-mgbe 6800000.ethernet eth0: PTP init failed
    
    Although this constitutes an ABI breakage in the binding for this
    device, PTP support has clearly never worked and so fix this now
    so we can correct the device-tree for this device. Note that the
    MGBE driver still supports the legacy 'ptp-ref' clock name and so
    older/existing device-trees will still work, but given that this
    is not the correct name, there is no point to advertise this in the
    binding.
    
    Fixes: 189c2e5c7669 ("dt-bindings: net: Add Tegra234 MGBE")
    Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
    Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260401102941.17466-3-jonathanh@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
e1000: check return value of e1000_read_eeprom [+ + +]
Author: Agalakov Daniil <ade@amicon.ru>
Date:   Wed Mar 18 15:05:05 2026 +0300

    e1000: check return value of e1000_read_eeprom
    
    [ Upstream commit d3baa34a470771399c1495bc04b1e26ac15d598e ]
    
    [Why]
    e1000_set_eeprom() performs a read-modify-write operation when the write
    range is not word-aligned. This requires reading the first and last words
    of the range from the EEPROM to preserve the unmodified bytes.
    
    However, the code does not check the return value of e1000_read_eeprom().
    If the read fails, the operation continues using uninitialized data from
    eeprom_buff. This results in corrupted data being written back to the
    EEPROM for the boundary words.
    
    Add the missing error checks and abort the operation if reading fails.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Co-developed-by: Iskhakov Daniil <dish@amicon.ru>
    Signed-off-by: Iskhakov Daniil <dish@amicon.ru>
    Signed-off-by: Agalakov Daniil <ade@amicon.ru>
    Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
eventpoll: defer struct eventpoll free to RCU grace period [+ + +]
Author: Nicholas Carlini <nicholas@carlini.com>
Date:   Tue Mar 31 15:25:32 2026 +0200

    eventpoll: defer struct eventpoll free to RCU grace period
    
    [ Upstream commit 07712db80857d5d09ae08f3df85a708ecfc3b61f ]
    
    In certain situations, ep_free() in eventpoll.c will kfree the epi->ep
    eventpoll struct while it still being used by another concurrent thread.
    Defer the kfree() to an RCU callback to prevent UAF.
    
    Fixes: f2e467a48287 ("eventpoll: Fix semi-unbounded recursion")
    Signed-off-by: Nicholas Carlini <nicholas@carlini.com>
    Signed-off-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
f2fs: fix to avoid memory leak in f2fs_rename() [+ + +]
Author: Chao Yu <chao@kernel.org>
Date:   Wed Mar 4 16:22:31 2026 +0800

    f2fs: fix to avoid memory leak in f2fs_rename()
    
    commit 3cf11e6f36c170050c12171dd6fd3142711478fc upstream.
    
    syzbot reported a f2fs bug as below:
    
    BUG: memory leak
    unreferenced object 0xffff888127f70830 (size 16):
      comm "syz.0.23", pid 6144, jiffies 4294943712
      hex dump (first 16 bytes):
        3c af 57 72 5b e6 8f ad 6e 8e fd 33 42 39 03 ff  <.Wr[...n..3B9..
      backtrace (crc 925f8a80):
        kmemleak_alloc_recursive include/linux/kmemleak.h:44 [inline]
        slab_post_alloc_hook mm/slub.c:4520 [inline]
        slab_alloc_node mm/slub.c:4844 [inline]
        __do_kmalloc_node mm/slub.c:5237 [inline]
        __kmalloc_noprof+0x3bd/0x560 mm/slub.c:5250
        kmalloc_noprof include/linux/slab.h:954 [inline]
        fscrypt_setup_filename+0x15e/0x3b0 fs/crypto/fname.c:364
        f2fs_setup_filename+0x52/0xb0 fs/f2fs/dir.c:143
        f2fs_rename+0x159/0xca0 fs/f2fs/namei.c:961
        f2fs_rename2+0xd5/0xf20 fs/f2fs/namei.c:1308
        vfs_rename+0x7ff/0x1250 fs/namei.c:6026
        filename_renameat2+0x4f4/0x660 fs/namei.c:6144
        __do_sys_renameat2 fs/namei.c:6173 [inline]
        __se_sys_renameat2 fs/namei.c:6168 [inline]
        __x64_sys_renameat2+0x59/0x80 fs/namei.c:6168
        do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
        do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94
        entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    The root cause is in commit 40b2d55e0452 ("f2fs: fix to create selinux
    label during whiteout initialization"), we added a call to
    f2fs_setup_filename() without a matching call to f2fs_free_filename(),
    fix it.
    
    Fixes: 40b2d55e0452 ("f2fs: fix to create selinux label during whiteout initialization")
    Cc: stable@kernel.org
    Reported-by: syzbot+cf7946ab25b21abc4b66@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/linux-f2fs-devel/69a75fe1.a70a0220.b118c.0014.GAE@google.com
    Suggested-by: Eric Biggers <ebiggers@kernel.org>
    Signed-off-by: Chao Yu <chao@kernel.org>
    Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

f2fs: fix use-after-free of sbi in f2fs_compress_write_end_io() [+ + +]
Author: George Saad <geoo115@gmail.com>
Date:   Mon Mar 23 11:21:23 2026 +0000

    f2fs: fix use-after-free of sbi in f2fs_compress_write_end_io()
    
    commit 39d4ee19c1e7d753dd655aebee632271b171f43a upstream.
    
    In f2fs_compress_write_end_io(), dec_page_count(sbi, type) can bring
    the F2FS_WB_CP_DATA counter to zero, unblocking
    f2fs_wait_on_all_pages() in f2fs_put_super() on a concurrent unmount
    CPU. The unmount path then proceeds to call
    f2fs_destroy_page_array_cache(sbi), which destroys
    sbi->page_array_slab via kmem_cache_destroy(), and eventually
    kfree(sbi). Meanwhile, the bio completion callback is still executing:
    when it reaches page_array_free(sbi, ...), it dereferences
    sbi->page_array_slab — a destroyed slab cache — to call
    kmem_cache_free(), causing a use-after-free.
    
    This is the same class of bug as CVE-2026-23234 (which fixed the
    equivalent race in f2fs_write_end_io() in data.c), but in the
    compressed writeback completion path that was not covered by that fix.
    
    Fix this by moving dec_page_count() to after page_array_free(), so
    that all sbi accesses complete before the counter decrement that can
    unblock unmount. For non-last folios (where atomic_dec_return on
    cic->pending_pages is nonzero), dec_page_count is called immediately
    before returning — page_array_free is not reached on this path, so
    there is no post-decrement sbi access. For the last folio,
    page_array_free runs while the F2FS_WB_CP_DATA counter is still
    nonzero (this folio has not yet decremented it), keeping sbi alive,
    and dec_page_count runs as the final operation.
    
    Fixes: 4c8ff7095bef ("f2fs: support data compression")
    Cc: stable@vger.kernel.org
    Signed-off-by: George Saad <geoo115@gmail.com>
    Reviewed-by: Chao Yu <chao@kernel.org>
    Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
fbdev: tdfxfb: avoid divide-by-zero on FBIOPUT_VSCREENINFO [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Thu Apr 9 15:23:14 2026 +0200

    fbdev: tdfxfb: avoid divide-by-zero on FBIOPUT_VSCREENINFO
    
    commit 8f98b81fe011e1879e6a7b1247e69e06a5e17af2 upstream.
    
    Much like commit 19f953e74356 ("fbdev: fb_pm2fb: Avoid potential divide
    by zero error"), we also need to prevent that same crash from happening
    in the udlfb driver as it uses pixclock directly when dividing, which
    will crash.
    
    Cc: Helge Deller <deller@gmx.de>
    Assisted-by: gregkh_clanker_t1000
    Cc: stable <stable@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Helge Deller <deller@gmx.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

fbdev: udlfb: avoid divide-by-zero on FBIOPUT_VSCREENINFO [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Thu Apr 9 15:23:46 2026 +0200

    fbdev: udlfb: avoid divide-by-zero on FBIOPUT_VSCREENINFO
    
    commit a31e4518bec70333a0a98f2946a12b53b45fe5b9 upstream.
    
    Much like commit 19f953e74356 ("fbdev: fb_pm2fb: Avoid potential divide
    by zero error"), we also need to prevent that same crash from happening
    in the udlfb driver as it uses pixclock directly when dividing, which
    will crash.
    
    Cc: Bernie Thompson <bernie@plugable.com>
    Cc: Helge Deller <deller@gmx.de>
    Fixes: 59277b679f8b ("Staging: udlfb: add dynamic modeset support")
    Assisted-by: gregkh_clanker_t1000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Helge Deller <deller@gmx.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
fs/ntfs3: validate rec->used in journal-replay file record check [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Thu Apr 9 16:37:15 2026 +0200

    fs/ntfs3: validate rec->used in journal-replay file record check
    
    commit 0ca0485e4b2e837ebb6cbd4f2451aba665a03e4b upstream.
    
    check_file_record() validates rec->total against the record size but
    never validates rec->used.  The do_action() journal-replay handlers read
    rec->used from disk and use it to compute memmove lengths:
    
      DeleteAttribute:    memmove(attr, ..., used - asize - roff)
      CreateAttribute:    memmove(..., attr, used - roff)
      change_attr_size:   memmove(..., used - PtrOffset(rec, next))
    
    When rec->used is smaller than the offset of a validated attribute, or
    larger than the record size, these subtractions can underflow allowing
    us to copy huge amounts of memory in to a 4kb buffer, generally
    considered a bad idea overall.
    
    This requires a corrupted filesystem, which isn't a threat model the
    kernel really needs to worry about, but checking for such an obvious
    out-of-bounds value is good to keep things robust, especially on journal
    replay
    
    Fix this up by bounding rec->used correctly.
    
    This is much like commit b2bc7c44ed17 ("fs/ntfs3: Fix slab-out-of-bounds
    read in DeleteIndexEntryRoot") which checked different values in this
    same switch statement.
    
    Cc: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
    Fixes: b46acd6a6a62 ("fs/ntfs3: Add NTFS journal")
    Cc: stable <stable@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
fs/smb/client: fix out-of-bounds read in cifs_sanitize_prepath [+ + +]
Author: Fredric Cover <FredTheDude@proton.me>
Date:   Mon Mar 30 13:11:27 2026 -0700

    fs/smb/client: fix out-of-bounds read in cifs_sanitize_prepath
    
    [ Upstream commit 78ec5bf2f589ec7fd8f169394bfeca541b077317 ]
    
    When cifs_sanitize_prepath is called with an empty string or a string
    containing only delimiters (e.g., "/"), the current logic attempts to
    check *(cursor2 - 1) before cursor2 has advanced. This results in an
    out-of-bounds read.
    
    This patch adds an early exit check after stripping prepended
    delimiters. If no path content remains, the function returns NULL.
    
    The bug was identified via manual audit and verified using a
    standalone test case compiled with AddressSanitizer, which
    triggered a SEGV on affected inputs.
    
    Signed-off-by: Fredric Cover <FredTheDude@proton.me>
    Reviewed-by: Henrique Carvalho <[2]henrique.carvalho@suse.com>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
fuse: Check for large folio with SPLICE_F_MOVE [+ + +]
Author: Bernd Schubert <bschubert@ddn.com>
Date:   Sun Jan 11 12:48:07 2026 +0100

    fuse: Check for large folio with SPLICE_F_MOVE
    
    commit 59ba47b6be9cd0146ef9a55c6e32e337e11e7625 upstream.
    
    xfstest generic/074 and generic/075 complain result in kernel
    warning messages / page dumps.
    This is easily reproducible (on 6.19) with
    CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_ALWAYS=y
    CONFIG_TRANSPARENT_HUGEPAGE_TMPFS_HUGE_ALWAYS=y
    
    This just adds a test for large folios fuse_try_move_folio
    with the same page copy fallback, but to avoid the warnings
    from fuse_check_folio().
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Bernd Schubert <bschubert@ddn.com>
    Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
    Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

fuse: quiet down complaints in fuse_conn_limit_write [+ + +]
Author: Darrick J. Wong <djwong@kernel.org>
Date:   Mon Feb 23 15:06:50 2026 -0800

    fuse: quiet down complaints in fuse_conn_limit_write
    
    commit 129a45f9755a89f573c6a513a6b9e3d234ce89b0 upstream.
    
    gcc 15 complains about an uninitialized variable val that is passed by
    reference into fuse_conn_limit_write:
    
     control.c: In function ‘fuse_conn_congestion_threshold_write’:
     include/asm-generic/rwonce.h:55:37: warning: ‘val’ may be used uninitialized [-Wmaybe-uninitialized]
        55 |         *(volatile typeof(x) *)&(x) = (val);                            \
           |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
     include/asm-generic/rwonce.h:61:9: note: in expansion of macro ‘__WRITE_ONCE’
        61 |         __WRITE_ONCE(x, val);                                           \
           |         ^~~~~~~~~~~~
     control.c:178:9: note: in expansion of macro ‘WRITE_ONCE’
       178 |         WRITE_ONCE(fc->congestion_threshold, val);
           |         ^~~~~~~~~~
     control.c:166:18: note: ‘val’ was declared here
       166 |         unsigned val;
           |                  ^~~
    
    Unfortunately there's enough macro spew involved in kstrtoul_from_user
    that I think gcc gives up on its analysis and sprays the above warning.
    AFAICT it's not actually a bug, but we could just zero-initialize the
    variable to enable using -Wmaybe-uninitialized to find real problems.
    
    Previously we would use some weird uninitialized_var annotation to quiet
    down the warnings, so clearly this code has been like this for quite
    some time.
    
    Cc: stable@vger.kernel.org # v5.9
    Fixes: 3f649ab728cda8 ("treewide: Remove uninitialized_var() usage")
    Signed-off-by: Darrick J. Wong <djwong@kernel.org>
    Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

fuse: reject oversized dirents in page cache [+ + +]
Author: Samuel Page <sam@bynar.io>
Date:   Mon Apr 20 11:01:37 2026 +0200

    fuse: reject oversized dirents in page cache
    
    commit 51a8de6c50bf947c8f534cd73da4c8f0a13e7bed upstream.
    
    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@vger.kernel.org # v6.16+
    Assisted-by: Bynario AI
    Signed-off-by: Samuel Page <sam@bynar.io>
    Reported-by: Qi Tang <tpluszz77@gmail.com>
    Reported-by: Zijun Hu <nightu@northwestern.edu>
    Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
    Link: https://patch.msgid.link/20260420090139.662772-1-mszeredi@redhat.com
    Signed-off-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
gpio: tegra: fix irq_release_resources calling enable instead of disable [+ + +]
Author: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Date:   Tue Apr 7 14:02:47 2026 -0700

    gpio: tegra: fix irq_release_resources calling enable instead of disable
    
    [ Upstream commit 1561d96f5f55c1bca9ff047ace5813f4f244eea6 ]
    
    tegra_gpio_irq_release_resources() erroneously calls tegra_gpio_enable()
    instead of tegra_gpio_disable(). When IRQ resources are released, the
    GPIO configuration bit (CNF) should be cleared to deconfigure the pin as
    a GPIO. Leaving it enabled wastes power and can cause unexpected behavior
    if the pin is later reused for an alternate function via pinctrl.
    
    Fixes: 66fecef5bde0 ("gpio: tegra: Convert to gpio_irq_chip")
    Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
    Link: https://patch.msgid.link/20260407210247.1737938-1-samasth.norway.ananda@oracle.com
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
HID: alps: fix NULL pointer dereference in alps_raw_event() [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Apr 6 16:03:25 2026 +0200

    HID: alps: fix NULL pointer dereference in alps_raw_event()
    
    commit 1badfc4319224820d5d890f8eab6aa52e4e83339 upstream.
    
    Commit ecfa6f34492c ("HID: Add HID_CLAIMED_INPUT guards in raw_event
    callbacks missing them") attempted to fix up the HID drivers that had
    missed the previous fix that was done in 2ff5baa9b527 ("HID: appleir:
    Fix potential NULL dereference at raw event handle"), but the alps
    driver was missed.
    
    Fix this up by properly checking in the hid-alps driver that it had been
    claimed correctly before attempting to process the raw event.
    
    Fixes: 73196ebe134d ("HID: alps: add support for Alps T4 Touchpad device")
    Cc: stable <stable@kernel.org>
    Cc: Jiri Kosina <jikos@kernel.org>
    Cc: Benjamin Tissoires <bentiss@kernel.org>
    Cc: Masaki Ota <masaki.ota@jp.alps.com>
    Cc: linux-input@vger.kernel.org
    Assisted-by: gregkh_clanker_t1000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

HID: core: clamp report_size in s32ton() to avoid undefined shift [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Apr 6 16:04:10 2026 +0200

    HID: core: clamp report_size in s32ton() to avoid undefined shift
    
    commit 69c02ffde6ed4d535fa4e693a9e572729cad3d0d upstream.
    
    s32ton() shifts by n-1 where n is the field's report_size, a value that
    comes directly from a HID device.  The HID parser bounds report_size
    only to <= 256, so a broken HID device can supply a report descriptor
    with a wide field that triggers shift exponents up to 256 on a 32-bit
    type when an output report is built via hid_output_field() or
    hid_set_field().
    
    Commit ec61b41918587 ("HID: core: fix shift-out-of-bounds in
    hid_report_raw_event") added the same n > 32 clamp to the function
    snto32(), but s32ton() was never given the same fix as I guess syzbot
    hadn't figured out how to fuzz a device the same way.
    
    Fix this up by just clamping the max value of n, just like snto32()
    does.
    
    Cc: stable <stable@kernel.org>
    Cc: Jiri Kosina <jikos@kernel.org>
    Cc: Benjamin Tissoires <bentiss@kernel.org>
    Cc: linux-input@vger.kernel.org
    Assisted-by: gregkh_clanker_t1000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

HID: quirks: add HID_QUIRK_ALWAYS_POLL for 8BitDo Pro 3 [+ + +]
Author: leo vriska <leo@60228.dev>
Date:   Wed Mar 4 13:36:59 2026 -0500

    HID: quirks: add HID_QUIRK_ALWAYS_POLL for 8BitDo Pro 3
    
    [ Upstream commit 532743944324a873bbaf8620fcabcd0e69e30c36 ]
    
    According to a mailing list report [1], this controller's predecessor
    has the same issue. However, it uses the xpad driver instead of HID, so
    this quirk wouldn't apply.
    
    [1]: https://lore.kernel.org/linux-input/unufo3$det$1@ciao.gmane.io/
    
    Signed-off-by: leo vriska <leo@60228.dev>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: roccat: fix use-after-free in roccat_report_event [+ + +]
Author: Benoît Sevens <bsevens@google.com>
Date:   Mon Mar 23 16:11:07 2026 +0000

    HID: roccat: fix use-after-free in roccat_report_event
    
    [ Upstream commit d802d848308b35220f21a8025352f0c0aba15c12 ]
    
    roccat_report_event() iterates over the device->readers list without
    holding the readers_lock. This allows a concurrent roccat_release() to
    remove and free a reader while it's still being accessed, leading to a
    use-after-free.
    
    Protect the readers list traversal with the readers_lock mutex.
    
    Signed-off-by: Benoît Sevens <bsevens@google.com>
    Reviewed-by: Silvan Jegen <s.jegen@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
i2c: s3c24xx: check the size of the SMBUS message before using it [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Feb 23 18:05:15 2026 +0100

    i2c: s3c24xx: check the size of the SMBUS message before using it
    
    commit c0128c7157d639a931353ea344fb44aad6d6e17a upstream.
    
    The first byte of an i2c SMBUS message is the size, and it should be
    verified to ensure that it is in the range of 0..I2C_SMBUS_BLOCK_MAX
    before processing it.
    
    This is the same logic that was added in commit a6e04f05ce0b ("i2c:
    tegra: check msg length in SMBUS block read") to the i2c tegra driver.
    
    Cc: Krzysztof Kozlowski <krzk@kernel.org>
    Cc: Alim Akhtar <alim.akhtar@samsung.com>
    Cc: Andi Shyti <andi.shyti@kernel.org>
    Cc: stable <stable@kernel.org>
    Assisted-by: gkh_clanker_2000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
    Link: https://lore.kernel.org/r/2026022314-rely-scrubbed-4839@gregkh
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
i40e: Fix preempt count leak in napi poll tracepoint [+ + +]
Author: Thomas Gleixner <tglx@kernel.org>
Date:   Tue Apr 21 15:18:38 2026 +0800

    i40e: Fix preempt count leak in napi poll tracepoint
    
    [ Upstream commit 4b3d54a85bd37ebf2d9836f0d0de775c0ff21af9 ]
    
    Using get_cpu() in the tracepoint assignment causes an obvious preempt
    count leak because nothing invokes put_cpu() to undo it:
    
      softirq: huh, entered softirq 3 NET_RX with preempt_count 00000100, exited with 00000101?
    
    This clearly has seen a lot of testing in the last 3+ years...
    
    Use smp_processor_id() instead.
    
    Fixes: 6d4d584a7ea8 ("i40e: Add i40e_napi_poll tracepoint")
    Signed-off-by: Thomas Gleixner <tglx@kernel.org>
    Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
    Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
    Cc: intel-wired-lan@lists.osuosl.org
    Cc: netdev@vger.kernel.org
    Reviewed-by: Joe Damato <joe@dama.to>
    Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Charles Xu <charles_xu@189.cn>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ice: Fix memory leak in ice_set_ringparam() [+ + +]
Author: Zilin Guan <zilin@seu.edu.cn>
Date:   Fri Apr 17 17:17:53 2026 +0800

    ice: Fix memory leak in ice_set_ringparam()
    
    [ Upstream commit fe868b499d16f55bbeea89992edb98043c9de416 ]
    
    In ice_set_ringparam, tx_rings and xdp_rings are allocated before
    rx_rings. If the allocation of rx_rings fails, the code jumps to
    the done label leaking both tx_rings and xdp_rings. Furthermore, if
    the setup of an individual Rx ring fails during the loop, the code jumps
    to the free_tx label which releases tx_rings but leaks xdp_rings.
    
    Fix this by introducing a free_xdp label and updating the error paths to
    ensure both xdp_rings and tx_rings are properly freed if rx_rings
    allocation or setup fails.
    
    Compile tested only. Issue found using a prototype static analysis tool
    and code review.
    
    Fixes: fcea6f3da546 ("ice: Add stats and ethtool support")
    Fixes: efc2214b6047 ("ice: Add support for XDP")
    Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
    Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
    Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
    Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Rajani Kantha <681739313@139.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
iio: common: st_sensors: Fix use of uninitialize device structs [+ + +]
Author: Maud Spierings <maudspierings@gocontroll.com>
Date:   Tue Apr 14 14:45:53 2026 +0800

    iio: common: st_sensors: Fix use of uninitialize device structs
    
    [ Upstream commit 9f92e93e257b33e73622640a9205f8642ec16ddd ]
    
    Throughout the various probe functions &indio_dev->dev is used before it
    is initialized. This caused a kernel panic in st_sensors_power_enable()
    when the call to devm_regulator_bulk_get_enable() fails and then calls
    dev_err_probe() with the uninitialized device.
    
    This seems to only cause a panic with dev_err_probe(), dev_err(),
    dev_warn() and dev_info() don't seem to cause a panic, but are fixed
    as well.
    
    The issue is reported and traced here: [1]
    
    Link: https://lore.kernel.org/all/AM7P189MB100986A83D2F28AF3FFAF976E39EA@AM7P189MB1009.EURP189.PROD.OUTLOOK.COM/ [1]
    Cc: stable@vger.kernel.org
    Signed-off-by: Maud Spierings <maudspierings@gocontroll.com>
    Reviewed-by: Andy Shevchenko <andy@kernel.org>
    Link: https://... [1]
    Link: https://patch.msgid.link/20250527-st_iio_fix-v4-1-12d89801c761@gocontroll.com
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Fang Wang <32840572@qq.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ipv4: icmp: fix null-ptr-deref in icmp_build_probe() [+ + +]
Author: Yiqi Sun <sunyiqixm@gmail.com>
Date:   Thu Apr 2 15:04:19 2026 +0800

    ipv4: icmp: fix null-ptr-deref in icmp_build_probe()
    
    [ Upstream commit fde29fd9349327acc50d19a0b5f3d5a6c964dfd8 ]
    
    ipv6_stub->ipv6_dev_find() may return ERR_PTR(-EAFNOSUPPORT) when the
    IPv6 stack is not active (CONFIG_IPV6=m and not loaded), and passing
    this error pointer to dev_hold() will cause a kernel crash with
    null-ptr-deref.
    
    Instead, silently discard the request. RFC 8335 does not appear to
    define a specific response for the case where an IPv6 interface
    identifier is syntactically valid but the implementation cannot perform
    the lookup at runtime, and silently dropping the request may safer than
    misreporting "No Such Interface".
    
    Fixes: d329ea5bd884 ("icmp: add response to RFC 8335 PROBE messages")
    Signed-off-by: Yiqi Sun <sunyiqixm@gmail.com>
    Link: https://patch.msgid.link/20260402070419.2291578-1-sunyiqixm@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ipv6: add NULL checks for idev in SRv6 paths [+ + +]
Author: Minhong He <heminhong@kylinos.cn>
Date:   Mon Apr 20 13:42:58 2026 +0800

    ipv6: add NULL checks for idev in SRv6 paths
    
    [ Upstream commit 06413793526251870e20402c39930804f14d59c0 ]
    
    __in6_dev_get() can return NULL when the device has no IPv6 configuration
    (e.g. MTU < IPV6_MIN_MTU or after NETDEV_UNREGISTER).
    
    Add NULL checks for idev returned by __in6_dev_get() in both
    seg6_hmac_validate_skb() and ipv6_srh_rcv() to prevent potential NULL
    pointer dereferences.
    
    Fixes: 1ababeba4a21 ("ipv6: implement dataplane support for rthdr type 4 (Segment Routing Header)")
    Fixes: bf355b8d2c30 ("ipv6: sr: add core files for SR HMAC support")
    Signed-off-by: Minhong He <heminhong@kylinos.cn>
    Reviewed-by: Andrea Mayer <andrea.mayer@uniroma2.it>
    Link: https://patch.msgid.link/20260316073301.106643-1-heminhong@kylinos.cn
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Li hongliang <1468888505@139.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ipvs: fix NULL deref in ip_vs_add_service error path [+ + +]
Author: Weiming Shi <bestswngs@gmail.com>
Date:   Wed Apr 1 15:58:01 2026 +0800

    ipvs: fix NULL deref in ip_vs_add_service error path
    
    [ Upstream commit 9a91797e61d286805ae10a92cc48959c30800556 ]
    
    When ip_vs_bind_scheduler() succeeds in ip_vs_add_service(), the local
    variable sched is set to NULL.  If ip_vs_start_estimator() subsequently
    fails, the out_err cleanup calls ip_vs_unbind_scheduler(svc, sched)
    with sched == NULL.  ip_vs_unbind_scheduler() passes the cur_sched NULL
    check (because svc->scheduler was set by the successful bind) but then
    dereferences the NULL sched parameter at sched->done_service, causing a
    kernel panic at offset 0x30 from NULL.
    
     Oops: general protection fault, [..] [#1] PREEMPT SMP KASAN NOPTI
     KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037]
     RIP: 0010:ip_vs_unbind_scheduler (net/netfilter/ipvs/ip_vs_sched.c:69)
     Call Trace:
      <TASK>
      ip_vs_add_service.isra.0 (net/netfilter/ipvs/ip_vs_ctl.c:1500)
      do_ip_vs_set_ctl (net/netfilter/ipvs/ip_vs_ctl.c:2809)
      nf_setsockopt (net/netfilter/nf_sockopt.c:102)
      [..]
    
    Fix by simply not clearing the local sched variable after a successful
    bind.  ip_vs_unbind_scheduler() already detects whether a scheduler is
    installed via svc->scheduler, and keeping sched non-NULL ensures the
    error path passes the correct pointer to both ip_vs_unbind_scheduler()
    and ip_vs_scheduler_put().
    
    While the bug is older, the problem popups in more recent kernels (6.2),
    when the new error path is taken after the ip_vs_start_estimator() call.
    
    Fixes: 705dd3444081 ("ipvs: use kthreads for stats estimation")
    Reported-by: Xiang Mei <xmei5@asu.edu>
    Signed-off-by: Weiming Shi <bestswngs@gmail.com>
    Acked-by: Simon Horman <horms@kernel.org>
    Acked-by: Julian Anastasov <ja@ssi.bg>
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ixgbevf: add missing negotiate_features op to Hyper-V ops table [+ + +]
Author: Michal Schmidt <mschmidt@redhat.com>
Date:   Fri Mar 13 09:22:29 2026 +0100

    ixgbevf: add missing negotiate_features op to Hyper-V ops table
    
    [ Upstream commit 4821d563cd7f251ae728be1a6d04af82a294a5b9 ]
    
    Commit a7075f501bd3 ("ixgbevf: fix mailbox API compatibility by
    negotiating supported features") added the .negotiate_features callback
    to ixgbe_mac_operations and populated it in ixgbevf_mac_ops, but forgot
    to add it to ixgbevf_hv_mac_ops. This leaves the function pointer NULL
    on Hyper-V VMs.
    
    During probe, ixgbevf_negotiate_api() calls ixgbevf_set_features(),
    which unconditionally dereferences hw->mac.ops.negotiate_features().
    On Hyper-V this results in a NULL pointer dereference:
    
      BUG: kernel NULL pointer dereference, address: 0000000000000000
      [...]
      Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine [...]
      Workqueue: events work_for_cpu_fn
      RIP: 0010:0x0
      [...]
      Call Trace:
       ixgbevf_negotiate_api+0x66/0x160 [ixgbevf]
       ixgbevf_sw_init+0xe4/0x1f0 [ixgbevf]
       ixgbevf_probe+0x20f/0x4a0 [ixgbevf]
       local_pci_probe+0x50/0xa0
       work_for_cpu_fn+0x1a/0x30
       [...]
    
    Add ixgbevf_hv_negotiate_features_vf() that returns -EOPNOTSUPP and
    wire it into ixgbevf_hv_mac_ops. The caller already handles -EOPNOTSUPP
    gracefully.
    
    Fixes: a7075f501bd3 ("ixgbevf: fix mailbox API compatibility by negotiating supported features")
    Reported-by: Xiaoqiang Xiong <xxiong@redhat.com>
    Closes: https://issues.redhat.com/browse/RHEL-155455
    Assisted-by: Claude:claude-4.6-opus-high Cursor
    Tested-by: Xiaoqiang Xiong <xxiong@redhat.com>
    Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
    Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ksmbd: fix mechToken leak when SPNEGO decode fails after token alloc [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Apr 6 15:46:48 2026 +0200

    ksmbd: fix mechToken leak when SPNEGO decode fails after token alloc
    
    commit ad0057fb91218914d6c98268718ceb9d59b388e1 upstream.
    
    The kernel ASN.1 BER decoder calls action callbacks incrementally as it
    walks the input.  When ksmbd_decode_negTokenInit() reaches the mechToken
    [2] OCTET STRING element, ksmbd_neg_token_alloc() allocates
    conn->mechToken immediately via kmemdup_nul().  If a later element in
    the same blob is malformed, then the decoder will return nonzero after
    the allocation is already live.  This could happen if mechListMIC [3]
    overrunse the enclosing SEQUENCE.
    
    decode_negotiation_token() then sets conn->use_spnego = false because
    both the negTokenInit and negTokenTarg grammars failed.  The cleanup at
    the bottom of smb2_sess_setup() is gated on use_spnego:
    
            if (conn->use_spnego && conn->mechToken) {
                    kfree(conn->mechToken);
                    conn->mechToken = NULL;
            }
    
    so the kfree is skipped, causing the mechToken to never be freed.
    
    This codepath is reachable pre-authentication, so untrusted clients can
    cause slow memory leaks on a server without even being properly
    authenticated.
    
    Fix this up by not checking check for use_spnego, as it's not required,
    so the memory will always be properly freed.  At the same time, always
    free the memory in ksmbd_conn_free() incase some other failure path
    forgot to free it.
    
    Cc: Namjae Jeon <linkinjeon@kernel.org>
    Cc: Steve French <smfrench@gmail.com>
    Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
    Cc: Tom Talpey <tom@talpey.com>
    Cc: linux-cifs@vger.kernel.org
    Cc: <stable@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Acked-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ksmbd: fix out-of-bounds write in smb2_get_ea() EA alignment [+ + +]
Author: Tristan Madani <tristan@talencesecurity.com>
Date:   Fri Apr 17 19:33:17 2026 +0000

    ksmbd: fix out-of-bounds write in smb2_get_ea() EA alignment
    
    commit 30010c952077a1c89ecdd71fc4d574c75a8f5617 upstream.
    
    smb2_get_ea() applies 4-byte alignment padding via memset() after
    writing each EA entry. The bounds check on buf_free_len is performed
    before the value memcpy, but the alignment memset fires unconditionally
    afterward with no check on remaining space.
    
    When the EA value exactly fills the remaining buffer (buf_free_len == 0
    after value subtraction), the alignment memset writes 1-3 NUL bytes
    past the buf_free_len boundary. In compound requests where the response
    buffer is shared across commands, the first command (e.g., READ) can
    consume most of the buffer, leaving a tight remainder for the QUERY_INFO
    EA response. The alignment memset then overwrites past the physical
    kvmalloc allocation into adjacent kernel heap memory.
    
    Add a bounds check before the alignment memset to ensure buf_free_len
    can accommodate the padding bytes.
    
    This is the same bug pattern fixed by commit beef2634f81f ("ksmbd: fix
    potencial OOB in get_file_all_info() for compound requests") and
    commit fda9522ed6af ("ksmbd: fix OOB write in QUERY_INFO for compound
    requests"), both of which added bounds checks before unconditional
    writes in QUERY_INFO response handlers.
    
    Cc: stable@vger.kernel.org
    Fixes: e2b76ab8b5c9 ("ksmbd: add support for read compound")
    Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
    Acked-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ksmbd: require 3 sub-authorities before reading sub_auth[2] [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Apr 6 15:46:47 2026 +0200

    ksmbd: require 3 sub-authorities before reading sub_auth[2]
    
    commit 53370cf9090777774e07fd9a8ebce67c6cc333ab upstream.
    
    parse_dacl() compares each ACE SID against sid_unix_NFS_mode and on
    match reads sid.sub_auth[2] as the file mode.  If sid_unix_NFS_mode is
    the prefix S-1-5-88-3 with num_subauth = 2 then compare_sids() compares
    only min(num_subauth, 2) sub-authorities so a client SID with
    num_subauth = 2 and sub_auth = {88, 3} will match.
    
    If num_subauth = 2 and the ACE is placed at the very end of the security
    descriptor, sub_auth[2] will be  4 bytes past end_of_acl.  The
    out-of-band bytes will then be masked to the low 9 bits and applied as
    the file's POSIX mode, probably not something that is good to have
    happen.
    
    Fix this up by forcing the SID to actually carry a third sub-authority
    before reading it at all.
    
    Cc: Namjae Jeon <linkinjeon@kernel.org>
    Cc: Steve French <smfrench@gmail.com>
    Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
    Cc: Tom Talpey <tom@talpey.com>
    Cc: linux-cifs@vger.kernel.org
    Cc: <stable@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Acked-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ksmbd: use check_add_overflow() to prevent u16 DACL size overflow [+ + +]
Author: Tristan Madani <tristan@talencesecurity.com>
Date:   Fri Apr 17 19:54:57 2026 +0000

    ksmbd: use check_add_overflow() to prevent u16 DACL size overflow
    
    commit 299f962c0b02d048fb45d248b4da493d03f3175d upstream.
    
    set_posix_acl_entries_dacl() and set_ntacl_dacl() accumulate ACE sizes
    in u16 variables. When a file has many POSIX ACL entries, the
    accumulated size can wrap past 65535, causing the pointer arithmetic
    (char *)pndace + *size to land within already-written ACEs. Subsequent
    writes then overwrite earlier entries, and pndacl->size gets a
    truncated value.
    
    Use check_add_overflow() at each accumulation point to detect the
    wrap before it corrupts the buffer, consistent with existing
    check_mul_overflow() usage elsewhere in smbacl.c.
    
    Cc: stable@vger.kernel.org
    Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
    Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
    Acked-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ksmbd: validate EaNameLength in smb2_get_ea() [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Apr 6 15:46:46 2026 +0200

    ksmbd: validate EaNameLength in smb2_get_ea()
    
    commit 66751841212c2cc196577453c37f7774ff363f02 upstream.
    
    smb2_get_ea() reads ea_req->EaNameLength from the client request and
    passes it directly to strncmp() as the comparison length without
    verifying that the length of the name really is the size of the input
    buffer received.
    
    Fix this up by properly checking the size of the name based on the value
    received and the overall size of the request, to prevent a later
    strncmp() call to use the length as a "trusted" size of the buffer.
    Without this check, uninitialized heap values might be slowly leaked to
    the client.
    
    Cc: Namjae Jeon <linkinjeon@kernel.org>
    Cc: Steve French <smfrench@gmail.com>
    Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
    Cc: Tom Talpey <tom@talpey.com>
    Cc: linux-cifs@vger.kernel.org
    Cc: <stable@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Acked-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
KVM: nVMX: Fold requested virtual interrupt check into has_nested_events() [+ + +]
Author: Sean Christopherson <seanjc@google.com>
Date:   Wed Apr 15 13:23:46 2026 -0700

    KVM: nVMX: Fold requested virtual interrupt check into has_nested_events()
    
    [ Upstream commit 321ef62b0c5f6f57bb8500a2ca5986052675abbf ]
    
    Check for a Requested Virtual Interrupt, i.e. a virtual interrupt that is
    pending delivery, in vmx_has_nested_events() and drop the one-off
    kvm_x86_ops.guest_apic_has_interrupt() hook.
    
    In addition to dropping a superfluous hook, this fixes a bug where KVM
    would incorrectly treat virtual interrupts _for L2_ as always enabled due
    to kvm_arch_interrupt_allowed(), by way of vmx_interrupt_blocked(),
    treating IRQs as enabled if L2 is active and vmcs12 is configured to exit
    on IRQs, i.e. KVM would treat a virtual interrupt for L2 as a valid wake
    event based on L1's IRQ blocking status.
    
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20240607172609.3205077-6-seanjc@google.com
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Cc: Taeyang Lee <0wn@theori.io>
    [sean: deal with lack of vmx/main.c and vmx/x86_ops.h]
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION [+ + +]
Author: Sean Christopherson <seanjc@google.com>
Date:   Thu Mar 12 17:32:58 2026 -0700

    KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION
    
    commit 8acffeef5ef720c35e513e322ab08e32683f32f2 upstream.
    
    Drop the WARN in sev_pin_memory() on npages overflowing an int, as the
    WARN is comically trivially to trigger from userspace, e.g. by doing:
    
      struct kvm_enc_region range = {
              .addr = 0,
              .size = -1ul,
      };
    
      __vm_ioctl(vm, KVM_MEMORY_ENCRYPT_REG_REGION, &range);
    
    Note, the checks in sev_mem_enc_register_region() that presumably exist to
    verify the incoming address+size are completely worthless, as both "addr"
    and "size" are u64s and SEV is 64-bit only, i.e. they _can't_ be greater
    than ULONG_MAX.  That wart will be cleaned up in the near future.
    
            if (range->addr > ULONG_MAX || range->size > ULONG_MAX)
                    return -EINVAL;
    
    Opportunistically add a comment to explain why the code calculates the
    number of pages the "hard" way, e.g. instead of just shifting @ulen.
    
    Fixes: 78824fabc72e ("KVM: SVM: fix svn_pin_memory()'s use of get_user_pages_fast()")
    Cc: stable@vger.kernel.org
    Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
    Tested-by: Liam Merwick <liam.merwick@oracle.com>
    Link: https://patch.msgid.link/20260313003302.3136111-2-seanjc@google.com
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

KVM: x86: Use __DECLARE_FLEX_ARRAY() for UAPI structures with VLAs [+ + +]
Author: David Woodhouse <dwmw@amazon.co.uk>
Date:   Mon Apr 13 10:58:35 2026 -0400

    KVM: x86: Use __DECLARE_FLEX_ARRAY() for UAPI structures with VLAs
    
    [ Upstream commit 2619da73bb2f10d88f7e1087125c40144fdf0987 ]
    
    Commit 94dfc73e7cf4 ("treewide: uapi: Replace zero-length arrays with
    flexible-array members") broke the userspace API for C++.
    
    These structures ending in VLAs are typically a *header*, which can be
    followed by an arbitrary number of entries. Userspace typically creates
    a larger structure with some non-zero number of entries, for example in
    QEMU's kvm_arch_get_supported_msr_feature():
    
        struct {
            struct kvm_msrs info;
            struct kvm_msr_entry entries[1];
        } msr_data = {};
    
    While that works in C, it fails in C++ with an error like:
     flexible array member 'kvm_msrs::entries' not at end of 'struct msr_data'
    
    Fix this by using __DECLARE_FLEX_ARRAY() for the VLA, which uses [0]
    for C++ compilation.
    
    Fixes: 94dfc73e7cf4 ("treewide: uapi: Replace zero-length arrays with flexible-array members")
    Cc: stable@vger.kernel.org
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Link: https://patch.msgid.link/3abaf6aefd6e5efeff3b860ac38421d9dec908db.camel@infradead.org
    [sean: tag for stable@]
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    [ applied `__DECLARE_FLEX_ARRAY(char, name)` change directly instead of inside missing `#ifdef __KERNEL__` else branch ]
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

KVM: x86: Use scratch field in MMIO fragment to hold small write values [+ + +]
Author: Sean Christopherson <seanjc@google.com>
Date:   Tue Feb 24 17:20:36 2026 -0800

    KVM: x86: Use scratch field in MMIO fragment to hold small write values
    
    commit 0b16e69d17d8c35c5c9d5918bf596c75a44655d3 upstream.
    
    When exiting to userspace to service an emulated MMIO write, copy the
    to-be-written value to a scratch field in the MMIO fragment if the size
    of the data payload is 8 bytes or less, i.e. can fit in a single chunk,
    instead of pointing the fragment directly at the source value.
    
    This fixes a class of use-after-free bugs that occur when the emulator
    initiates a write using an on-stack, local variable as the source, the
    write splits a page boundary, *and* both pages are MMIO pages.  Because
    KVM's ABI only allows for physically contiguous MMIO requests, accesses
    that split MMIO pages are separated into two fragments, and are sent to
    userspace one at a time.  When KVM attempts to complete userspace MMIO in
    response to KVM_RUN after the first fragment, KVM will detect the second
    fragment and generate a second userspace exit, and reference the on-stack
    variable.
    
    The issue is most visible if the second KVM_RUN is performed by a separate
    task, in which case the stack of the initiating task can show up as truly
    freed data.
    
      ==================================================================
      BUG: KASAN: use-after-free in complete_emulated_mmio+0x305/0x420
      Read of size 1 at addr ffff888009c378d1 by task syz-executor417/984
    
      CPU: 1 PID: 984 Comm: syz-executor417 Not tainted 5.10.0-182.0.0.95.h2627.eulerosv2r13.x86_64 #3
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014 Call Trace:
      dump_stack+0xbe/0xfd
      print_address_description.constprop.0+0x19/0x170
      __kasan_report.cold+0x6c/0x84
      kasan_report+0x3a/0x50
      check_memory_region+0xfd/0x1f0
      memcpy+0x20/0x60
      complete_emulated_mmio+0x305/0x420
      kvm_arch_vcpu_ioctl_run+0x63f/0x6d0
      kvm_vcpu_ioctl+0x413/0xb20
      __se_sys_ioctl+0x111/0x160
      do_syscall_64+0x30/0x40
      entry_SYSCALL_64_after_hwframe+0x67/0xd1
      RIP: 0033:0x42477d
      Code: <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
      RSP: 002b:00007faa8e6890e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      RAX: ffffffffffffffda RBX: 00000000004d7338 RCX: 000000000042477d
      RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000005
      RBP: 00000000004d7330 R08: 00007fff28d546df R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004d733c
      R13: 0000000000000000 R14: 000000000040a200 R15: 00007fff28d54720
    
      The buggy address belongs to the page:
      page:0000000029f6a428 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x9c37
      flags: 0xfffffc0000000(node=0|zone=1|lastcpupid=0x1fffff)
      raw: 000fffffc0000000 0000000000000000 ffffea0000270dc8 0000000000000000
      raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected
    
      Memory state around the buggy address:
      ffff888009c37780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
      ffff888009c37800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
      >ffff888009c37880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                                       ^
      ffff888009c37900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
      ffff888009c37980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
      ==================================================================
    
    The bug can also be reproduced with a targeted KVM-Unit-Test by hacking
    KVM to fill a large on-stack variable in complete_emulated_mmio(), i.e. by
    overwrite the data value with garbage.
    
    Limit the use of the scratch fields to 8-byte or smaller accesses, and to
    just writes, as larger accesses and reads are not affected thanks to
    implementation details in the emulator, but add a sanity check to ensure
    those details don't change in the future.  Specifically, KVM never uses
    on-stack variables for accesses larger that 8 bytes, e.g. uses an operand
    in the emulator context, and *all* reads are buffered through the mem_read
    cache.
    
    Note!  Using the scratch field for reads is not only unnecessary, it's
    also extremely difficult to handle correctly.  As above, KVM buffers all
    reads through the mem_read cache, and heavily relies on that behavior when
    re-emulating the instruction after a userspace MMIO read exit.  If a read
    splits a page, the first page is NOT an MMIO page, and the second page IS
    an MMIO page, then the MMIO fragment needs to point at _just_ the second
    chunk of the destination, i.e. its position in the mem_read cache.  Taking
    the "obvious" approach of copying the fragment value into the destination
    when re-emulating the instruction would clobber the first chunk of the
    destination, i.e. would clobber the data that was read from guest memory.
    
    Fixes: f78146b0f923 ("KVM: Fix page-crossing MMIO")
    Suggested-by: Yashu Zhang <zhangjiaji1@huawei.com>
    Reported-by: Yashu Zhang <zhangjiaji1@huawei.com>
    Closes: https://lore.kernel.org/all/369eaaa2b3c1425c85e8477066391bc7@huawei.com
    Cc: stable@vger.kernel.org
    Tested-by: Tom Lendacky <thomas.lendacky@gmail.com>
    Tested-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
    Link: https://patch.msgid.link/20260225012049.920665-2-seanjc@google.com
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
l2tp: Drop large packets with UDP encap [+ + +]
Author: Alice Mikityanska <alice@isovalent.com>
Date:   Fri Apr 3 20:49:49 2026 +0300

    l2tp: Drop large packets with UDP encap
    
    [ Upstream commit ebe560ea5f54134279356703e73b7f867c89db13 ]
    
    syzbot reported a WARN on my patch series [1]. The actual issue is an
    overflow of 16-bit UDP length field, and it exists in the upstream code.
    My series added a debug WARN with an overflow check that exposed the
    issue, that's why syzbot tripped on my patches, rather than on upstream
    code.
    
    syzbot's repro:
    
    r0 = socket$pppl2tp(0x18, 0x1, 0x1)
    r1 = socket$inet6_udp(0xa, 0x2, 0x0)
    connect$inet6(r1, &(0x7f00000000c0)={0xa, 0x0, 0x0, @loopback, 0xfffffffc}, 0x1c)
    connect$pppl2tp(r0, &(0x7f0000000240)=@pppol2tpin6={0x18, 0x1, {0x0, r1, 0x4, 0x0, 0x0, 0x0, {0xa, 0x4e22, 0xffff, @ipv4={'\x00', '\xff\xff', @empty}}}}, 0x32)
    writev(r0, &(0x7f0000000080)=[{&(0x7f0000000000)="ee", 0x34000}], 0x1)
    
    It basically sends an oversized (0x34000 bytes) PPPoL2TP packet with UDP
    encapsulation, and l2tp_xmit_core doesn't check for overflows when it
    assigns the UDP length field. The value gets trimmed to 16 bites.
    
    Add an overflow check that drops oversized packets and avoids sending
    packets with trimmed UDP length to the wire.
    
    syzbot's stack trace (with my patch applied):
    
    len >= 65536u
    WARNING: ./include/linux/udp.h:38 at udp_set_len_short include/linux/udp.h:38 [inline], CPU#1: syz.0.17/5957
    WARNING: ./include/linux/udp.h:38 at l2tp_xmit_core net/l2tp/l2tp_core.c:1293 [inline], CPU#1: syz.0.17/5957
    WARNING: ./include/linux/udp.h:38 at l2tp_xmit_skb+0x1204/0x18d0 net/l2tp/l2tp_core.c:1327, CPU#1: syz.0.17/5957
    Modules linked in:
    CPU: 1 UID: 0 PID: 5957 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full)
    Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
    RIP: 0010:udp_set_len_short include/linux/udp.h:38 [inline]
    RIP: 0010:l2tp_xmit_core net/l2tp/l2tp_core.c:1293 [inline]
    RIP: 0010:l2tp_xmit_skb+0x1204/0x18d0 net/l2tp/l2tp_core.c:1327
    Code: 0f 0b 90 e9 21 f9 ff ff e8 e9 05 ec f6 90 0f 0b 90 e9 8d f9 ff ff e8 db 05 ec f6 90 0f 0b 90 e9 cc f9 ff ff e8 cd 05 ec f6 90 <0f> 0b 90 e9 de fa ff ff 44 89 f1 80 e1 07 80 c1 03 38 c1 0f 8c 4f
    RSP: 0018:ffffc90003d67878 EFLAGS: 00010293
    RAX: ffffffff8ad985e3 RBX: ffff8881a6400090 RCX: ffff8881697f0000
    RDX: 0000000000000000 RSI: 0000000000034010 RDI: 000000000000ffff
    RBP: dffffc0000000000 R08: 0000000000000003 R09: 0000000000000004
    R10: dffffc0000000000 R11: fffff520007acf00 R12: ffff8881baf20900
    R13: 0000000000034010 R14: ffff8881a640008e R15: ffff8881760f7000
    FS:  000055557e81f500(0000) GS:ffff8882a9467000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000200000033000 CR3: 00000001612f4000 CR4: 00000000000006f0
    Call Trace:
     <TASK>
     pppol2tp_sendmsg+0x40a/0x5f0 net/l2tp/l2tp_ppp.c:302
     sock_sendmsg_nosec net/socket.c:727 [inline]
     __sock_sendmsg net/socket.c:742 [inline]
     sock_write_iter+0x503/0x550 net/socket.c:1195
     do_iter_readv_writev+0x619/0x8c0 fs/read_write.c:-1
     vfs_writev+0x33c/0x990 fs/read_write.c:1059
     do_writev+0x154/0x2e0 fs/read_write.c:1105
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    RIP: 0033:0x7f636479c629
    Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
    RSP: 002b:00007ffffd4241c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
    RAX: ffffffffffffffda RBX: 00007f6364a15fa0 RCX: 00007f636479c629
    RDX: 0000000000000001 RSI: 0000200000000080 RDI: 0000000000000003
    RBP: 00007f6364832b39 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
    R13: 00007f6364a15fac R14: 00007f6364a15fa0 R15: 00007f6364a15fa0
     </TASK>
    
    [1]: https://lore.kernel.org/all/20260226201600.222044-1-alice.kernel@fastmail.im/
    
    Fixes: 3557baabf280 ("[L2TP]: PPP over L2TP driver core")
    Reported-by: syzbot+ci3edea60a44225dec@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/netdev/69a1dfba.050a0220.3a55be.0026.GAE@google.com/
    Signed-off-by: Alice Mikityanska <alice@isovalent.com>
    Link: https://patch.msgid.link/20260403174949.843941-1-alice.kernel@fastmail.im
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Linux: Linux 6.6.136 [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Apr 27 07:23:36 2026 -0600

    Linux 6.6.136
    
    Link: https://lore.kernel.org/r/20260424132532.812258529@linuxfoundation.org
    Tested-by: Peter Schneider <pschneider1968@googlemail.com>
    Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Tested-by: Pavel Machek (CIP) <pavel@nabladev.com>
    Tested-by: Mark Brown <broonie@kernel.org>
    Tested-by: Shuah Khan <skhan@linuxfoundation.org>
    Tested-by: Brett A C Sheffield <bacs@librecast.net>
    Tested-by: Miguel Ojeda <ojeda@kernel.org>
    Tested-by: Francesco Dolcini <francesco.dolcini@toradex.com>
    Tested-by: Barry K. Nathan <barryn@pobox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
md/raid1,raid10: don't ignore IO flags [+ + +]
Author: Yu Kuai <yukuai3@huawei.com>
Date:   Tue Apr 21 16:20:53 2026 +0800

    md/raid1,raid10: don't ignore IO flags
    
    commit e879a0d9cb086c8e52ce6c04e5bfa63825a6213c upstream.
    
    If blk-wbt is enabled by default, it's found that raid write performance
    is quite bad because all IO are throttled by wbt of underlying disks,
    due to flag REQ_IDLE is ignored. And turns out this behaviour exist since
    blk-wbt is introduced.
    
    Other than REQ_IDLE, other flags should not be ignored as well, for
    example REQ_META can be set for filesystems, clearing it can cause priority
    reverse problems; And REQ_NOWAIT should not be cleared as well, because
    io will wait instead of failing directly in underlying disks.
    
    Fix those problems by keep IO flags from master bio.
    
    Fises: f51d46d0e7cb ("md: add support for REQ_NOWAIT")
    Fixes: e34cbd307477 ("blk-wbt: add general throttling mechanism")
    Fixes: 5404bc7a87b9 ("[PATCH] Allow file systems to differentiate between data and meta reads")
    Link: https://lore.kernel.org/linux-raid/20250227121657.832356-1-yukuai1@huaweicloud.com
    Signed-off-by: Yu Kuai <yukuai3@huawei.com>
    [ Harshit: Resolve conflicts due to missing commit: f2a38abf5f1c
      ("md/raid1: Atomic write support") and  commit: a1d9b4fd42d9
      ("md/raid10: Atomic write support") in 6.12.y, we don't have Atomic
      writes feature in 6.12.y ]
    Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    [ Based on Harshit's backport for 6.12, fixed minor conflicts for 6.6. ]
    Signed-off-by: Charles Xu <charles_xu@189.cn>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
md/raid1: fix data lost for writemostly rdev [+ + +]
Author: Yu Kuai <yukuai3@huawei.com>
Date:   Wed Sep 3 09:41:40 2025 +0800

    md/raid1: fix data lost for writemostly rdev
    
    commit 93dec51e716db88f32d770dc9ab268964fff320b upstream.
    
    If writemostly is enabled, alloc_behind_master_bio() will allocate a new
    bio for rdev, with bi_opf set to 0. Later, raid1_write_request() will
    clone from this bio, hence bi_opf is still 0 for the cloned bio. Submit
    this cloned bio will end up to be read, causing write data lost.
    
    Fix this problem by inheriting bi_opf from original bio for
    behind_mast_bio.
    
    Fixes: e879a0d9cb08 ("md/raid1,raid10: don't ignore IO flags")
    Reported-and-tested-by: Ian Dall <ian@beware.dropbear.id.au>
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220507
    Link: https://lore.kernel.org/linux-raid/20250903014140.3690499-1-yukuai1@huaweicloud.com
    Signed-off-by: Yu Kuai <yukuai3@huawei.com>
    Reviewed-by: Li Nan <linan122@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
media: as102: fix to not free memory after the device is registered in as102_usb_probe() [+ + +]
Author: Jeongjun Park <aha310510@gmail.com>
Date:   Sun Jan 11 00:17:53 2026 +0900

    media: as102: fix to not free memory after the device is registered in as102_usb_probe()
    
    commit 8bd29dbe03fc5b0f039ab2395ff37b64236d2f0c upstream.
    
    In as102_usb driver, the following race condition occurs:
    ```
                    CPU0                                            CPU1
    as102_usb_probe()
      kzalloc(); // alloc as102_dev_t
      ....
      usb_register_dev();
                                                    fd = sys_open("/path/to/dev"); // open as102 fd
                                                    ....
      usb_deregister_dev();
      ....
      kfree(); // free as102_dev_t
      ....
                                                    sys_close(fd);
                                                      as102_release() // UAF!!
                                                        as102_usb_release()
                                                          kfree(); // DFB!!
    ```
    
    When a USB character device registered with usb_register_dev() is later
    unregistered (via usb_deregister_dev() or disconnect), the device node is
    removed so new open() calls fail. However, file descriptors that are
    already open do not go away immediately: they remain valid until the last
    reference is dropped and the driver's .release() is invoked.
    
    In as102, as102_usb_probe() calls usb_register_dev() and then, on an
    error path, does usb_deregister_dev() and frees as102_dev_t right away.
    If userspace raced a successful open() before the deregistration, that
    open FD will later hit as102_release() --> as102_usb_release() and access
    or free as102_dev_t again, occur a race to use-after-free and
    double-free vuln.
    
    The fix is to never kfree(as102_dev_t) directly once usb_register_dev()
    has succeeded. After deregistration, defer freeing memory to .release().
    
    In other words, let release() perform the last kfree when the final open
    FD is closed.
    
    Cc: <stable@vger.kernel.org>
    Reported-by: syzbot+47321e8fd5a4c84088db@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=47321e8fd5a4c84088db
    Fixes: cd19f7d3e39b ("[media] as102: fix leaks at failure paths in as102_usb_probe()")
    Signed-off-by: Jeongjun Park <aha310510@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

media: em28xx: fix use-after-free in em28xx_v4l2_open() [+ + +]
Author: Abhishek Kumar <abhishek_sts8@yahoo.com>
Date:   Tue Mar 10 22:14:37 2026 +0530

    media: em28xx: fix use-after-free in em28xx_v4l2_open()
    
    commit a66485a934c7187ae8e36517d40615fa2e961cff upstream.
    
    em28xx_v4l2_open() reads dev->v4l2 without holding dev->lock,
    creating a race with em28xx_v4l2_init()'s error path and
    em28xx_v4l2_fini(), both of which free the em28xx_v4l2 struct
    and set dev->v4l2 to NULL under dev->lock.
    
    This race leads to two issues:
     - use-after-free in v4l2_fh_init() when accessing vdev->ctrl_handler,
       since the video_device is embedded in the freed em28xx_v4l2 struct.
     - NULL pointer dereference in em28xx_resolution_set() when accessing
       v4l2->norm, since dev->v4l2 has been set to NULL.
    
    Fix this by moving the mutex_lock() before the dev->v4l2 read and
    adding a NULL check for dev->v4l2 under the lock.
    
    Reported-by: syzbot+c025d34b8eaa54c571b8@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=c025d34b8eaa54c571b8
    Fixes: 8139a4d583ab ("[media] em28xx: move v4l2 user counting fields from struct em28xx to struct v4l2")
    Cc: stable@vger.kernel.org
    Signed-off-by: Abhishek Kumar <abhishek_sts8@yahoo.com>
    Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

media: hackrf: fix to not free memory after the device is registered in hackrf_probe() [+ + +]
Author: Jeongjun Park <aha310510@gmail.com>
Date:   Sat Jan 10 23:58:29 2026 +0900

    media: hackrf: fix to not free memory after the device is registered in hackrf_probe()
    
    commit 3b7da2b4d0fe014eff181ed37e3bf832eb8ed258 upstream.
    
    In hackrf driver, the following race condition occurs:
    ```
                    CPU0                                            CPU1
    hackrf_probe()
      kzalloc(); // alloc hackrf_dev
      ....
      v4l2_device_register();
      ....
                                                    fd = sys_open("/path/to/dev"); // open hackrf fd
                                                    ....
      v4l2_device_unregister();
      ....
      kfree(); // free hackrf_dev
      ....
                                                    sys_ioctl(fd, ...);
                                                      v4l2_ioctl();
                                                        video_is_registered() // UAF!!
                                                    ....
                                                    sys_close(fd);
                                                      v4l2_release() // UAF!!
                                                        hackrf_video_release()
                                                          kfree(); // DFB!!
    ```
    
    When a V4L2 or video device is unregistered, the device node is removed so
    new open() calls are blocked.
    
    However, file descriptors that are already open-and any in-flight I/O-do
    not terminate immediately; they remain valid until the last reference is
    dropped and the driver's release() is invoked.
    
    Therefore, freeing device memory on the error path after hackrf_probe()
    has registered dev it will lead to a race to use-after-free vuln, since
    those already-open handles haven't been released yet.
    
    And since release() free memory too, race to use-after-free and
    double-free vuln occur.
    
    To prevent this, if device is registered from probe(), it should be
    modified to free memory only through release() rather than calling
    kfree() directly.
    
    Cc: <stable@vger.kernel.org>
    Reported-by: syzbot+6ffd76b5405c006a46b7@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=6ffd76b5405c006a46b7
    Reported-by: syzbot+f1b20958f93d2d250727@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=f1b20958f93d2d250727
    Fixes: 8bc4a9ed8504 ("[media] hackrf: add support for transmitter")
    Signed-off-by: Jeongjun Park <aha310510@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

media: mediatek: vcodec: fix use-after-free in encoder release path [+ + +]
Author: Fan Wu <fanwu01@zju.edu.cn>
Date:   Wed Mar 4 09:35:06 2026 +0000

    media: mediatek: vcodec: fix use-after-free in encoder release path
    
    commit 76e35091ffc722ba39b303e48bc5d08abb59dd56 upstream.
    
    The fops_vcodec_release() function frees the context structure (ctx)
    without first cancelling any pending or running work in ctx->encode_work.
    This creates a race window where the workqueue handler (mtk_venc_worker)
    may still be accessing the context memory after it has been freed.
    
    Race condition:
    
        CPU 0 (release path)               CPU 1 (workqueue)
        ---------------------               ------------------
        fops_vcodec_release()
          v4l2_m2m_ctx_release()
            v4l2_m2m_cancel_job()
            // waits for m2m job "done"
                                            mtk_venc_worker()
                                              v4l2_m2m_job_finish()
                                              // m2m job "done"
                                              // BUT worker still running!
                                              // post-job_finish access:
                                            other ctx dereferences
                                              // UAF if ctx already freed
            // returns (job "done")
          kfree(ctx)  // ctx freed
    
    Root cause: The v4l2_m2m_ctx_release() only waits for the m2m job
    lifecycle (via TRANS_RUNNING flag), not the workqueue lifecycle.
    After v4l2_m2m_job_finish() is called, the m2m framework considers
    the job complete and v4l2_m2m_ctx_release() returns, but the worker
    function continues executing and may still access ctx.
    
    The work is queued during encode operations via:
      queue_work(ctx->dev->encode_workqueue, &ctx->encode_work)
    The worker function accesses ctx->m2m_ctx, ctx->dev, and other ctx
    fields even after calling v4l2_m2m_job_finish().
    
    This vulnerability was confirmed with KASAN by running an instrumented
    test module that widens the post-job_finish race window. KASAN detected:
    
      BUG: KASAN: slab-use-after-free in mtk_venc_worker+0x159/0x180
      Read of size 4 at addr ffff88800326e000 by task kworker/u8:0/12
    
      Workqueue: mtk_vcodec_enc_wq mtk_venc_worker
    
      Allocated by task 47:
        __kasan_kmalloc+0x7f/0x90
        fops_vcodec_open+0x85/0x1a0
    
      Freed by task 47:
        __kasan_slab_free+0x43/0x70
        kfree+0xee/0x3a0
        fops_vcodec_release+0xb7/0x190
    
    Fix this by calling cancel_work_sync(&ctx->encode_work) before kfree(ctx).
    This ensures the workqueue handler is both cancelled (if pending) and
    synchronized (waits for any running handler to complete) before the
    context is freed.
    
    Placement rationale: The fix is placed after v4l2_ctrl_handler_free()
    and before list_del_init(&ctx->list). At this point, all m2m operations
    are done (v4l2_m2m_ctx_release() has returned), and we need to ensure
    the workqueue is synchronized before removing ctx from the list and
    freeing it.
    
    Note: The open error path does NOT need cancel_work_sync() because
    INIT_WORK() only initializes the work structure - it does not schedule
    it. Work is only scheduled later during device_run() operations.
    
    Fixes: 0934d3759615 ("media: mediatek: vcodec: separate decoder and encoder")
    Cc: stable@vger.kernel.org
    Signed-off-by: Fan Wu <fanwu01@zju.edu.cn>
    Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
    Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

media: rkvdec: reduce stack usage in rkvdec_init_v4l2_vp9_count_tbl() [+ + +]
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Mon Feb 2 10:47:51 2026 +0100

    media: rkvdec: reduce stack usage in rkvdec_init_v4l2_vp9_count_tbl()
    
    [ Upstream commit c03b7dec3c4ddc97872fa12bfca75bae9cb46510 ]
    
    The deeply nested loop in rkvdec_init_v4l2_vp9_count_tbl() needs a lot
    of registers, so when the clang register allocator runs out, it ends up
    spilling countless temporaries to the stack:
    
    drivers/media/platform/rockchip/rkvdec/rkvdec-vp9.c:966:12: error: stack frame size (1472) exceeds limit (1280) in 'rkvdec_vp9_start' [-Werror,-Wframe-larger-than]
    
    Marking this function as noinline_for_stack keeps it out of
    rkvdec_vp9_start(), giving the compiler more room for optimization.
    
    The resulting code is good enough that both the total stack usage
    and the loop get enough better to stay under the warning limit,
    though it's still slow, and would need a larger rework if this
    function ends up being called in a fast path.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
    Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

media: vidtv: fix nfeeds state corruption on start_streaming failure [+ + +]
Author: Ruslan Valiyev <linuxoid@gmail.com>
Date:   Sun Mar 1 21:07:35 2026 +0000

    media: vidtv: fix nfeeds state corruption on start_streaming failure
    
    commit a0e5a598fe9a4612b852406b51153b881592aede upstream.
    
    syzbot reported a memory leak in vidtv_psi_service_desc_init [1].
    
    When vidtv_start_streaming() fails inside vidtv_start_feed(), the
    nfeeds counter is left incremented even though no feed was actually
    started. This corrupts the driver state: subsequent start_feed calls
    see nfeeds > 1 and skip starting the mux, while stop_feed calls
    eventually try to stop a non-existent stream.
    
    This state corruption can also lead to memory leaks, since the mux
    and channel resources may be partially allocated during a failed
    start_streaming but never cleaned up, as the stop path finds
    dvb->streaming == false and returns early.
    
    Fix by decrementing nfeeds back when start_streaming fails, keeping
    the counter in sync with the actual number of active feeds.
    
    [1]
    BUG: memory leak
    unreferenced object 0xffff888145b50820 (size 32):
     comm "syz.0.17", pid 6068, jiffies 4294944486
     backtrace (crc 90a0c7d4):
      vidtv_psi_service_desc_init+0x74/0x1b0 drivers/media/test-drivers/vidtv/vidtv_psi.c:288
      vidtv_channel_s302m_init+0xb1/0x2a0 drivers/media/test-drivers/vidtv/vidtv_channel.c:83
      vidtv_channels_init+0x1b/0x40 drivers/media/test-drivers/vidtv/vidtv_channel.c:524
      vidtv_mux_init+0x516/0xbe0 drivers/media/test-drivers/vidtv/vidtv_mux.c:518
      vidtv_start_streaming drivers/media/test-drivers/vidtv/vidtv_bridge.c:194 [inline]
      vidtv_start_feed+0x33e/0x4d0 drivers/media/test-drivers/vidtv/vidtv_bridge.c:239
    
    Fixes: f90cf6079bf67 ("media: vidtv: add a bridge driver")
    Cc: stable@vger.kernel.org
    Reported-by: syzbot+639ebc6ec75e96674741@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=639ebc6ec75e96674741
    Signed-off-by: Ruslan Valiyev <linuxoid@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

media: vidtv: fix NULL pointer dereference in vidtv_channel_pmt_match_sections [+ + +]
Author: Ruslan Valiyev <linuxoid@gmail.com>
Date:   Tue Mar 3 11:27:54 2026 +0000

    media: vidtv: fix NULL pointer dereference in vidtv_channel_pmt_match_sections
    
    commit f8e1fc918a9fe67103bcda01d20d745f264d00a7 upstream.
    
    syzbot reported a general protection fault in vidtv_psi_desc_assign [1].
    
    vidtv_psi_pmt_stream_init() can return NULL on memory allocation
    failure, but vidtv_channel_pmt_match_sections() does not check for
    this. When tail is NULL, the subsequent call to
    vidtv_psi_desc_assign(&tail->descriptor, desc) dereferences a NULL
    pointer offset, causing a general protection fault.
    
    Add a NULL check after vidtv_psi_pmt_stream_init(). On failure, clean
    up the already-allocated stream chain and return.
    
    [1]
    Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN PTI
    KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
    RIP: 0010:vidtv_psi_desc_assign+0x24/0x90 drivers/media/test-drivers/vidtv/vidtv_psi.c:629
    Call Trace:
     <TASK>
     vidtv_channel_pmt_match_sections drivers/media/test-drivers/vidtv/vidtv_channel.c:349 [inline]
     vidtv_channel_si_init+0x1445/0x1a50 drivers/media/test-drivers/vidtv/vidtv_channel.c:479
     vidtv_mux_init+0x526/0xbe0 drivers/media/test-drivers/vidtv/vidtv_mux.c:519
     vidtv_start_streaming drivers/media/test-drivers/vidtv/vidtv_bridge.c:194 [inline]
     vidtv_start_feed+0x33e/0x4d0 drivers/media/test-drivers/vidtv/vidtv_bridge.c:239
    
    Fixes: f90cf6079bf67 ("media: vidtv: add a bridge driver")
    Cc: stable@vger.kernel.org
    Reported-by: syzbot+1f5bcc7c919ec578777a@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=1f5bcc7c919ec578777a
    Signed-off-by: Ruslan Valiyev <linuxoid@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

media: vidtv: fix pass-by-value structs causing MSAN warnings [+ + +]
Author: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
Date:   Sat Feb 21 13:56:18 2026 +0100

    media: vidtv: fix pass-by-value structs causing MSAN warnings
    
    commit 5f8e73bde67e931468bc2a1860d78d72f0c6ba41 upstream.
    
    vidtv_ts_null_write_into() and vidtv_ts_pcr_write_into() take their
    argument structs by value, causing MSAN to report uninit-value warnings.
    While only vidtv_ts_null_write_into() has triggered a report so far,
    both functions share the same issue.
    
    Fix by passing both structs by const pointer instead, avoiding the
    stack copy of the struct along with its MSAN shadow and origin metadata.
    The functions do not modify the structs, which is enforced by the const
    qualifier.
    
    Fixes: f90cf6079bf67 ("media: vidtv: add a bridge driver")
    Cc: stable@vger.kernel.org
    Reported-by: syzbot+96f901260a0b2d29cd1a@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=96f901260a0b2d29cd1a
    Tested-by: syzbot+96f901260a0b2d29cd1a@syzkaller.appspotmail.com
    Suggested-by: Yihan Ding <dingyihan@uniontech.com>
    Signed-off-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
mm/kasan: fix double free for kasan pXds [+ + +]
Author: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Date:   Tue Feb 24 18:53:16 2026 +0530

    mm/kasan: fix double free for kasan pXds
    
    commit 51d8c78be0c27ddb91bc2c0263941d8b30a47d3b upstream.
    
    kasan_free_pxd() assumes the page table is always struct page aligned.
    But that's not always the case for all architectures.  E.g.  In case of
    powerpc with 64K pagesize, PUD table (of size 4096) comes from slab cache
    named pgtable-2^9.  Hence instead of page_to_virt(pxd_page()) let's just
    directly pass the start of the pxd table which is passed as the 1st
    argument.
    
    This fixes the below double free kasan issue seen with PMEM:
    
    radix-mmu: Mapped 0x0000047d10000000-0x0000047f90000000 with 2.00 MiB pages
    ==================================================================
    BUG: KASAN: double-free in kasan_remove_zero_shadow+0x9c4/0xa20
    Free of addr c0000003c38e0000 by task ndctl/2164
    
    CPU: 34 UID: 0 PID: 2164 Comm: ndctl Not tainted 6.19.0-rc1-00048-gea1013c15392 #157 VOLUNTARY
    Hardware name: IBM,9080-HEX POWER10 (architected) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_012) hv:phyp pSeries
    Call Trace:
     dump_stack_lvl+0x88/0xc4 (unreliable)
     print_report+0x214/0x63c
     kasan_report_invalid_free+0xe4/0x110
     check_slab_allocation+0x100/0x150
     kmem_cache_free+0x128/0x6e0
     kasan_remove_zero_shadow+0x9c4/0xa20
     memunmap_pages+0x2b8/0x5c0
     devm_action_release+0x54/0x70
     release_nodes+0xc8/0x1a0
     devres_release_all+0xe0/0x140
     device_unbind_cleanup+0x30/0x120
     device_release_driver_internal+0x3e4/0x450
     unbind_store+0xfc/0x110
     drv_attr_store+0x78/0xb0
     sysfs_kf_write+0x114/0x140
     kernfs_fop_write_iter+0x264/0x3f0
     vfs_write+0x3bc/0x7d0
     ksys_write+0xa4/0x190
     system_call_exception+0x190/0x480
     system_call_vectored_common+0x15c/0x2ec
    ---- interrupt: 3000 at 0x7fff93b3d3f4
    NIP:  00007fff93b3d3f4 LR: 00007fff93b3d3f4 CTR: 0000000000000000
    REGS: c0000003f1b07e80 TRAP: 3000   Not tainted  (6.19.0-rc1-00048-gea1013c15392)
    MSR:  800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE>  CR: 48888208  XER: 00000000
    <...>
    NIP [00007fff93b3d3f4] 0x7fff93b3d3f4
    LR [00007fff93b3d3f4] 0x7fff93b3d3f4
    ---- interrupt: 3000
    
     The buggy address belongs to the object at c0000003c38e0000
      which belongs to the cache pgtable-2^9 of size 4096
     The buggy address is located 0 bytes inside of
      4096-byte region [c0000003c38e0000, c0000003c38e1000)
    
     The buggy address belongs to the physical page:
     page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3c38c
     head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
     memcg:c0000003bfd63e01
     flags: 0x63ffff800000040(head|node=6|zone=0|lastcpupid=0x7ffff)
     page_type: f5(slab)
     raw: 063ffff800000040 c000000140058980 5deadbeef0000122 0000000000000000
     raw: 0000000000000000 0000000080200020 00000000f5000000 c0000003bfd63e01
     head: 063ffff800000040 c000000140058980 5deadbeef0000122 0000000000000000
     head: 0000000000000000 0000000080200020 00000000f5000000 c0000003bfd63e01
     head: 063ffff800000002 c00c000000f0e301 00000000ffffffff 00000000ffffffff
     head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
     page dumped because: kasan: bad access detected
    
    [  138.953636] [   T2164] Memory state around the buggy address:
    [  138.953643] [   T2164]  c0000003c38dff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [  138.953652] [   T2164]  c0000003c38dff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [  138.953661] [   T2164] >c0000003c38e0000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [  138.953669] [   T2164]                    ^
    [  138.953675] [   T2164]  c0000003c38e0080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [  138.953684] [   T2164]  c0000003c38e0100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [  138.953692] [   T2164] ==================================================================
    [  138.953701] [   T2164] Disabling lock debugging due to kernel taint
    
    Link: https://lkml.kernel.org/r/2f9135c7866c6e0d06e960993b8a5674a9ebc7ec.1771938394.git.ritesh.list@gmail.com
    Fixes: 0207df4fa1a8 ("kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN")
    Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
    Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
    Reviewed-by: Alexander Potapenko <glider@google.com>
    Cc: Andrey Konovalov <andreyknvl@gmail.com>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Cc: Dmitry Vyukov <dvyukov@google.com>
    Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
    Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
mm: blk-cgroup: fix use-after-free in cgwb_release_workfn() [+ + +]
Author: Breno Leitao <leitao@debian.org>
Date:   Mon Apr 13 03:09:19 2026 -0700

    mm: blk-cgroup: fix use-after-free in cgwb_release_workfn()
    
    commit 8f5857be99f1ed1fa80991c72449541f634626ee upstream.
    
    cgwb_release_workfn() calls css_put(wb->blkcg_css) and then later accesses
    wb->blkcg_css again via blkcg_unpin_online().  If css_put() drops the last
    reference, the blkcg can be freed asynchronously (css_free_rwork_fn ->
    blkcg_css_free -> kfree) before blkcg_unpin_online() dereferences the
    pointer to access blkcg->online_pin, resulting in a use-after-free:
    
      BUG: KASAN: slab-use-after-free in blkcg_unpin_online (./include/linux/instrumented.h:112 ./include/linux/atomic/atomic-instrumented.h:400 ./include/linux/refcount.h:389 ./include/linux/refcount.h:432 ./include/linux/refcount.h:450 block/blk-cgroup.c:1367)
      Write of size 4 at addr ff11000117aa6160 by task kworker/71:1/531
       Workqueue: cgwb_release cgwb_release_workfn
       Call Trace:
        <TASK>
         blkcg_unpin_online (./include/linux/instrumented.h:112 ./include/linux/atomic/atomic-instrumented.h:400 ./include/linux/refcount.h:389 ./include/linux/refcount.h:432 ./include/linux/refcount.h:450 block/blk-cgroup.c:1367)
         cgwb_release_workfn (mm/backing-dev.c:629)
         process_scheduled_works (kernel/workqueue.c:3278 kernel/workqueue.c:3385)
    
       Freed by task 1016:
        kfree (./include/linux/kasan.h:235 mm/slub.c:2689 mm/slub.c:6246 mm/slub.c:6561)
        css_free_rwork_fn (kernel/cgroup/cgroup.c:5542)
        process_scheduled_works (kernel/workqueue.c:3302 kernel/workqueue.c:3385)
    
    ** Stack based on commit 66672af7a095 ("Add linux-next specific files
    for 20260410")
    
    I am seeing this crash sporadically in Meta fleet across multiple kernel
    versions.  A full reproducer is available at:
    https://github.com/leitao/debug/blob/main/reproducers/repro_blkcg_uaf.sh
    
    (The race window is narrow.  To make it easily reproducible, inject a
    msleep(100) between css_put() and blkcg_unpin_online() in
    cgwb_release_workfn().  With that delay and a KASAN-enabled kernel, the
    reproducer triggers the splat reliably in less than a second.)
    
    Fix this by moving blkcg_unpin_online() before css_put(), so the
    cgwb's CSS reference keeps the blkcg alive while blkcg_unpin_online()
    accesses it.
    
    Link: https://lore.kernel.org/20260413-blkcg-v1-1-35b72622d16c@debian.org
    Fixes: 59b57717fff8 ("blkcg: delay blkg destruction until after writeback has finished")
    Signed-off-by: Breno Leitao <leitao@debian.org>
    Reviewed-by: Dennis Zhou <dennis@kernel.org>
    Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
    Cc: David Hildenbrand <david@kernel.org>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Josef Bacik <josef@toxicpanda.com>
    Cc: JP Kobryn <inwardvessel@gmail.com>
    Cc: Liam Howlett <liam.howlett@oracle.com>
    Cc: Lorenzo Stoakes (Oracle) <ljs@kernel.org>
    Cc: Martin KaFai Lau <martin.lau@linux.dev>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Mike Rapoport <rppt@kernel.org>
    Cc: Suren Baghdasaryan <surenb@google.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
net/packet: fix TOCTOU race on mmap'd vnet_hdr in tpacket_snd() [+ + +]
Author: Bingquan Chen <patzilla007@gmail.com>
Date:   Sat Apr 18 19:20:06 2026 +0800

    net/packet: fix TOCTOU race on mmap'd vnet_hdr in tpacket_snd()
    
    commit 2c054e17d9d41f1020376806c7f750834ced4dc5 upstream.
    
    In tpacket_snd(), when PACKET_VNET_HDR is enabled, vnet_hdr points
    directly into the mmap'd TX ring buffer shared with userspace. The
    kernel validates the header via __packet_snd_vnet_parse() but then
    re-reads all fields later in virtio_net_hdr_to_skb(). A concurrent
    userspace thread can modify the vnet_hdr fields between validation
    and use, bypassing all safety checks.
    
    The non-TPACKET path (packet_snd()) already correctly copies vnet_hdr
    to a stack-local variable. All other vnet_hdr consumers in the kernel
    (tun.c, tap.c, virtio_net.c) also use stack copies. The TPACKET TX
    path is the only caller of virtio_net_hdr_to_skb() that reads directly
    from user-controlled shared memory.
    
    Fix this by copying vnet_hdr from the mmap'd ring buffer to a
    stack-local variable before validation and use, consistent with the
    approach used in packet_snd() and all other callers.
    
    Fixes: 1d036d25e560 ("packet: tpacket_snd gso and checksum offload")
    Signed-off-by: Bingquan Chen <patzilla007@gmail.com>
    Reviewed-by: Willem de Bruijn <willemb@google.com>
    Link: https://patch.msgid.link/20260418112006.78823-1-patzilla007@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
net: add proper RCU protection to /proc/net/ptype [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Tue Apr 14 20:11:18 2026 +0800

    net: add proper RCU protection to /proc/net/ptype
    
    [ Upstream commit f613e8b4afea0cd17c7168e8b00e25bc8d33175d ]
    
    Yin Fengwei reported an RCU stall in ptype_seq_show() and provided
    a patch.
    
    Real issue is that ptype_seq_next() and ptype_seq_show() violate
    RCU rules.
    
    ptype_seq_show() runs under rcu_read_lock(), and reads pt->dev
    to get device name without any barrier.
    
    At the same time, concurrent writers can remove a packet_type structure
    (which is correctly freed after an RCU grace period) and clear pt->dev
    without an RCU grace period.
    
    Define ptype_iter_state to carry a dev pointer along seq_net_private:
    
    struct ptype_iter_state {
            struct seq_net_private  p;
            struct net_device       *dev; // added in this patch
    };
    
    We need to record the device pointer in ptype_get_idx() and
    ptype_seq_next() so that ptype_seq_show() is safe against
    concurrent pt->dev changes.
    
    We also need to add full RCU protection in ptype_seq_next().
    (Missing READ_ONCE() when reading list.next values)
    
    Many thanks to Dong Chenchen for providing a repro.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Fixes: 1d10f8a1f40b ("net-procfs: show net devices bound packet types")
    Fixes: c353e8983e0d ("net: introduce per netns packet chains")
    Reported-by: Yin Fengwei <fengwei_yin@linux.alibaba.com>
    Reported-by: Dong Chenchen <dongchenchen2@huawei.com>
    Closes: https://lore.kernel.org/netdev/CANn89iKRRKPnWjJmb-_3a=sq+9h6DvTQM4DBZHT5ZRGPMzQaiA@mail.gmail.com/T/#m7b80b9fc9b9267f90e0b7aad557595f686f9c50d
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reviewed-by: Willem de Bruijn <willemb@google.com>
    Tested-by: Yin Fengwei <fengwei_yin@linux.alibaba.com>
    Link: https://patch.msgid.link/20260202205217.2881198-1-edumazet@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    [ Some adjustments have been made. ]
    Signed-off-by: XiaoHua Wang <561399680@139.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: annotate data-races around sk->sk_{data_ready,write_space} [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Wed Apr 22 10:16:26 2026 +0800

    net: annotate data-races around sk->sk_{data_ready,write_space}
    
    [ Upstream commit 2ef2b20cf4e04ac8a6ba68493f8780776ff84300 ]
    
    skmsg (and probably other layers) are changing these pointers
    while other cpus might read them concurrently.
    
    Add corresponding READ_ONCE()/WRITE_ONCE() annotations
    for UDP, TCP and AF_UNIX.
    
    Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface")
    Reported-by: syzbot+87f770387a9e5dc6b79b@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/netdev/699ee9fc.050a0220.1cd54b.0009.GAE@google.com/
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Daniel Borkmann <daniel@iogearbox.net>
    Cc: John Fastabend <john.fastabend@gmail.com>
    Cc: Jakub Sitnicki <jakub@cloudflare.com>
    Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
    Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
    Link: https://patch.msgid.link/20260225131547.1085509-1-edumazet@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Leon Chen <leonchen.oss@139.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: ethernet: mtk_eth_soc: initialize PPE per-tag-layer MTU registers [+ + +]
Author: Daniel Golle <daniel@makrotopia.org>
Date:   Tue Apr 21 16:11:06 2026 +0100

    net: ethernet: mtk_eth_soc: initialize PPE per-tag-layer MTU registers
    
    commit 2dddb34dd0d07b01fa770eca89480a4da4f13153 upstream.
    
    The PPE enforces output frame size limits via per-tag-layer VLAN_MTU
    registers that the driver never initializes. The hardware defaults do
    not account for PPPoE overhead, causing the PPE to punt encapsulated
    frames back to the CPU instead of forwarding them.
    
    Initialize the registers at PPE start and on MTU changes using the
    maximum GMAC MTU. This is a conservative approximation -- the actual
    per-PPE requirement depends on egress path, but using the global
    maximum ensures the limits are never too small.
    
    Fixes: ba37b7caf1ed ("net: ethernet: mtk_eth_soc: add support for initializing the PPE")
    Signed-off-by: Daniel Golle <daniel@makrotopia.org>
    Link: https://patch.msgid.link/ec995ab8ce8be423267a1cc093147a74d2eb9d82.1775789829.git.daniel@makrotopia.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: ipa: fix event ring index not programmed for IPA v5.0+ [+ + +]
Author: Alexander Koskovich <akoskovich@pm.me>
Date:   Fri Apr 3 18:43:48 2026 +0200

    net: ipa: fix event ring index not programmed for IPA v5.0+
    
    [ Upstream commit 56007972c0b1e783ca714d6f1f4d6e66e531d21f ]
    
    For IPA v5.0+, the event ring index field moved from CH_C_CNTXT_0 to
    CH_C_CNTXT_1. The v5.0 register definition intended to define this
    field in the CH_C_CNTXT_1 fmask array but used the old identifier of
    ERINDEX instead of CH_ERINDEX.
    
    Without a valid event ring, GSI channels could never signal transfer
    completions. This caused gsi_channel_trans_quiesce() to block
    forever in wait_for_completion().
    
    At least for IPA v5.2 this resolves an issue seen where runtime
    suspend, system suspend, and remoteproc stop all hanged forever. It
    also meant the IPA data path was completely non functional.
    
    Fixes: faf0678ec8a0 ("net: ipa: add IPA v5.0 GSI register definitions")
    Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
    Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20260403-milos-ipa-v1-2-01e9e4e03d3e@fairphone.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: ipa: fix GENERIC_CMD register field masks for IPA v5.0+ [+ + +]
Author: Alexander Koskovich <akoskovich@pm.me>
Date:   Fri Apr 3 18:43:47 2026 +0200

    net: ipa: fix GENERIC_CMD register field masks for IPA v5.0+
    
    [ Upstream commit 9709b56d908acc120fe8b4ae250b3c9d749ea832 ]
    
    Fix the field masks to match the hardware layout documented in
    downstream GSI (GSI_V3_0_EE_n_GSI_EE_GENERIC_CMD_*).
    
    Notably this fixes a WARN I was seeing when I tried to send "stop"
    to the MPSS remoteproc while IPA was up.
    
    Fixes: faf0678ec8a0 ("net: ipa: add IPA v5.0 GSI register definitions")
    Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
    Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20260403-milos-ipa-v1-1-01e9e4e03d3e@fairphone.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: lapbether: handle NETDEV_PRE_TYPE_CHANGE [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Thu Apr 2 10:35:19 2026 +0000

    net: lapbether: handle NETDEV_PRE_TYPE_CHANGE
    
    [ Upstream commit b120e4432f9f56c7103133d6a11245e617695adb ]
    
    lapbeth_data_transmit() expects the underlying device type
    to be ARPHRD_ETHER.
    
    Returning NOTIFY_BAD from lapbeth_device_event() makes sure
    bonding driver can not break this expectation.
    
    Fixes: 872254dd6b1f ("net/bonding: Enable bonding to enslave non ARPHRD_ETHER")
    Reported-by: syzbot+d8c285748fa7292580a9@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/netdev/69cd22a1.050a0220.70c3a.0002.GAE@google.com/T/#u
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Martin Schiller <ms@dev.tdt.de>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20260402103519.1201565-1-edumazet@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: sched: act_csum: validate nested VLAN headers [+ + +]
Author: Ruide Cao <caoruide123@gmail.com>
Date:   Thu Apr 2 22:46:20 2026 +0800

    net: sched: act_csum: validate nested VLAN headers
    
    [ Upstream commit c842743d073bdd683606cb414eb0ca84465dd834 ]
    
    tcf_csum_act() walks nested VLAN headers directly from skb->data when an
    skb still carries in-payload VLAN tags. The current code reads
    vlan->h_vlan_encapsulated_proto and then pulls VLAN_HLEN bytes without
    first ensuring that the full VLAN header is present in the linear area.
    
    If only part of an inner VLAN header is linearized, accessing
    h_vlan_encapsulated_proto reads past the linear area, and the following
    skb_pull(VLAN_HLEN) may violate skb invariants.
    
    Fix this by requiring pskb_may_pull(skb, VLAN_HLEN) before accessing and
    pulling each nested VLAN header. If the header still is not fully
    available, drop the packet through the existing error path.
    
    Fixes: 2ecba2d1e45b ("net: sched: act_csum: Fix csum calc for tagged packets")
    Reported-by: Yifan Wu <yifanwucs@gmail.com>
    Reported-by: Juefei Pu <tomapufckgml@gmail.com>
    Co-developed-by: Yuan Tan <yuantan098@gmail.com>
    Signed-off-by: Yuan Tan <yuantan098@gmail.com>
    Suggested-by: Xin Liu <bird@lzu.edu.cn>
    Tested-by: Ren Wei <enjou1224z@gmail.com>
    Signed-off-by: Ruide Cao <caoruide123@gmail.com>
    Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/22df2fcb49f410203eafa5d97963dd36089f4ecf.1774892775.git.caoruide123@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: sched: fix TCF_LAYER_TRANSPORT handling in tcf_get_base_ptr() [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Wed Apr 15 15:19:21 2026 -0700

    net: sched: fix TCF_LAYER_TRANSPORT handling in tcf_get_base_ptr()
    
    [Upstream commit 4fe5a00ec70717a7f1002d8913ec6143582b3c8e]
    
    syzbot reported that tcf_get_base_ptr() can be called while transport
    header is not set [1].
    
    Instead of returning a dangling pointer, return NULL.
    
    Fix tcf_get_base_ptr() callers to handle this NULL value.
    
    [1]
     WARNING: CPU: 1 PID: 6019 at ./include/linux/skbuff.h:3071 skb_transport_header include/linux/skbuff.h:3071 [inline]
     WARNING: CPU: 1 PID: 6019 at ./include/linux/skbuff.h:3071 tcf_get_base_ptr include/net/pkt_cls.h:539 [inline]
     WARNING: CPU: 1 PID: 6019 at ./include/linux/skbuff.h:3071 em_nbyte_match+0x2d8/0x3f0 net/sched/em_nbyte.c:43
    Modules linked in:
    CPU: 1 UID: 0 PID: 6019 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full)
    Call Trace:
     <TASK>
      tcf_em_match net/sched/ematch.c:494 [inline]
      __tcf_em_tree_match+0x1ac/0x770 net/sched/ematch.c:520
      tcf_em_tree_match include/net/pkt_cls.h:512 [inline]
      basic_classify+0x115/0x2d0 net/sched/cls_basic.c:50
      tc_classify include/net/tc_wrapper.h:197 [inline]
      __tcf_classify net/sched/cls_api.c:1764 [inline]
      tcf_classify+0x4cf/0x1140 net/sched/cls_api.c:1860
      multiq_classify net/sched/sch_multiq.c:39 [inline]
      multiq_enqueue+0xfd/0x4c0 net/sched/sch_multiq.c:66
      dev_qdisc_enqueue+0x4e/0x260 net/core/dev.c:4118
      __dev_xmit_skb net/core/dev.c:4214 [inline]
      __dev_queue_xmit+0xe83/0x3b50 net/core/dev.c:4729
      packet_snd net/packet/af_packet.c:3076 [inline]
      packet_sendmsg+0x3e33/0x5080 net/packet/af_packet.c:3108
      sock_sendmsg_nosec net/socket.c:727 [inline]
      __sock_sendmsg+0x21c/0x270 net/socket.c:742
      ____sys_sendmsg+0x505/0x830 net/socket.c:2630
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Reported-by: syzbot+f3a497f02c389d86ef16@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/netdev/6920855a.a70a0220.2ea503.0058.GAE@google.com/T/#u
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
    Link: https://patch.msgid.link/20251121154100.1616228-1-edumazet@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: skb: fix cross-cache free of KFENCE-allocated skb head [+ + +]
Author: Jiayuan Chen <jiayuan.chen@linux.dev>
Date:   Tue Apr 14 08:11:26 2026 -0400

    net: skb: fix cross-cache free of KFENCE-allocated skb head
    
    [ Upstream commit 0f42e3f4fe2a58394e37241d02d9ca6ab7b7d516 ]
    
    SKB_SMALL_HEAD_CACHE_SIZE is intentionally set to a non-power-of-2
    value (e.g. 704 on x86_64) to avoid collisions with generic kmalloc
    bucket sizes. This ensures that skb_kfree_head() can reliably use
    skb_end_offset to distinguish skb heads allocated from
    skb_small_head_cache vs. generic kmalloc caches.
    
    However, when KFENCE is enabled, kfence_ksize() returns the exact
    requested allocation size instead of the slab bucket size. If a caller
    (e.g. bpf_test_init) allocates skb head data via kzalloc() and the
    requested size happens to equal SKB_SMALL_HEAD_CACHE_SIZE, then
    slab_build_skb() -> ksize() returns that exact value. After subtracting
    skb_shared_info overhead, skb_end_offset ends up matching
    SKB_SMALL_HEAD_HEADROOM, causing skb_kfree_head() to incorrectly free
    the object to skb_small_head_cache instead of back to the original
    kmalloc cache, resulting in a slab cross-cache free:
    
      kmem_cache_free(skbuff_small_head): Wrong slab cache. Expected
      skbuff_small_head but got kmalloc-1k
    
    Fix this by always calling kfree(head) in skb_kfree_head(). This keeps
    the free path generic and avoids allocator-specific misclassification
    for KFENCE objects.
    
    Fixes: bf9f1baa279f ("net: add dedicated kmem_cache for typical/small skb->head")
    Reported-by: Antonius <antonius@bluedragonsec.com>
    Closes: https://lore.kernel.org/netdev/CAK8a0jxC5L5N7hq-DT2_NhUyjBxrPocoiDazzsBk4TGgT1r4-A@mail.gmail.com/
    Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://patch.msgid.link/20260403014517.142550-1-jiayuan.chen@linux.dev
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    [ adapted variable names ]
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: stmmac: Fix PTP ref clock for Tegra234 [+ + +]
Author: Jon Hunter <jonathanh@nvidia.com>
Date:   Wed Apr 1 11:29:39 2026 +0100

    net: stmmac: Fix PTP ref clock for Tegra234
    
    [ Upstream commit 1345e9f4e3f3bc7d8a0a2138ae29e205a857a555 ]
    
    Since commit 030ce919e114 ("net: stmmac: make sure that ptp_rate is not
    0 before configuring timestamping") was added the following error is
    observed on Tegra234:
    
     ERR KERN tegra-mgbe 6800000.ethernet eth0: Invalid PTP clock rate
     WARNING KERN tegra-mgbe 6800000.ethernet eth0: PTP init failed
    
    It turns out that the Tegra234 device-tree binding defines the PTP ref
    clock name as 'ptp-ref' and not 'ptp_ref' and the above commit now
    exposes this and that the PTP clock is not configured correctly.
    
    In order to update device-tree to use the correct 'ptp_ref' name, update
    the Tegra MGBE driver to use 'ptp_ref' by default and fallback to using
    'ptp-ref' if this clock name is present.
    
    Fixes: d8ca113724e7 ("net: stmmac: tegra: Add MGBE support")
    Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20260401102941.17466-2-jonathanh@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: txgbe: leave space for null terminators on property_entry [+ + +]
Author: Fabio Baltieri <fabio.baltieri@gmail.com>
Date:   Sun Apr 5 23:20:13 2026 +0100

    net: txgbe: leave space for null terminators on property_entry
    
    [ Upstream commit 5a37d228799b0ec2c277459c83c814a59d310bc3 ]
    
    Lists of struct property_entry are supposed to be terminated with an
    empty property, this driver currently seems to be allocating exactly the
    amount of entry used.
    
    Change the struct definition to leave an extra element for all
    property_entry.
    
    Fixes: c3e382ad6d15 ("net: txgbe: Add software nodes to support phylink")
    Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
    Tested-by: Jiawen Wu <jiawenwu@trustnetic.com>
    Link: https://patch.msgid.link/20260405222013.5347-1-fabio.baltieri@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: usb: cdc-phonet: fix skb frags[] overflow in rx_complete() [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Sat Apr 11 13:01:35 2026 +0200

    net: usb: cdc-phonet: fix skb frags[] overflow in rx_complete()
    
    commit 600dc40554dc5ad1e6f3af51f700228033f43ea7 upstream.
    
    A malicious USB device claiming to be a CDC Phonet modem can overflow
    the skb_shared_info->frags[] array by sending an unbounded sequence of
    full-page bulk transfers.
    
    Drop the skb and increment the length error when the frag limit is
    reached.  This matches the same fix that commit f0813bcd2d9d ("net:
    wwan: t7xx: fix potential skb->frags overflow in RX path") did for the
    t7xx driver.
    
    Cc: Andrew Lunn <andrew+netdev@lunn.ch>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Jakub Kicinski <kuba@kernel.org>
    Cc: Paolo Abeni <pabeni@redhat.com>
    Cc: stable <stable@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://patch.msgid.link/2026041134-dreamboat-buddhism-d1ec@gregkh
    Fixes: 87cf65601e17 ("USB host CDC Phonet network interface driver")
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
netfilter: conntrack: add missing netlink policy validations [+ + +]
Author: Florian Westphal <fw@strlen.de>
Date:   Tue Mar 10 00:28:29 2026 +0100

    netfilter: conntrack: add missing netlink policy validations
    
    [ Upstream commit f900e1d77ee0ef87bfb5ab3fe60f0b3d8ad5ba05 ]
    
    Hyunwoo Kim reports out-of-bounds access in sctp and ctnetlink.
    
    These attributes are used by the kernel without any validation.
    Extend the netlink policies accordingly.
    
    Quoting the reporter:
      nlattr_to_sctp() assigns the user-supplied CTA_PROTOINFO_SCTP_STATE
      value directly to ct->proto.sctp.state without checking that it is
      within the valid range. [..]
    
      and: ... with exp->dir = 100, the access at
      ct->master->tuplehash[100] reads 5600 bytes past the start of a
      320-byte nf_conn object, causing a slab-out-of-bounds read confirmed by
      UBSAN.
    
    Fixes: 076a0ca02644 ("netfilter: ctnetlink: add NAT support for expectations")
    Fixes: a258860e01b8 ("netfilter: ctnetlink: add full support for SCTP to ctnetlink")
    Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netfilter: ip6t_eui64: reject invalid MAC header for all packets [+ + +]
Author: Zhengchuan Liang <zcliangcn@gmail.com>
Date:   Sat Apr 4 17:39:47 2026 +0800

    netfilter: ip6t_eui64: reject invalid MAC header for all packets
    
    [ Upstream commit fdce0b3590f724540795b874b4c8850c90e6b0a8 ]
    
    `eui64_mt6()` derives a modified EUI-64 from the Ethernet source address
    and compares it with the low 64 bits of the IPv6 source address.
    
    The existing guard only rejects an invalid MAC header when
    `par->fragoff != 0`. For packets with `par->fragoff == 0`, `eui64_mt6()`
    can still reach `eth_hdr(skb)` even when the MAC header is not valid.
    
    Fix this by removing the `par->fragoff != 0` condition so that packets
    with an invalid MAC header are rejected before accessing `eth_hdr(skb)`.
    
    Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2")
    Reported-by: Yifan Wu <yifanwucs@gmail.com>
    Reported-by: Juefei Pu <tomapufckgml@gmail.com>
    Co-developed-by: Yuan Tan <yuantan098@gmail.com>
    Signed-off-by: Yuan Tan <yuantan098@gmail.com>
    Suggested-by: Xin Liu <bird@lzu.edu.cn>
    Tested-by: Ren Wei <enjou1224z@gmail.com>
    Signed-off-by: Zhengchuan Liang <zcliangcn@gmail.com>
    Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netfilter: nfnetlink_log: initialize nfgenmsg in NLMSG_DONE terminator [+ + +]
Author: Xiang Mei <xmei5@asu.edu>
Date:   Wed Apr 1 14:20:57 2026 -0700

    netfilter: nfnetlink_log: initialize nfgenmsg in NLMSG_DONE terminator
    
    [ Upstream commit 1f3083aec8836213da441270cdb1ab612dd82cf4 ]
    
    When batching multiple NFLOG messages (inst->qlen > 1), __nfulnl_send()
    appends an NLMSG_DONE terminator with sizeof(struct nfgenmsg) payload via
    nlmsg_put(), but never initializes the nfgenmsg bytes. The nlmsg_put()
    helper only zeroes alignment padding after the payload, not the payload
    itself, so four bytes of stale kernel heap data are leaked to userspace
    in the NLMSG_DONE message body.
    
    Use nfnl_msg_put() to build the NLMSG_DONE terminator, which initializes
    the nfgenmsg payload via nfnl_fill_hdr(), consistent with how
    __build_packet_message() already constructs NFULNL_MSG_PACKET headers.
    
    Fixes: 29c5d4afba51 ("[NETFILTER]: nfnetlink_log: fix sending of multipart messages")
    Reported-by: Weiming Shi <bestswngs@gmail.com>
    Signed-off-by: Xiang Mei <xmei5@asu.edu>
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netfilter: nft_set_pipapo_avx2: don't return non-matching entry on expiry [+ + +]
Author: Florian Westphal <fw@strlen.de>
Date:   Wed Mar 25 14:10:55 2026 +0100

    netfilter: nft_set_pipapo_avx2: don't return non-matching entry on expiry
    
    [ Upstream commit d3c0037ffe1273fa1961e779ff6906234d6cf53c ]
    
    New test case fails unexpectedly when avx2 matching functions are used.
    
    The test first loads a ranomly generated pipapo set
    with 'ipv4 . port' key, i.e.  nft -f foo.
    
    This works.  Then, it reloads the set after a flush:
    (echo flush set t s; cat foo) | nft -f -
    
    This is expected to work, because its the same set after all and it was
    already loaded once.
    
    But with avx2, this fails: nft reports a clashing element.
    
    The reported clash is of following form:
    
        We successfully re-inserted
          a . b
          c . d
    
    Then we try to insert a . d
    
    avx2 finds the already existing a . d, which (due to 'flush set') is marked
    as invalid in the new generation.  It skips the element and moves to next.
    
    Due to incorrect masking, the skip-step finds the next matching
    element *only considering the first field*,
    
    i.e. we return the already reinserted "a . b", even though the
    last field is different and the entry should not have been matched.
    
    No such error is reported for the generic c implementation (no avx2) or when
    the last field has to use the 'nft_pipapo_avx2_lookup_slow' fallback.
    
    Bisection points to
    7711f4bb4b36 ("netfilter: nft_set_pipapo: fix range overlap detection")
    but that fix merely uncovers this bug.
    
    Before this commit, the wrong element is returned, but erronously
    reported as a full, identical duplicate.
    
    The root-cause is too early return in the avx2 match functions.
    When we process the last field, we should continue to process data
    until the entire input size has been consumed to make sure no stale
    bits remain in the map.
    
    Link: https://lore.kernel.org/netfilter-devel/20260321152506.037f68c0@elisabeth/
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netfilter: xt_multiport: validate range encoding in checkentry [+ + +]
Author: Ren Wei <n05ec@lzu.edu.cn>
Date:   Fri Apr 3 23:52:52 2026 +0800

    netfilter: xt_multiport: validate range encoding in checkentry
    
    [ Upstream commit ff64c5bfef12461df8450e0f50bb693b5269c720 ]
    
    ports_match_v1() treats any non-zero pflags entry as the start of a
    port range and unconditionally consumes the next ports[] element as
    the range end.
    
    The checkentry path currently validates protocol, flags and count, but
    it does not validate the range encoding itself. As a result, malformed
    rules can mark the last slot as a range start or place two range starts
    back to back, leaving ports_match_v1() to step past the last valid
    ports[] element while interpreting the rule.
    
    Reject malformed multiport v1 rules in checkentry by validating that
    each range start has a following element and that the following element
    is not itself marked as another range start.
    
    Fixes: a89ecb6a2ef7 ("[NETFILTER]: x_tables: unify IPv4/IPv6 multiport match")
    Reported-by: Yifan Wu <yifanwucs@gmail.com>
    Reported-by: Juefei Pu <tomapufckgml@gmail.com>
    Co-developed-by: Yuan Tan <yuantan098@gmail.com>
    Signed-off-by: Yuan Tan <yuantan098@gmail.com>
    Suggested-by: Xin Liu <bird@lzu.edu.cn>
    Tested-by: Yuhang Zheng <z1652074432@gmail.com>
    Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
nf_tables: nft_dynset: fix possible stateful expression memleak in error path [+ + +]
Author: Pablo Neira Ayuso <pablo@netfilter.org>
Date:   Fri Apr 17 16:18:55 2026 +0800

    nf_tables: nft_dynset: fix possible stateful expression memleak in error path
    
    [ Upstream commit 0548a13b5a145b16e4da0628b5936baf35f51b43 ]
    
    If cloning the second stateful expression in the element via GFP_ATOMIC
    fails, then the first stateful expression remains in place without being
    released.
    
       unreferenced object (percpu) 0x607b97e9cab8 (size 16):
         comm "softirq", pid 0, jiffies 4294931867
         hex dump (first 16 bytes on cpu 3):
           00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
         backtrace (crc 0):
           pcpu_alloc_noprof+0x453/0xd80
           nft_counter_clone+0x9c/0x190 [nf_tables]
           nft_expr_clone+0x8f/0x1b0 [nf_tables]
           nft_dynset_new+0x2cb/0x5f0 [nf_tables]
           nft_rhash_update+0x236/0x11c0 [nf_tables]
           nft_dynset_eval+0x11f/0x670 [nf_tables]
           nft_do_chain+0x253/0x1700 [nf_tables]
           nft_do_chain_ipv4+0x18d/0x270 [nf_tables]
           nf_hook_slow+0xaa/0x1e0
           ip_local_deliver+0x209/0x330
    
    Fixes: 563125a73ac3 ("netfilter: nftables: generalize set extension to support for several expressions")
    Reported-by: Gurpreet Shergill <giki.shergill@proton.me>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Florian Westphal <fw@strlen.de>
    [ Minor conflict resolved. ]
    Signed-off-by: Li hongliang <1468888505@139.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
NFC: digital: Bounds check NFC-A cascade depth in SDD response handler [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Thu Apr 9 17:18:14 2026 +0200

    NFC: digital: Bounds check NFC-A cascade depth in SDD response handler
    
    commit 46ce8be2ced389bccd84bcc04a12cf2f4d0c22d1 upstream.
    
    The NFC-A anti-collision cascade in digital_in_recv_sdd_res() appends 3
    or 4 bytes to target->nfcid1 on each round, but the number of cascade
    rounds is controlled entirely by the peer device.  The peer sets the
    cascade tag in the SDD_RES (deciding 3 vs 4 bytes) and the
    cascade-incomplete bit in the SEL_RES (deciding whether another round
    follows).
    
    ISO 14443-3 limits NFC-A to three cascade levels and target->nfcid1 is
    sized accordingly (NFC_NFCID1_MAXSIZE = 10), but nothing in the driver
    actually enforces this.  This means a malicious peer can keep the
    cascade running, writing past the heap-allocated nfc_target with each
    round.
    
    Fix this by rejecting the response when the accumulated UID would exceed
    the buffer.
    
    Commit e329e71013c9 ("NFC: nci: Bounds check struct nfc_target arrays")
    fixed similar missing checks against the same field on the NCI path.
    
    Cc: Simon Horman <horms@kernel.org>
    Cc: Kees Cook <kees@kernel.org>
    Cc: Thierry Escande <thierry.escande@linux.intel.com>
    Cc: Samuel Ortiz <sameo@linux.intel.com>
    Fixes: 2c66daecc409 ("NFC Digital: Add NFC-A technology support")
    Cc: stable <stable@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://patch.msgid.link/2026040913-figure-seducing-bd3f@gregkh
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
nfc: llcp: add missing return after LLCP_CLOSED checks [+ + +]
Author: Junxi Qian <qjx1298677004@gmail.com>
Date:   Wed Apr 8 16:10:06 2026 +0800

    nfc: llcp: add missing return after LLCP_CLOSED checks
    
    commit 2b5dd4632966c39da6ba74dbc8689b309065e82c upstream.
    
    In nfc_llcp_recv_hdlc() and nfc_llcp_recv_disc(), when the socket
    state is LLCP_CLOSED, the code correctly calls release_sock() and
    nfc_llcp_sock_put() but fails to return. Execution falls through to
    the remainder of the function, which calls release_sock() and
    nfc_llcp_sock_put() again. This results in a double release_sock()
    and a refcount underflow via double nfc_llcp_sock_put(), leading to
    a use-after-free.
    
    Add the missing return statements after the LLCP_CLOSED branches
    in both functions to prevent the fall-through.
    
    Fixes: d646960f7986 ("NFC: Initial LLCP support")
    Signed-off-by: Junxi Qian <qjx1298677004@gmail.com>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://patch.msgid.link/20260408081006.3723-1-qjx1298677004@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

nfc: nci: complete pending data exchange on device close [+ + +]
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Thu Apr 16 16:11:19 2026 +0800

    nfc: nci: complete pending data exchange on device close
    
    [ Upstream commit 66083581945bd5b8e99fe49b5aeb83d03f62d053 ]
    
    In nci_close_device(), complete any pending data exchange before
    closing. The data exchange callback (e.g.
    rawsock_data_exchange_complete) holds a socket reference.
    
    NIPA occasionally hits this leak:
    
    unreferenced object 0xff1100000f435000 (size 2048):
      comm "nci_dev", pid 3954, jiffies 4295441245
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        27 00 01 40 00 00 00 00 00 00 00 00 00 00 00 00  '..@............
      backtrace (crc ec2b3c5):
        __kmalloc_noprof+0x4db/0x730
        sk_prot_alloc.isra.0+0xe4/0x1d0
        sk_alloc+0x36/0x760
        rawsock_create+0xd1/0x540
        nfc_sock_create+0x11f/0x280
        __sock_create+0x22d/0x630
        __sys_socket+0x115/0x1d0
        __x64_sys_socket+0x72/0xd0
        do_syscall_64+0x117/0xfc0
        entry_SYSCALL_64_after_hwframe+0x4b/0x53
    
    Fixes: 38f04c6b1b68 ("NFC: protect nci_data_exchange transactions")
    Reviewed-by: Joe Damato <joe@dama.to>
    Link: https://patch.msgid.link/20260303162346.2071888-4-kuba@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Rajani Kantha <681739313@139.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

nfc: s3fwrn5: allocate rx skb before consuming bytes [+ + +]
Author: Pengpeng Hou <pengpeng@iscas.ac.cn>
Date:   Thu Apr 2 12:21:48 2026 +0800

    nfc: s3fwrn5: allocate rx skb before consuming bytes
    
    [ Upstream commit 5c14a19d5b1645cce1cb1252833d70b23635b632 ]
    
    s3fwrn82_uart_read() reports the number of accepted bytes to the serdev
    core. The current code consumes bytes into recv_skb and may already
    deliver a complete frame before allocating a fresh receive buffer.
    
    If that alloc_skb() fails, the callback returns 0 even though it has
    already consumed bytes, and it leaves recv_skb as NULL for the next
    receive callback. That breaks the receive_buf() accounting contract and
    can also lead to a NULL dereference on the next skb_put_u8().
    
    Allocate the receive skb lazily before consuming the next byte instead.
    If allocation fails, return the number of bytes already accepted.
    
    Fixes: 3f52c2cb7e3a ("nfc: s3fwrn5: Support a UART interface")
    Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
    Link: https://patch.msgid.link/20260402042148.65236-1-pengpeng@iscas.ac.cn
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
nilfs2: fix NULL i_assoc_inode dereference in nilfs_mdt_save_to_shadow_map [+ + +]
Author: Deepanshu Kartikey <kartikey406@gmail.com>
Date:   Tue Mar 31 09:47:21 2026 +0900

    nilfs2: fix NULL i_assoc_inode dereference in nilfs_mdt_save_to_shadow_map
    
    commit 4a4e0328edd9e9755843787d28f16dd4165f8b48 upstream.
    
    The DAT inode's btree node cache (i_assoc_inode) is initialized lazily
    during btree operations. However, nilfs_mdt_save_to_shadow_map()
    assumes i_assoc_inode is already initialized when copying dirty pages
    to the shadow map during GC.
    
    If NILFS_IOCTL_CLEAN_SEGMENTS is called immediately after mount before
    any btree operation has occurred on the DAT inode, i_assoc_inode is
    NULL leading to a general protection fault.
    
    Fix this by calling nilfs_attach_btree_node_cache() on the DAT inode
    in nilfs_dat_read() at mount time, ensuring i_assoc_inode is always
    initialized before any GC operation can use it.
    
    Reported-by: syzbot+4b4093b1f24ad789bf37@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=4b4093b1f24ad789bf37
    Tested-by: syzbot+4b4093b1f24ad789bf37@syzkaller.appspotmail.com
    Fixes: e897be17a441 ("nilfs2: fix lockdep warnings in page operations for btree nodes")
    Signed-off-by: Deepanshu Kartikey <Kartikey406@gmail.com>
    Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
objtool: Remove max symbol name length limitation [+ + +]
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Wed Oct 4 17:08:19 2023 -0700

    objtool: Remove max symbol name length limitation
    
    [ Upstream commit f404a58dcf0c862b05602f641ce5fdd8b98fbc3a ]
    
    If one of the symbols processed by read_symbols() happens to have a
    .cold variant with a name longer than objtool's MAX_NAME_LEN limit, the
    build fails.
    
    Avoid this problem by just using strndup() to copy the parent function's
    name, rather than strncpy()ing it onto the stack.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Link: https://lore.kernel.org/r/41e94cfea1d9131b758dd637fecdeacd459d4584.1696355111.git.aplattner@nvidia.com
    Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ocfs2: add inline inode consistency check to ocfs2_validate_inode_block() [+ + +]
Author: Dmitry Antipov <dmantipov@yandex.ru>
Date:   Mon Apr 13 11:35:28 2026 -0400

    ocfs2: add inline inode consistency check to ocfs2_validate_inode_block()
    
    [ Upstream commit a2b1c419ff72ec62ff5831684e30cd1d4f0b09ee ]
    
    In 'ocfs2_validate_inode_block()', add an extra check whether an inode
    with inline data (i.e.  self-contained) has no clusters, thus preventing
    an invalid inode from being passed to 'ocfs2_evict_inode()' and below.
    
    Link: https://lkml.kernel.org/r/20251023141650.417129-1-dmantipov@yandex.ru
    Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
    Reported-by: syzbot+c16daba279a1161acfb0@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=c16daba279a1161acfb0
    Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Cc: Joseph Qi <jiangqi903@gmail.com>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Junxiao Bi <junxiao.bi@oracle.com>
    Cc: Changwei Ge <gechangwei@live.cn>
    Cc: Jun Piao <piaojun@huawei.com>
    Cc: Heming Zhao <heming.zhao@suse.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Stable-dep-of: 7bc5da4842be ("ocfs2: fix out-of-bounds write in ocfs2_write_end_inline")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ocfs2: fix out-of-bounds write in ocfs2_write_end_inline [+ + +]
Author: Joseph Qi <joseph.qi@linux.alibaba.com>
Date:   Mon Apr 13 11:35:30 2026 -0400

    ocfs2: fix out-of-bounds write in ocfs2_write_end_inline
    
    [ Upstream commit 7bc5da4842bed3252d26e742213741a4d0ac1b14 ]
    
    KASAN reports a use-after-free write of 4086 bytes in
    ocfs2_write_end_inline, called from ocfs2_write_end_nolock during a
    copy_file_range splice fallback on a corrupted ocfs2 filesystem mounted on
    a loop device.  The actual bug is an out-of-bounds write past the inode
    block buffer, not a true use-after-free.  The write overflows into an
    adjacent freed page, which KASAN reports as UAF.
    
    The root cause is that ocfs2_try_to_write_inline_data trusts the on-disk
    id_count field to determine whether a write fits in inline data.  On a
    corrupted filesystem, id_count can exceed the physical maximum inline data
    capacity, causing writes to overflow the inode block buffer.
    
    Call trace (crash path):
    
       vfs_copy_file_range (fs/read_write.c:1634)
         do_splice_direct
           splice_direct_to_actor
             iter_file_splice_write
               ocfs2_file_write_iter
                 generic_perform_write
                   ocfs2_write_end
                     ocfs2_write_end_nolock (fs/ocfs2/aops.c:1949)
                       ocfs2_write_end_inline (fs/ocfs2/aops.c:1915)
                         memcpy_from_folio     <-- KASAN: write OOB
    
    So add id_count upper bound check in ocfs2_validate_inode_block() to
    alongside the existing i_size check to fix it.
    
    Link: https://lkml.kernel.org/r/20260403063830.3662739-1-joseph.qi@linux.alibaba.com
    Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Reported-by: syzbot+62c1793956716ea8b28a@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=62c1793956716ea8b28a
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Junxiao Bi <junxiao.bi@oracle.com>
    Cc: Changwei Ge <gechangwei@live.cn>
    Cc: Jun Piao <piaojun@huawei.com>
    Cc: Heming Zhao <heming.zhao@suse.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ocfs2: fix possible deadlock between unlink and dio_end_io_write [+ + +]
Author: Joseph Qi <joseph.qi@linux.alibaba.com>
Date:   Fri Mar 6 11:22:11 2026 +0800

    ocfs2: fix possible deadlock between unlink and dio_end_io_write
    
    commit b02da26a992db0c0e2559acbda0fc48d4a2fd337 upstream.
    
    ocfs2_unlink takes orphan dir inode_lock first and then ip_alloc_sem,
    while in ocfs2_dio_end_io_write, it acquires these locks in reverse order.
    This creates an ABBA lock ordering violation on lock classes
    ocfs2_sysfile_lock_key[ORPHAN_DIR_SYSTEM_INODE] and
    ocfs2_file_ip_alloc_sem_key.
    
    Lock Chain #0 (orphan dir inode_lock -> ip_alloc_sem):
    ocfs2_unlink
      ocfs2_prepare_orphan_dir
        ocfs2_lookup_lock_orphan_dir
          inode_lock(orphan_dir_inode) <- lock A
        __ocfs2_prepare_orphan_dir
          ocfs2_prepare_dir_for_insert
            ocfs2_extend_dir
              ocfs2_expand_inline_dir
                down_write(&oi->ip_alloc_sem) <- Lock B
    
    Lock Chain #1 (ip_alloc_sem -> orphan dir inode_lock):
    ocfs2_dio_end_io_write
      down_write(&oi->ip_alloc_sem) <- Lock B
      ocfs2_del_inode_from_orphan()
        inode_lock(orphan_dir_inode) <- Lock A
    
    Deadlock Scenario:
      CPU0 (unlink)                     CPU1 (dio_end_io_write)
      ------                            ------
      inode_lock(orphan_dir_inode)
                                        down_write(ip_alloc_sem)
      down_write(ip_alloc_sem)
                                        inode_lock(orphan_dir_inode)
    
    Since ip_alloc_sem is to protect allocation changes, which is unrelated
    with operations in ocfs2_del_inode_from_orphan.  So move
    ocfs2_del_inode_from_orphan out of ip_alloc_sem to fix the deadlock.
    
    Link: https://lkml.kernel.org/r/20260306032211.1016452-1-joseph.qi@linux.alibaba.com
    Reported-by: syzbot+67b90111784a3eac8c04@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=67b90111784a3eac8c04
    Fixes: a86a72a4a4e0 ("ocfs2: take ip_alloc_sem in ocfs2_dio_get_block & ocfs2_dio_end_io_write")
    Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Reviewed-by: Heming Zhao <heming.zhao@suse.com>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Junxiao Bi <junxiao.bi@oracle.com>
    Cc: Joseph Qi <jiangqi903@gmail.com>
    Cc: Changwei Ge <gechangwei@live.cn>
    Cc: Jun Piao <piaojun@huawei.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ocfs2: fix use-after-free in ocfs2_fault() when VM_FAULT_RETRY [+ + +]
Author: Tejas Bharambe <tejas.bharambe@outlook.com>
Date:   Fri Apr 10 01:38:16 2026 -0700

    ocfs2: fix use-after-free in ocfs2_fault() when VM_FAULT_RETRY
    
    commit 7de554cabf160e331e4442e2a9ad874ca9875921 upstream.
    
    filemap_fault() may drop the mmap_lock before returning VM_FAULT_RETRY,
    as documented in mm/filemap.c:
    
      "If our return value has VM_FAULT_RETRY set, it's because the mmap_lock
      may be dropped before doing I/O or by lock_folio_maybe_drop_mmap()."
    
    When this happens, a concurrent munmap() can call remove_vma() and free
    the vm_area_struct via RCU. The saved 'vma' pointer in ocfs2_fault() then
    becomes a dangling pointer, and the subsequent trace_ocfs2_fault() call
    dereferences it -- a use-after-free.
    
    Fix this by saving ip_blkno as a plain integer before calling
    filemap_fault(), and removing vma from the trace event. Since
    ip_blkno is copied by value before the lock can be dropped, it
    remains valid regardless of what happens to the vma or inode
    afterward.
    
    Link: https://lkml.kernel.org/r/20260410083816.34951-1-tejas.bharambe@outlook.com
    Fixes: 614a9e849ca6 ("ocfs2: Remove FILE_IO from masklog.")
    Signed-off-by: Tejas Bharambe <tejas.bharambe@outlook.com>
    Reported-by: syzbot+a49010a0e8fcdeea075f@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=a49010a0e8fcdeea075f
    Suggested-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Junxiao Bi <junxiao.bi@oracle.com>
    Cc: Changwei Ge <gechangwei@live.cn>
    Cc: Jun Piao <piaojun@huawei.com>
    Cc: Heming Zhao <heming.zhao@suse.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ocfs2: handle invalid dinode in ocfs2_group_extend [+ + +]
Author: ZhengYuan Huang <gality369@gmail.com>
Date:   Wed Apr 1 17:23:03 2026 +0800

    ocfs2: handle invalid dinode in ocfs2_group_extend
    
    commit 4a1c0ddc6e7bcf2e9db0eeaab9340dcfe97f448f upstream.
    
    [BUG]
    kernel BUG at fs/ocfs2/resize.c:308!
    Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
    RIP: 0010:ocfs2_group_extend+0x10aa/0x1ae0 fs/ocfs2/resize.c:308
    Code: 8b8520ff ffff83f8 860f8580 030000e8 5cc3c1fe
    Call Trace:
     ...
     ocfs2_ioctl+0x175/0x6e0 fs/ocfs2/ioctl.c:869
     vfs_ioctl fs/ioctl.c:51 [inline]
     __do_sys_ioctl fs/ioctl.c:597 [inline]
     __se_sys_ioctl fs/ioctl.c:583 [inline]
     __x64_sys_ioctl+0x197/0x1e0 fs/ioctl.c:583
     x64_sys_call+0x1144/0x26a0 arch/x86/include/generated/asm/syscalls_64.h:17
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0x93/0xf80 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x76/0x7e
     ...
    
    [CAUSE]
    ocfs2_group_extend() assumes that the global bitmap inode block
    returned from ocfs2_inode_lock() has already been validated and
    BUG_ONs when the signature is not a dinode. That assumption is too
    strong for crafted filesystems because the JBD2-managed buffer path
    can bypass structural validation and return an invalid dinode to the
    resize ioctl.
    
    [FIX]
    Validate the dinode explicitly in ocfs2_group_extend(). If the global
    bitmap buffer does not contain a valid dinode, report filesystem
    corruption with ocfs2_error() and fail the resize operation instead of
    crashing the kernel.
    
    Link: https://lkml.kernel.org/r/20260401092303.3709187-1-gality369@gmail.com
    Fixes: 10995aa2451a ("ocfs2: Morph the haphazard OCFS2_IS_VALID_DINODE() checks.")
    Signed-off-by: ZhengYuan Huang <gality369@gmail.com>
    Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Junxiao Bi <junxiao.bi@oracle.com>
    Cc: Changwei Ge <gechangwei@live.cn>
    Cc: Jun Piao <piaojun@huawei.com>
    Cc: Heming Zhao <heming.zhao@suse.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ocfs2: validate inline data i_size during inode read [+ + +]
Author: Deepanshu Kartikey <kartikey406@gmail.com>
Date:   Mon Apr 13 11:35:29 2026 -0400

    ocfs2: validate inline data i_size during inode read
    
    [ Upstream commit 1524af3685b35feac76662cc551cbc37bd14775f ]
    
    When reading an inode from disk, ocfs2_validate_inode_block() performs
    various sanity checks but does not validate the size of inline data.  If
    the filesystem is corrupted, an inode's i_size can exceed the actual
    inline data capacity (id_count).
    
    This causes ocfs2_dir_foreach_blk_id() to iterate beyond the inline data
    buffer, triggering a use-after-free when accessing directory entries from
    freed memory.
    
    In the syzbot report:
      - i_size was 1099511627576 bytes (~1TB)
      - Actual inline data capacity (id_count) is typically <256 bytes
      - A garbage rec_len (54648) caused ctx->pos to jump out of bounds
      - This triggered a UAF in ocfs2_check_dir_entry()
    
    Fix by adding a validation check in ocfs2_validate_inode_block() to ensure
    inodes with inline data have i_size <= id_count.  This catches the
    corruption early during inode read and prevents all downstream code from
    operating on invalid data.
    
    Link: https://lkml.kernel.org/r/20251212052132.16750-1-kartikey406@gmail.com
    Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
    Reported-by: syzbot+c897823f699449cc3eb4@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=c897823f699449cc3eb4
    Tested-by: syzbot+c897823f699449cc3eb4@syzkaller.appspotmail.com
    Link: https://lore.kernel.org/all/20251211115231.3560028-1-kartikey406@gmail.com/T/ [v1]
    Link: https://lore.kernel.org/all/20251212040400.6377-1-kartikey406@gmail.com/T/ [v2]
    Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Junxiao Bi <junxiao.bi@oracle.com>
    Cc: Changwei Ge <gechangwei@live.cn>
    Cc: Jun Piao <piaojun@huawei.com>
    Cc: Heming Zhao <heming.zhao@suse.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Stable-dep-of: 7bc5da4842be ("ocfs2: fix out-of-bounds write in ocfs2_write_end_inline")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
PCI: endpoint: pci-epf-vntb: Remove duplicate resource teardown [+ + +]
Author: Koichiro Den <den@valinux.co.jp>
Date:   Mon Apr 20 10:41:52 2026 -0400

    PCI: endpoint: pci-epf-vntb: Remove duplicate resource teardown
    
    [ Upstream commit 0da63230d3ec1ec5fcc443a2314233e95bfece54 ]
    
    epf_ntb_epc_destroy() duplicates the teardown that the caller is
    supposed to perform later. This leads to an oops when .allow_link fails
    or when .drop_link is performed. The following is an example oops of the
    former case:
    
      Unable to handle kernel paging request at virtual address dead000000000108
      [...]
      [dead000000000108] address between user and kernel address ranges
      Internal error: Oops: 0000000096000044 [#1]  SMP
      [...]
      Call trace:
       pci_epc_remove_epf+0x78/0xe0 (P)
       pci_primary_epc_epf_link+0x88/0xa8
       configfs_symlink+0x1f4/0x5a0
       vfs_symlink+0x134/0x1d8
       do_symlinkat+0x88/0x138
       __arm64_sys_symlinkat+0x74/0xe0
      [...]
    
    Remove the helper, and drop pci_epc_put(). EPC device refcounting is
    tied to the configfs EPC group lifetime, and pci_epc_put() in the
    .drop_link path is sufficient.
    
    Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP")
    Signed-off-by: Koichiro Den <den@valinux.co.jp>
    Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
    Reviewed-by: Frank Li <Frank.Li@nxp.com>
    Cc: stable@vger.kernel.org
    Link: https://patch.msgid.link/20260226084142.2226875-2-den@valinux.co.jp
    [ adjusted context ]
    Signed-off-by: Sasha Levin <sashal@kernel.org>

PCI: endpoint: pci-epf-vntb: Stop cmd_handler work in epf_ntb_epc_cleanup [+ + +]
Author: Koichiro Den <den@valinux.co.jp>
Date:   Mon Apr 20 13:18:01 2026 -0400

    PCI: endpoint: pci-epf-vntb: Stop cmd_handler work in epf_ntb_epc_cleanup
    
    [ Upstream commit d799984233a50abd2667a7d17a9a710a3f10ebe2 ]
    
    Disable the delayed work before clearing BAR mappings and doorbells to
    avoid running the handler after resources have been torn down.
    
      Unable to handle kernel paging request at virtual address ffff800083f46004
      [...]
      Internal error: Oops: 0000000096000007 [#1]  SMP
      [...]
      Call trace:
       epf_ntb_cmd_handler+0x54/0x200 [pci_epf_vntb] (P)
       process_one_work+0x154/0x3b0
       worker_thread+0x2c8/0x400
       kthread+0x148/0x210
       ret_from_fork+0x10/0x20
    
    Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP")
    Signed-off-by: Koichiro Den <den@valinux.co.jp>
    Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
    Reviewed-by: Frank Li <Frank.Li@nxp.com>
    Cc: stable@vger.kernel.org
    Link: https://patch.msgid.link/20260226084142.2226875-4-den@valinux.co.jp
    [ replaced disable_delayed_work_sync() with cancel_delayed_work_sync() ]
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

PCI: hv: Set default NUMA node to 0 for devices without affinity info [+ + +]
Author: Long Li <longli@microsoft.com>
Date:   Mon Mar 16 14:07:42 2026 -0700

    PCI: hv: Set default NUMA node to 0 for devices without affinity info
    
    [ Upstream commit 7b3b1e5a87b2f5e35c52b5386d7c327be869454f ]
    
    When hv_pci_assign_numa_node() processes a device that does not have
    HV_PCI_DEVICE_FLAG_NUMA_AFFINITY set or has an out-of-range
    virtual_numa_node, the device NUMA node is left unset. On x86_64,
    the uninitialized default happens to be 0, but on ARM64 it is
    NUMA_NO_NODE (-1).
    
    Tests show that when no NUMA information is available from the Hyper-V
    host, devices perform best when assigned to node 0. With NUMA_NO_NODE
    the kernel may spread work across NUMA nodes, which degrades
    performance on Hyper-V, particularly for high-throughput devices like
    MANA.
    
    Always set the device NUMA node to 0 before the conditional NUMA
    affinity check, so that devices get a performant default when the host
    provides no NUMA information, and behavior is consistent on both
    x86_64 and ARM64.
    
    Fixes: 999dd956d838 ("PCI: hv: Add support for protocol 1.3 and support PCI_BUS_RELATIONS2")
    Signed-off-by: Long Li <longli@microsoft.com>
    Reviewed-by: Michael Kelley <mhklinux@outlook.com>
    Signed-off-by: Wei Liu <wei.liu@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
perf/x86/intel/uncore: Skip discovery table for offline dies [+ + +]
Author: Zide Chen <zide.chen@intel.com>
Date:   Fri Mar 13 10:40:48 2026 -0700

    perf/x86/intel/uncore: Skip discovery table for offline dies
    
    [ Upstream commit 7b568e9eba2fad89a696f22f0413d44cf4a1f892 ]
    
    This warning can be triggered if NUMA is disabled and the system
    boots with fewer CPUs than the number of CPUs in die 0.
    
    WARNING: CPU: 9 PID: 7257 at uncore.c:1157 uncore_pci_pmu_register+0x136/0x160 [intel_uncore]
    
    Currently, the discovery table continues to be parsed even if all CPUs
    in the associated die are offline.  This can lead to an array overflow
    at "pmu->boxes[die] = box" in uncore_pci_pmu_register(), which may
    trigger the warning above or cause other issues.
    
    Fixes: edae1f06c2cd ("perf/x86/intel/uncore: Parse uncore discovery tables")
    Reported-by: Steve Wahl <steve.wahl@hpe.com>
    Signed-off-by: Zide Chen <zide.chen@intel.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
    Tested-by: Steve Wahl <steve.wahl@hpe.com>
    Link: https://patch.msgid.link/20260313174050.171704-3-zide.chen@intel.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
pinctrl: intel: Fix the revision for new features (1kOhm PD, HW debouncer) [+ + +]
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date:   Wed Mar 11 18:14:04 2026 +0100

    pinctrl: intel: Fix the revision for new features (1kOhm PD, HW debouncer)
    
    [ Upstream commit a4337a24d13e9e3b98a113e71d6b80dc5ed5f8c4 ]
    
    The 1kOhm pull down and hardware debouncer are features of the revision 0.92
    of the Chassis specification. Fix that in the code accordingly.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
platform/x86/amd: pmc: Add Thinkpad L14 Gen3 to quirk_s2idle_bug [+ + +]
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Tue Mar 24 16:16:41 2026 -0500

    platform/x86/amd: pmc: Add Thinkpad L14 Gen3 to quirk_s2idle_bug
    
    [ Upstream commit 1a9452c428a6b76f0b797bae21daa454fccef1a2 ]
    
    This platform is a similar vintage of platforms that had a BIOS bug
    leading to a 10s delay at resume from s0i3.
    
    Add a quirk for it.
    
    Reported-by: Imrane <ihalim.me@gmail.com>
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221273
    Tested-by: Imrane <ihalim.me@gmail.com>
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
    Link: https://patch.msgid.link/20260324211647.357924-1-mario.limonciello@amd.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
RDMA/irdma: Fix double free related to rereg_user_mr [+ + +]
Author: Jacob Moroni <jmoroni@google.com>
Date:   Fri Feb 27 15:27:43 2026 +0000

    RDMA/irdma: Fix double free related to rereg_user_mr
    
    [ Upstream commit 29a3edd7004bb635d299fb9bc6f0ea4ef13ed5a2 ]
    
    If IB_MR_REREG_TRANS is set during rereg_user_mr, the
    umem will be released and a new one will be allocated
    in irdma_rereg_mr_trans. If any step of irdma_rereg_mr_trans
    fails after the new umem is allocated, it releases the umem,
    but does not set iwmr->region to NULL. The problem is that
    this failure is propagated to the user, who will then call
    ibv_dereg_mr (as they should). Then, the dereg_mr path will
    see a non-NULL umem and attempt to call ib_umem_release again.
    
    Fix this by setting iwmr->region to NULL after ib_umem_release.
    
    Fixed: 5ac388db27c4 ("RDMA/irdma: Add support to re-register a memory region")
    Signed-off-by: Jacob Moroni <jmoroni@google.com>
    Link: https://patch.msgid.link/20260227152743.1183388-1-jmoroni@google.com
    Signed-off-by: Leon Romanovsky <leon@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
 
Revert "perf unwind-libdw: Fix invalid reference counts" [+ + +]
Author: Kenta Akagi <k@mgml.me>
Date:   Tue Apr 21 01:32:22 2026 +0900

    Revert "perf unwind-libdw: Fix invalid reference counts"
    
    This reverts commit eddddf4ed7f69697cb54e714e773f764c8d3b67e.
    
    Upstream commit f815fc0c66e7 ("perf unwind-libdw: Fix invalid reference counts"),
    was backported to v6.6.128 as eddddf4ed7f6.
    
    However, this commit depends on map_symbol__exit, which was introduced
    in v6.7 as commit 56e144fe9826 ("perf mem_info: Add and use
    map_symbol__exit and addr_map_symbol__exit") and is absent in v6.6.y.
    This results in a build failure.
    
    This is a revert of a backport, so there is no upstream commit.
    
    Signed-off-by: Kenta Akagi <k@mgml.me>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Revert "wifi: cfg80211: stop NAN and P2P in cfg80211_leave" [+ + +]
Author: Guocai He <guocai.he.cn@windriver.com>
Date:   Tue Apr 14 10:46:34 2026 +0800

    Revert "wifi: cfg80211: stop NAN and P2P in cfg80211_leave"
    
    This reverts commit 4d7a05da767e5cbcf4db511b9289d7ebd380dc56 which is commit
    e1696c8bd0056bc1a5f7766f58ac333adc203e8a upstream.
    
    The reverted patch introduced a deadlock. The locking situation in mainline is
    totally different, so it is incorrect to directly backport the commit from mainline.
    
    Signed-off-by: Guocai He <guocai.he.cn@windriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
rxrpc: Fix anonymous key handling [+ + +]
Author: David Howells <dhowells@redhat.com>
Date:   Mon Apr 13 20:17:56 2026 -0400

    rxrpc: Fix anonymous key handling
    
    [ Upstream commit 6a59d84b4fc2f27f7b40e348506cc686712e260b ]
    
    In rxrpc_new_client_call_for_sendmsg(), a key with no payload is meant to
    be substituted for a NULL key pointer, but the variable this is done with
    is subsequently not used.
    
    Fix this by using "key" rather than "rx->key" when filling in the
    connection parameters.
    
    Note that this only affects direct use of AF_RXRPC; the kAFS filesystem
    doesn't use sendmsg() directly and so bypasses the issue.  Further,
    AF_RXRPC passes a NULL key in if no key is set, so using an anonymous key
    in that manner works.  Since this hasn't been noticed to this point, it
    might be better just to remove the "key" variable and the code that sets it
    - and, arguably, rxrpc_init_client_call_security() would be a better place
    to handle it.
    
    Fixes: 19ffa01c9c45 ("rxrpc: Use structs to hold connection params and protocol info")
    Closes: https://sashiko.dev/#/patchset/20260319150150.4189381-1-dhowells%40redhat.com
    Signed-off-by: David Howells <dhowells@redhat.com>
    cc: Marc Dionne <marc.dionne@auristor.com>
    cc: Jeffrey Altman <jaltman@auristor.com>
    cc: Simon Horman <horms@kernel.org>
    cc: linux-afs@lists.infradead.org
    cc: stable@kernel.org
    Link: https://patch.msgid.link/20260408121252.2249051-4-dhowells@redhat.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

rxrpc: Fix key quota calculation for multitoken keys [+ + +]
Author: David Howells <dhowells@redhat.com>
Date:   Mon Apr 13 18:27:13 2026 -0400

    rxrpc: Fix key quota calculation for multitoken keys
    
    [ Upstream commit bdbfead6d38979475df0c2f4bad2b19394fe9bdc ]
    
    In the rxrpc key preparsing, every token extracted sets the proposed quota
    value, but for multitoken keys, this will overwrite the previous proposed
    quota, losing it.
    
    Fix this by adding to the proposed quota instead.
    
    Fixes: 8a7a3eb4ddbe ("KEYS: RxRPC: Use key preparsing")
    Closes: https://sashiko.dev/#/patchset/20260319150150.4189381-1-dhowells%40redhat.com
    Signed-off-by: David Howells <dhowells@redhat.com>
    cc: Marc Dionne <marc.dionne@auristor.com>
    cc: Jeffrey Altman <jaltman@auristor.com>
    cc: Simon Horman <horms@kernel.org>
    cc: linux-afs@lists.infradead.org
    cc: stable@kernel.org
    Link: https://patch.msgid.link/20260408121252.2249051-2-dhowells@redhat.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    [ dropped hunk for rxrpc_preparse_xdr_yfs_rxgk() ]
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

rxrpc: Fix missing validation of ticket length in non-XDR key preparsing [+ + +]
Author: Anderson Nascimento <anderson@allelesecurity.com>
Date:   Wed Apr 22 17:14:35 2026 +0100

    rxrpc: Fix missing validation of ticket length in non-XDR key preparsing
    
    commit ac33733b10b484d666f97688561670afd5861383 upstream.
    
    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.
    
    Fixes: 8a7a3eb4ddbe ("KEYS: RxRPC: Use key preparsing")
    Fixes: 84924aac08a4 ("rxrpc: Fix checker warning")
    Reported-by: Anderson Nascimento <anderson@allelesecurity.com>
    Signed-off-by: Anderson Nascimento <anderson@allelesecurity.com>
    Signed-off-by: David Howells <dhowells@redhat.com>
    cc: Marc Dionne <marc.dionne@auristor.com>
    cc: Jeffrey Altman <jaltman@auristor.com>
    cc: Simon Horman <horms@kernel.org>
    cc: linux-afs@lists.infradead.org
    cc: stable@kernel.org
    Link: https://patch.msgid.link/20260422161438.2593376-7-dhowells@redhat.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

rxrpc: only handle RESPONSE during service challenge [+ + +]
Author: Wang Jie <jiewang2024@lzu.edu.cn>
Date:   Tue Apr 14 07:25:21 2026 -0400

    rxrpc: only handle RESPONSE during service challenge
    
    [ Upstream commit c43ffdcfdbb5567b1f143556df8a04b4eeea041c ]
    
    Only process RESPONSE packets while the service connection is still in
    RXRPC_CONN_SERVICE_CHALLENGING. Check that state under state_lock before
    running response verification and security initialization, then use a local
    secured flag to decide whether to queue the secured-connection work after
    the state transition. This keeps duplicate or late RESPONSE packets from
    re-running the setup path and removes the unlocked post-transition state
    test.
    
    Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
    Reported-by: Yifan Wu <yifanwucs@gmail.com>
    Reported-by: Juefei Pu <tomapufckgml@gmail.com>
    Co-developed-by: Yuan Tan <yuantan098@gmail.com>
    Signed-off-by: Yuan Tan <yuantan098@gmail.com>
    Suggested-by: Xin Liu <bird@lzu.edu.cn>
    Signed-off-by: Jie Wang <jiewang2024@lzu.edu.cn>
    Signed-off-by: Yang Yang <n05ec@lzu.edu.cn>
    Signed-off-by: David Howells <dhowells@redhat.com>
    cc: Marc Dionne <marc.dionne@auristor.com>
    cc: Jeffrey Altman <jaltman@auristor.com>
    cc: Simon Horman <horms@kernel.org>
    cc: linux-afs@lists.infradead.org
    cc: stable@kernel.org
    Link: https://patch.msgid.link/20260408121252.2249051-21-dhowells@redhat.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    [ adapted spin_lock_irq/spin_unlock_irq calls to spin_lock/spin_unlock ]
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
scripts/dtc: Remove unused dts_version in dtc-lexer.l [+ + +]
Author: Nathan Chancellor <nathan@kernel.org>
Date:   Mon Apr 20 17:36:46 2026 -0700

    scripts/dtc: Remove unused dts_version in dtc-lexer.l
    
    This patch is for stable only. Commit 5a09df20872c ("scripts/dtc: Update
    to upstream version v1.7.2-69-g53373d135579") upstream applied it as
    part of a regular scripts/dtc sync, which may be unsuitable for older
    versions of stable where the warning it fixes is present.
    
    A recent strengthening of -Wunused-but-set-variable (enabled with -Wall)
    in clang under a new subwarning, -Wunused-but-set-global, points out an
    unused static global variable in dtc-lexer.lex.c (compiled from
    dtc-lexer.l):
    
      scripts/dtc/dtc-lexer.lex.c:641:12: warning: variable 'dts_version' set but not used [-Wunused-but-set-global]
        641 | static int dts_version = 1;
            |            ^
    
    Remove it to clear up the warning, as it is truly unused.
    
    Fixes: 658f29a51e98 ("of/flattree: Update dtc to current mainline.")
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
scripts: generate_rust_analyzer.py: avoid FD leak [+ + +]
Author: Tamir Duberstein <tamird@kernel.org>
Date:   Tue Jan 27 11:35:43 2026 -0500

    scripts: generate_rust_analyzer.py: avoid FD leak
    
    commit 9b4744d8eda2824041064a5639ccbb079850914d upstream.
    
    Use `pathlib.Path.read_text()` to avoid leaking file descriptors.
    
    Fixes: 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`")
    Cc: stable@vger.kernel.org
    Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
    Reviewed-by: Fiona Behrens <me@kloenk.dev>
    Reviewed-by: Trevor Gross <tmgross@umich.edu>
    Link: https://patch.msgid.link/20260127-rust-analyzer-fd-leak-v2-1-1bb55b9b6822@kernel.org
    Signed-off-by: Tamir Duberstein <tamird@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

scripts: generate_rust_analyzer.py: define scripts [+ + +]
Author: Tamir Duberstein <tamird@kernel.org>
Date:   Mon Apr 20 12:25:12 2026 -0400

    scripts: generate_rust_analyzer.py: define scripts
    
    [ Upstream commit 36c619f6bd793493294becb10a02fea370b67a91 ]
    
    Add IDE support for host-side scripts written in Rust. This support has
    been missing since these scripts were initially added in commit
    9a8ff24ce584 ("scripts: add `generate_rust_target.rs`"), thus add it.
    
    Change the existing instance of extension stripping to
    `pathlib.Path.stem` to maintain code consistency.
    
    Fixes: 9a8ff24ce584 ("scripts: add `generate_rust_target.rs`")
    Cc: stable@vger.kernel.org
    Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
    Reviewed-by: Fiona Behrens <me@kloenk.dev>
    Reviewed-by: Trevor Gross <tmgross@umich.edu>
    Link: https://patch.msgid.link/20260122-rust-analyzer-scripts-v1-1-ff6ba278170e@kernel.org
    Signed-off-by: Tamir Duberstein <tamird@kernel.org>
    [ changed `[std]` dep to `["std"]` and kept untyped `is_root_crate()` ]
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
selftests: net: bridge_vlan_mcast: wait for h1 before querier check [+ + +]
Author: Daniel Golle <daniel@makrotopia.org>
Date:   Sun Apr 5 22:29:19 2026 +0100

    selftests: net: bridge_vlan_mcast: wait for h1 before querier check
    
    [ Upstream commit efaa71faf212324ecbf6d5339e9717fe53254f58 ]
    
    The querier-interval test adds h1 (currently a slave of the VRF created
    by simple_if_init) to a temporary bridge br1 acting as an outside IGMP
    querier. The kernel VRF driver (drivers/net/vrf.c) calls cycle_netdev()
    on every slave add and remove, toggling the interface admin-down then up.
    Phylink takes the PHY down during the admin-down half of that cycle.
    Since h1 and swp1 are cable-connected, swp1 also loses its link may need
    several seconds to re-negotiate.
    
    Use setup_wait_dev $h1 0 which waits for h1 to return to UP state, so the
    test can rely on the link being back up at this point.
    
    Fixes: 4d8610ee8bd77 ("selftests: net: bridge: add vlan mcast_querier_interval tests")
    Signed-off-by: Daniel Golle <daniel@makrotopia.org>
    Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
    Link: https://patch.msgid.link/c830f130860fd2efae08bfb9e5b25fd028e58ce5.1775424423.git.daniel@makrotopia.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
smb: client: fix off-by-8 bounds check in check_wsl_eas() [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Apr 6 15:49:37 2026 +0200

    smb: client: fix off-by-8 bounds check in check_wsl_eas()
    
    commit 3d8b9d06bd3ac4c6846f5498800b0f5f8062e53b upstream.
    
    The bounds check uses (u8 *)ea + nlen + 1 + vlen as the end of the EA
    name and value, but ea_data sits at offset sizeof(struct
    smb2_file_full_ea_info) = 8 from ea, not at offset 0.  The strncmp()
    later reads ea->ea_data[0..nlen-1] and the value bytes follow at
    ea_data[nlen+1..nlen+vlen], so the actual end is ea->ea_data + nlen + 1
    + vlen.  Isn't pointer math fun?
    
    The earlier check (u8 *)ea > end - sizeof(*ea) only guarantees the
    8-byte header is in bounds, but since the last EA is placed within 8
    bytes of the end of the response, the name and value bytes are read past
    the end of iov.
    
    Fix this mess all up by using ea->ea_data as the base for the bounds
    check.
    
    An "untrusted" server can use this to leak up to 8 bytes of kernel heap
    into the EA name comparison and influence which WSL xattr the data is
    interpreted as.
    
    Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
    Cc: Shyam Prasad N <sprasad@microsoft.com>
    Cc: Tom Talpey <tom@talpey.com>
    Cc: Bharath SM <bharathsm@microsoft.com>
    Cc: linux-cifs@vger.kernel.org
    Cc: samba-technical@lists.samba.org
    Cc: stable <stable@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

smb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path [+ + +]
Author: Michael Bommarito <michael.bommarito@gmail.com>
Date:   Sun Apr 19 19:35:19 2026 -0400

    smb: client: fix OOB read in smb2_ioctl_query_info QUERY_INFO path
    
    commit a58c5af19ff0d6f44f6e9fe31e33a2c92223f77e upstream.
    
    smb2_ioctl_query_info() has two response-copy branches: PASSTHRU_FSCTL
    and the default QUERY_INFO path.  The QUERY_INFO branch clamps
    qi.input_buffer_length to the server-reported OutputBufferLength and then
    copies qi.input_buffer_length bytes from qi_rsp->Buffer to userspace, but
    it never verifies that the flexible-array payload actually fits within
    rsp_iov[1].iov_len.
    
    A malicious server can return OutputBufferLength larger than the actual
    QUERY_INFO response, causing copy_to_user() to walk past the response
    buffer and expose adjacent kernel heap to userspace.
    
    Guard the QUERY_INFO copy with a bounds check on the actual Buffer
    payload.  Use struct_size(qi_rsp, Buffer, qi.input_buffer_length)
    rather than an open-coded addition so the guard cannot overflow on
    32-bit builds.
    
    Fixes: f5778c398713 ("SMB3: Allow SMB3 FSCTL queries to be sent to server from tools")
    Cc: stable@vger.kernel.org
    Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
    Assisted-by: Claude:claude-opus-4-6
    Assisted-by: Codex:gpt-5-4
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

smb: client: require a full NFS mode SID before reading mode bits [+ + +]
Author: Michael Bommarito <michael.bommarito@gmail.com>
Date:   Mon Apr 20 09:50:58 2026 -0400

    smb: client: require a full NFS mode SID before reading mode bits
    
    commit 2757ad3e4b6f9e0fed4c7739594e702abc5cab21 upstream.
    
    parse_dacl() treats an ACE SID matching sid_unix_NFS_mode as an NFS
    mode SID and reads sid.sub_auth[2] to recover the mode bits.
    
    That assumes the ACE carries three subauthorities, but compare_sids()
    only compares min(a, b) subauthorities.  A malicious server can return
    an ACE with num_subauth = 2 and sub_auth[] = {88, 3}, which still
    matches sid_unix_NFS_mode and then drives the sub_auth[2] read four
    bytes past the end of the ACE.
    
    Require num_subauth >= 3 before treating the ACE as an NFS mode SID.
    This keeps the fix local to the special-SID mode path without changing
    compare_sids() semantics for the rest of cifsacl.
    
    Fixes: e2f8fbfb8d09 ("cifs: get mode bits from special sid on stat")
    Cc: stable@vger.kernel.org
    Assisted-by: Claude:claude-opus-4-6
    Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

smb: server: fix active_num_conn leak on transport allocation failure [+ + +]
Author: Michael Bommarito <michael.bommarito@gmail.com>
Date:   Tue Apr 14 18:54:38 2026 -0400

    smb: server: fix active_num_conn leak on transport allocation failure
    
    commit 6551300dc452ac16a855a83dbd1e74899542d3b3 upstream.
    
    Commit 77ffbcac4e56 ("smb: server: fix leak of active_num_conn in
    ksmbd_tcp_new_connection()") addressed the kthread_run() failure
    path.  The earlier alloc_transport() == NULL path in the same
    function has the same leak, is reachable pre-authentication via any
    TCP connect to port 445, and was empirically reproduced on UML
    (ARCH=um, v7.0-rc7): a small number of forced allocation failures
    were sufficient to put ksmbd into a state where every subsequent
    connection attempt was rejected for the remainder of the boot.
    
    ksmbd_kthread_fn() increments active_num_conn before calling
    ksmbd_tcp_new_connection() and discards the return value, so when
    alloc_transport() returns NULL the socket is released and -ENOMEM
    returned without decrementing the counter.  Each such failure
    permanently consumes one slot from the max_connections pool; once
    cumulative failures reach the cap, atomic_inc_return() hits the
    threshold on every subsequent accept and every new connection is
    rejected.  The counter is only reset by module reload.
    
    An unauthenticated remote attacker can drive the server toward the
    memory pressure that makes alloc_transport() fail by holding open
    connections with large RFC1002 lengths up to MAX_STREAM_PROT_LEN
    (0x00FFFFFF); natural transient allocation failures on a loaded
    host produce the same drift more slowly.
    
    Mirror the existing rollback pattern in ksmbd_kthread_fn(): on the
    alloc_transport() failure path, decrement active_num_conn gated on
    server_conf.max_connections.
    
    Repro details: with the patch reverted, forced alloc_transport()
    NULL returns leaked counter slots and subsequent connection
    attempts -- including legitimate connects issued after the
    forced-fail window had closed -- were all rejected with "Limit the
    maximum number of connections".  With this patch applied, the same
    connect sequence produces no rejections and the counter cycles
    cleanly between zero and one on every accept.
    
    Fixes: 0d0d4680db22 ("ksmbd: add max connections parameter")
    Cc: stable@vger.kernel.org
    Assisted-by: Claude:claude-opus-4-6
    Assisted-by: Codex:gpt-5-4
    Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
    Acked-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

smb: server: fix max_connections off-by-one in tcp accept path [+ + +]
Author: DaeMyung Kang <charsyam@gmail.com>
Date:   Fri Apr 17 06:17:35 2026 +0900

    smb: server: fix max_connections off-by-one in tcp accept path
    
    commit ce23158bfe584bd90d1918f279fdf9de57802012 upstream.
    
    The global max_connections check in ksmbd's TCP accept path counts
    the newly accepted connection with atomic_inc_return(), but then
    rejects the connection when the result is greater than or equal to
    server_conf.max_connections.
    
    That makes the effective limit one smaller than configured. For
    example:
    
    - max_connections=1 rejects the first connection
    - max_connections=2 allows only one connection
    
    The per-IP limit in the same function uses <= correctly because it
    counts only pre-existing connections. The global limit instead checks
    the post-increment total, so it should reject only when that total
    exceeds the configured maximum.
    
    Fix this by changing the comparison from >= to >, so exactly
    max_connections simultaneous connections are allowed and the next one
    is rejected. This matches the documented meaning of max_connections
    in fs/smb/server/ksmbd_netlink.h as the "Number of maximum simultaneous
    connections".
    
    Fixes: 0d0d4680db22 ("ksmbd: add max connections parameter")
    Cc: stable@vger.kernel.org
    Signed-off-by: DaeMyung Kang <charsyam@gmail.com>
    Acked-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
soc: aspeed: socinfo: Mask table entries for accurate SoC ID matching [+ + +]
Author: Potin Lai <potin.lai.pt@gmail.com>
Date:   Thu Jan 22 16:37:56 2026 +0800

    soc: aspeed: socinfo: Mask table entries for accurate SoC ID matching
    
    [ Upstream commit 7ec1bd3d9be671d04325b9e06149b8813f6a4836 ]
    
    The siliconid_to_name() function currently masks the input silicon ID
    with 0xff00ffff, but compares it against unmasked table entries. This
    causes matching to fail if the table entries contain non-zero values in
    the bits covered by the mask (bits 16-23).
    
    Update the logic to apply the 0xff00ffff mask to the table entries
    during comparison. This ensures that only the relevant model and
    revision bits are considered, providing a consistent match across
    different manufacturing batches.
    
    [arj: Add Fixes: tag, fix 'soninfo' typo, clarify function reference]
    
    Fixes: e0218dca5787 ("soc: aspeed: Add soc info driver")
    Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
    Link: https://patch.msgid.link/20260122-soc_aspeed_name_fix-v1-1-33a847f2581c@gmail.com
    Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
staging: rtl8723bs: initialize le_tmp64 in rtw_BIP_verify() [+ + +]
Author: Lin YuChen <starpt.official@gmail.com>
Date:   Sat Mar 21 01:25:02 2026 +0800

    staging: rtl8723bs: initialize le_tmp64 in rtw_BIP_verify()
    
    commit 8c964b82a4e97ec7f25e17b803ee196009b38a57 upstream.
    
    Initialize le_tmp64 to zero in rtw_BIP_verify() to prevent using
    uninitialized data.
    
    Smatch warns that only 6 bytes are copied to this 8-byte (u64)
    variable, leaving the last two bytes uninitialized:
    
    drivers/staging/rtl8723bs/core/rtw_security.c:1308 rtw_BIP_verify()
    warn: not copying enough bytes for '&le_tmp64' (8 vs 6 bytes)
    
    Initializing the variable at the start of the function fixes this
    warning and ensures predictable behavior.
    
    Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
    Cc: stable <stable@kernel.org>
    Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
    Closes: https://lore.kernel.org/linux-staging/abvwIQh0CHTp4wNJ@stanley.mountain/
    Signed-off-by: Lin YuChen <starpt.official@gmail.com>
    Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
    Link: https://patch.msgid.link/20260320172502.167332-1-starpt.official@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: sm750fb: fix division by zero in ps_to_hz() [+ + +]
Author: Junrui Luo <moonafterrain@outlook.com>
Date:   Mon Mar 23 15:31:56 2026 +0800

    staging: sm750fb: fix division by zero in ps_to_hz()
    
    commit 75a1621e4f91310673c9acbcbb25c2a7ff821cd3 upstream.
    
    ps_to_hz() is called from hw_sm750_crtc_set_mode() without validating
    that pixclock is non-zero. A zero pixclock passed via FBIOPUT_VSCREENINFO
    causes a division by zero.
    
    Fix by rejecting zero pixclock in lynxfb_ops_check_var(), consistent
    with other framebuffer drivers.
    
    Fixes: 81dee67e215b ("staging: sm750fb: add sm750 to staging")
    Reported-by: Yuhao Jiang <danisjiang@gmail.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
    Link: https://patch.msgid.link/SYBPR01MB7881AFBFCE28CCF528B35D0CAF4BA@SYBPR01MB7881.ausprd01.prod.outlook.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
tracing/probe: reject non-closed empty immediate strings [+ + +]
Author: Pengpeng Hou <pengpeng@iscas.ac.cn>
Date:   Thu Apr 2 00:03:15 2026 +0800

    tracing/probe: reject non-closed empty immediate strings
    
    [ Upstream commit 4346be6577aaa04586167402ae87bbdbe32484a4 ]
    
    parse_probe_arg() accepts quoted immediate strings and passes the body
    after the opening quote to __parse_imm_string(). That helper currently
    computes strlen(str) and immediately dereferences str[len - 1], which
    underflows when the body is empty and not closed with double-quotation.
    
    Reject empty non-closed immediate strings before checking for the closing quote.
    
    Link: https://lore.kernel.org/all/20260401160315.88518-1-pengpeng@iscas.ac.cn/
    
    Fixes: a42e3c4de964 ("tracing/probe: Add immediate string parameter support")
    Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
    Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen [+ + +]
Author: Dave Carey <carvsdriver@gmail.com>
Date:   Thu Apr 2 14:29:50 2026 -0400

    USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen
    
    commit f58752ebcb35e156c85cd1a82d6579c7af3b9023 upstream.
    
    The Lenovo Yoga Book 9 14IAH10 (83KJ) has a composite USB device
    (17EF:6161) that controls both touchscreens via a CDC ACM interface.
    Interface 0 is a standard CDC ACM control interface, but interface 1
    (the data interface) incorrectly declares vendor-specific class (0xFF)
    instead of USB_CLASS_CDC_DATA. cdc-acm rejects the device at probe with
    -EINVAL, leaving interface 0 unbound and EP 0x82 never polled.
    
    With no consumer polling EP 0x82, the firmware's watchdog fires every
    ~20 seconds and resets the USB bus, producing a continuous disconnect/
    reconnect loop that prevents the touchscreens from ever initialising.
    
    Add two new quirk flags:
    
    VENDOR_CLASS_DATA_IFACE: Bypasses the bInterfaceClass check in
    acm_probe() that would otherwise reject the vendor-class data
    interface with -EINVAL.
    
    ALWAYS_POLL_CTRL: Submits the notification URB at probe() rather than
    waiting for a TTY open. This keeps EP 0x82 polled at all times,
    permanently suppressing the firmware watchdog. The URB is resubmitted
    after port_shutdown() and on system resume. SET_CONTROL_LINE_STATE
    (DTR|RTS) is sent at probe and after port_shutdown() to complete
    firmware handshake.
    
    Note: the firmware performs exactly 4 USB connect/disconnect cycles
    (~19 s each) on every cold boot before stabilising. This is a fixed
    firmware property; touch is available ~75-80 s after power-on.
    
    Signed-off-by: Dave Carey <carvsdriver@gmail.com>
    Cc: stable <stable@kernel.org>
    Tested-by: Dave Carey <carvsdriver@gmail.com>
    Acked-by: Oliver Neukum <oneukum@suse.com>
    Link: https://patch.msgid.link/20260402182950.389016-1-carvsdriver@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb() [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Tue Apr 7 11:02:54 2026 +0200

    usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()
    
    commit 8f993d30b95dc9557a8a96ceca11abed674c8acb upstream.
    
    The block_len read from the host-supplied NTB header is checked against
    ntb_max but has no lower bound. When block_len is smaller than
    opts->ndp_size, the bounds check of:
            ndp_index > (block_len - opts->ndp_size)
    will underflow producing a huge unsigned value that ndp_index can never
    exceed, defeating the check entirely.
    
    The same underflow occurs in the datagram index checks against block_len
    - opts->dpe_size.  With those checks neutered, a malicious USB host can
    choose ndp_index and datagram offsets that point past the actual
    transfer, and the skb_put_data() copies adjacent kernel memory into the
    network skb.
    
    Fix this by rejecting block lengths that cannot hold at least the NTB
    header plus one NDP.  This will make block_len - opts->ndp_size and
    block_len - opts->dpe_size both well-defined.
    
    Commit 8d2b1a1ec9f5 ("CDC-NCM: avoid overflow in sanity checking") fixed
    a related class of issues on the host side of NCM.
    
    Fixes: 2b74b0a04d3e ("USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()")
    Cc: stable <stable@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Link: https://patch.msgid.link/2026040753-baffle-handheld-624d@gregkh
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

usb: gadget: f_phonet: fix skb frags[] overflow in pn_rx_complete() [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Tue Apr 7 10:55:05 2026 +0200

    usb: gadget: f_phonet: fix skb frags[] overflow in pn_rx_complete()
    
    commit c088d5dd2fffb4de1fb8e7f57751c8b82942180a upstream.
    
    A broken/bored/mean USB host can overflow the skb_shared_info->frags[]
    array on a Linux gadget exposing a Phonet function by sending an
    unbounded sequence of full-page OUT transfers.
    
    pn_rx_complete() finalizes the skb only when req->actual < req->length,
    where req->length is set to PAGE_SIZE by the gadget.  If the host always
    sends exactly PAGE_SIZE bytes per transfer, fp->rx.skb will never be
    reset and each completion will add another fragment via
    skb_add_rx_frag().  Once nr_frags exceeds MAX_SKB_FRAGS (default 17),
    subsequent frag stores overwrite memory adjacent to the shinfo on the
    heap.
    
    Drop the skb and account a length error when the frag limit is reached,
    matching the fix applied in t7xx by commit f0813bcd2d9d ("net: wwan:
    t7xx: fix potential skb->frags overflow in RX path").
    
    Cc: stable <stable@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Link: https://patch.msgid.link/2026040705-fruit-unloved-0701@gregkh
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

usb: gadget: renesas_usb3: validate endpoint index in standard request handlers [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Apr 6 17:09:48 2026 +0200

    usb: gadget: renesas_usb3: validate endpoint index in standard request handlers
    
    commit f880aac8a57ebd92abfa685d45424b2998ac1059 upstream.
    
    The GET_STATUS and SET/CLEAR_FEATURE handlers extract the endpoint
    number from the host-supplied wIndex without any sort of validation.
    Fix this up by validating the number of endpoints actually match up with
    the number the device has before attempting to dereference a pointer
    based on this math.
    
    This is just like what was done in commit ee0d382feb44 ("usb: gadget:
    aspeed_udc: validate endpoint index for ast udc") for the aspeed driver.
    
    Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller")
    Cc: stable <stable@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Link: https://patch.msgid.link/2026040647-sincerity-untidy-b104@gregkh
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

usb: port: add delay after usb_hub_set_port_power() [+ + +]
Author: Xu Yang <xu.yang_2@nxp.com>
Date:   Mon Mar 16 17:50:42 2026 +0800

    usb: port: add delay after usb_hub_set_port_power()
    
    commit b84cc80610a8ce036deb987f056ce3196ead7f1e upstream.
    
    When a port is disabled, an attached device will be disconnected.  This
    causes a port-status-change event, which will race with hub autosuspend
    (if the disabled port was the only connected port on its hub), causing
    an immediate resume and a second autosuspend.  Both of these can be
    avoided by adding a short delay after the call to
    usb_hub_set_port_power().
    
    Below log shows what is happening:
    
    $ echo 1 > usb1-port1/disable
    [   37.958239] usb 1-1: USB disconnect, device number 2
    [   37.964101] usb 1-1: unregistering device
    [   37.970070] hub 1-0:1.0: hub_suspend
    [   37.971305] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
    [   37.974412] usb usb1: bus auto-suspend, wakeup 1
    [   37.988175] usb usb1: suspend raced with wakeup event         <---
    [   37.993947] usb usb1: usb auto-resume
    [   37.998401] hub 1-0:1.0: hub_resume
    [   38.105688] usb usb1-port1: status 0000, change 0000, 12 Mb/s
    [   38.112399] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000
    [   38.118645] hub 1-0:1.0: hub_suspend
    [   38.122963] usb usb1: bus auto-suspend, wakeup 1
    [   38.200368] usb usb1: usb wakeup-resume
    [   38.204982] usb usb1: usb auto-resume
    [   38.209376] hub 1-0:1.0: hub_resume
    [   38.213676] usb usb1-port1: status 0101 change 0001
    [   38.321552] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
    [   38.327978] usb usb1-port1: status 0101, change 0000, 12 Mb/s
    [   38.457429] usb 1-1: new high-speed USB device number 3 using ci_hdrc
    
    Then, port change bit will be fixed to the final state and
    usb_clear_port_feature() can correctly clear it after this period. This
    will also avoid usb runtime suspend routine to run because
    usb_autopm_put_interface() not run yet.
    
    Fixes: f061f43d7418 ("usb: hub: port: add sysfs entry to switch port power")
    Cc: stable@kernel.org
    Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
    Link: https://patch.msgid.link/20260316095042.1559882-1-xu.yang_2@nxp.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
USB: serial: option: add Telit Cinterion FN990A MBIM composition [+ + +]
Author: Fabio Porcedda <fabio.porcedda@gmail.com>
Date:   Thu Apr 2 11:57:27 2026 +0200

    USB: serial: option: add Telit Cinterion FN990A MBIM composition
    
    commit f8cc59ecc22841be5deb07b549c0c6a2657cd5f9 upstream.
    
    Add the following Telit Cinterion FN990A MBIM composition:
    
    0x1074: MBIM + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (diag) +
            DPL (Data Packet Logging) + adb
    
    T:  Bus=01 Lev=01 Prnt=04 Port=06 Cnt=01 Dev#=  7 Spd=480  MxCh= 0
    D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=1074 Rev=05.04
    S:  Manufacturer=Telit Wireless Solutions
    S:  Product=FN990
    S:  SerialNumber=70628d0c
    C:  #Ifs= 8 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
    E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
    I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
    E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=87(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none)
    E:  Ad=8f(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 7 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
usb: storage: Expand range of matched versions for VL817 quirks entry [+ + +]
Author: Daniel Brát <danek.brat@gmail.com>
Date:   Thu Apr 2 19:24:33 2026 +0200

    usb: storage: Expand range of matched versions for VL817 quirks entry
    
    commit 609865ab3d5d803556f628e221ecd3d06aed9f30 upstream.
    
    Expands range of matched bcdDevice values for the VL817 quirk entry.
    This is based on experience with Axagon EE35-GTR rev1 3.5" HDD
    enclosure, which reports its bcdDevice as 0x0843, but presumably other
    vendors using this IC in their products may set it to any other value.
    
    Signed-off-by: Daniel Brát <danek.brat@gmail.com>
    Cc: stable <stable@kernel.org>
    Link: https://patch.msgid.link/20260402172433.5227-1-danek.brat@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
usbip: validate number_of_packets in usbip_pack_ret_submit() [+ + +]
Author: Nathan Rebello <nathan.c.rebello@gmail.com>
Date:   Thu Apr 2 04:52:59 2026 -0400

    usbip: validate number_of_packets in usbip_pack_ret_submit()
    
    commit 2ab833a16a825373aad2ba7d54b572b277e95b71 upstream.
    
    When a USB/IP client receives a RET_SUBMIT response,
    usbip_pack_ret_submit() unconditionally overwrites
    urb->number_of_packets from the network PDU. This value is
    subsequently used as the loop bound in usbip_recv_iso() and
    usbip_pad_iso() to iterate over urb->iso_frame_desc[], a flexible
    array whose size was fixed at URB allocation time based on the
    *original* number_of_packets from the CMD_SUBMIT.
    
    A malicious USB/IP server can set number_of_packets in the response
    to a value larger than what was originally submitted, causing a heap
    out-of-bounds write when usbip_recv_iso() writes to
    urb->iso_frame_desc[i] beyond the allocated region.
    
    KASAN confirmed this with kernel 7.0.0-rc5:
    
      BUG: KASAN: slab-out-of-bounds in usbip_recv_iso+0x46a/0x640
      Write of size 4 at addr ffff888106351d40 by task vhci_rx/69
    
      The buggy address is located 0 bytes to the right of
       allocated 320-byte region [ffff888106351c00, ffff888106351d40)
    
    The server side (stub_rx.c) and gadget side (vudc_rx.c) already
    validate number_of_packets in the CMD_SUBMIT path since commits
    c6688ef9f297 ("usbip: fix stub_rx: harden CMD_SUBMIT path to handle
    malicious input") and b78d830f0049 ("usbip: fix vudc_rx: harden
    CMD_SUBMIT path to handle malicious input"). The server side validates
    against USBIP_MAX_ISO_PACKETS because no URB exists yet at that point.
    On the client side we have the original URB, so we can use the tighter
    bound: the response must not exceed the original number_of_packets.
    
    This mirrors the existing validation of actual_length against
    transfer_buffer_length in usbip_recv_xbuff(), which checks the
    response value against the original allocation size.
    
    Kelvin Mbogo's series ("usb: usbip: fix integer overflow in
    usbip_recv_iso()", v2) hardens the receive-side functions themselves;
    this patch complements that work by catching the bad value at its
    source -- in usbip_pack_ret_submit() before the overwrite -- and
    using the tighter per-URB allocation bound rather than the global
    USBIP_MAX_ISO_PACKETS limit.
    
    Fix this by checking rpdu->number_of_packets against
    urb->number_of_packets in usbip_pack_ret_submit() before the
    overwrite. On violation, clamp to zero so that usbip_recv_iso() and
    usbip_pad_iso() safely return early.
    
    Fixes: 1325f85fa49f ("staging: usbip: bugfix add number of packets for isochronous frames")
    Cc: stable <stable@kernel.org>
    Acked-by: Shuah Khan <skhan@linuxfoundation.org>
    Signed-off-by: Nathan Rebello <nathan.c.rebello@gmail.com>
    Link: https://patch.msgid.link/20260402085259.234-1-nathan.c.rebello@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
wifi: brcmfmac: validate bsscfg indices in IF events [+ + +]
Author: Pengpeng Hou <pengpeng@iscas.ac.cn>
Date:   Mon Mar 23 15:45:51 2026 +0800

    wifi: brcmfmac: validate bsscfg indices in IF events
    
    [ Upstream commit 304950a467d83678bd0b0f46331882e2ac23b12d ]
    
    brcmf_fweh_handle_if_event() validates the firmware-provided interface
    index before it touches drvr->iflist[], but it still uses the raw
    bsscfgidx field as an array index without a matching range check.
    
    Reject IF events whose bsscfg index does not fit in drvr->iflist[]
    before indexing the interface array.
    
    Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
    Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
    Link: https://patch.msgid.link/20260323074551.93530-1-pengpeng@iscas.ac.cn
    [add missing wifi prefix]
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

wifi: mac80211: always free skb on ieee80211_tx_prepare_skb() failure [+ + +]
Author: Felix Fietkau <nbd@nbd.name>
Date:   Tue Apr 21 10:43:09 2026 +0800

    wifi: mac80211: always free skb on ieee80211_tx_prepare_skb() failure
    
    [ Upstream commit d5ad6ab61cbd89afdb60881f6274f74328af3ee9 ]
    
    ieee80211_tx_prepare_skb() has three error paths, but only two of them
    free the skb. The first error path (ieee80211_tx_prepare() returning
    TX_DROP) does not free it, while invoke_tx_handlers() failure and the
    fragmentation check both do.
    
    Add kfree_skb() to the first error path so all three are consistent,
    and remove the now-redundant frees in callers (ath9k, mt76,
    mac80211_hwsim) to avoid double-free.
    
    Document the skb ownership guarantee in the function's kdoc.
    
    Signed-off-by: Felix Fietkau <nbd@nbd.name>
    Link: https://patch.msgid.link/20260314065455.2462900-1-nbd@nbd.name
    Fixes: 06be6b149f7e ("mac80211: add ieee80211_tx_prepare_skb() helper function")
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    [ Exclude changes to drivers/net/wireless/mediatek/mt76/scan.c as this file is first
     introduced by commit 31083e38548f("wifi: mt76: add code for emulating hardware scanning")
     after linux-6.14.]
    Signed-off-by: Li hongliang <1468888505@139.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

wifi: rtw88: fix device leak on probe failure [+ + +]
Author: Johan Hovold <johan@kernel.org>
Date:   Fri Mar 6 09:51:44 2026 +0100

    wifi: rtw88: fix device leak on probe failure
    
    commit bbb15e71156cd9f5e1869eee7207a06ea8e96c39 upstream.
    
    Driver core holds a reference to the USB interface and its parent USB
    device while the interface is bound to a driver and there is no need to
    take additional references unless the structures are needed after
    disconnect.
    
    This driver takes a reference to the USB device during probe but does
    not to release it on all probe errors (e.g. when descriptor parsing
    fails).
    
    Drop the redundant device reference to fix the leak, reduce cargo
    culting, make it easier to spot drivers where an extra reference is
    needed, and reduce the risk of further memory leaks.
    
    Fixes: a82dfd33d123 ("wifi: rtw88: Add common USB chip support")
    Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/netdev/2026022319-turbofan-darkened-206d@gregkh/
    Cc: stable@vger.kernel.org      # 6.2
    Cc: Sascha Hauer <s.hauer@pengutronix.de>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20260306085144.12064-19-johan@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

wifi: wl1251: validate packet IDs before indexing tx_frames [+ + +]
Author: Pengpeng Hou <pengpeng@iscas.ac.cn>
Date:   Mon Mar 23 16:08:45 2026 +0800

    wifi: wl1251: validate packet IDs before indexing tx_frames
    
    [ Upstream commit 0fd56fad9c56356e7fa7a7c52e7ecbf807a44eb0 ]
    
    wl1251_tx_packet_cb() uses the firmware completion ID directly to index
    the fixed 16-entry wl->tx_frames[] array. The ID is a raw u8 from the
    completion block, and the callback does not currently verify that it
    fits the array before dereferencing it.
    
    Reject completion IDs that fall outside wl->tx_frames[] and keep the
    existing NULL check in the same guard. This keeps the fix local to the
    trust boundary and avoids touching the rest of the completion flow.
    
    Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
    Link: https://patch.msgid.link/20260323080845.40033-1-pengpeng@iscas.ac.cn
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
xfrm: Wait for RCU readers during policy netns exit [+ + +]
Author: Steffen Klassert <steffen.klassert@secunet.com>
Date:   Thu Apr 2 13:31:04 2026 +0200

    xfrm: Wait for RCU readers during policy netns exit
    
    [ Upstream commit 069daad4f2ae9c5c108131995529d5f02392c446 ]
    
    xfrm_policy_fini() frees the policy_bydst hash tables after flushing the
    policy work items and deleting all policies, but it does not wait for
    concurrent RCU readers to leave their read-side critical sections first.
    
    The policy_bydst tables are published via rcu_assign_pointer() and are
    looked up through rcu_dereference_check(), so netns teardown must also
    wait for an RCU grace period before freeing the table memory.
    
    Fix this by adding synchronize_rcu() before freeing the policy hash tables.
    
    Fixes: e1e551bc5630 ("xfrm: policy: prepare policy_bydst hash for rcu lookups")
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Reviewed-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
xfrm_user: fix info leak in build_mapping() [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Apr 6 17:33:03 2026 +0200

    xfrm_user: fix info leak in build_mapping()
    
    [ Upstream commit 1beb76b2053b68c491b78370794b8ff63c8f8c02 ]
    
    struct xfrm_usersa_id has a one-byte padding hole after the proto
    field, which ends up never getting set to zero before copying out to
    userspace.  Fix that up by zeroing out the whole structure before
    setting individual variables.
    
    Fixes: 3a2dfbe8acb1 ("xfrm: Notify changes in UDP encapsulation via netlink")
    Cc: Steffen Klassert <steffen.klassert@secunet.com>
    Cc: Herbert Xu <herbert@gondor.apana.org.au>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Jakub Kicinski <kuba@kernel.org>
    Cc: Paolo Abeni <pabeni@redhat.com>
    Cc: Simon Horman <horms@kernel.org>
    Assisted-by: gregkh_clanker_t1000
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
xsk: fix XDP_UMEM_SG_FLAG issues [+ + +]
Author: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Date:   Thu Apr 2 17:49:53 2026 +0200

    xsk: fix XDP_UMEM_SG_FLAG issues
    
    [ Upstream commit 93e84fe45b752d17a5a46b306ed78f0133bbc719 ]
    
    Currently xp_assign_dev_shared() is missing XDP_USE_SG being propagated
    to flags so set it in order to preserve mtu check that is supposed to be
    done only when no multi-buffer setup is in picture.
    
    Also, this flag has the same value as XDP_UMEM_TX_SW_CSUM so we could
    get unexpected SG setups for software Tx checksums. Since csum flag is
    UAPI, modify value of XDP_UMEM_SG_FLAG.
    
    Fixes: d609f3d228a8 ("xsk: add multi-buffer support for sockets sharing umem")
    Reviewed-by: Björn Töpel <bjorn@kernel.org>
    Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
    Link: https://patch.msgid.link/20260402154958.562179-4-maciej.fijalkowski@intel.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

xsk: respect tailroom for ZC setups [+ + +]
Author: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Date:   Thu Apr 2 17:49:52 2026 +0200

    xsk: respect tailroom for ZC setups
    
    [ Upstream commit 1ee1605138fc94cc8f8f273321dd2471c64977f9 ]
    
    Multi-buffer XDP stores information about frags in skb_shared_info that
    sits at the tailroom of a packet. The storage space is reserved via
    xdp_data_hard_end():
    
            ((xdp)->data_hard_start + (xdp)->frame_sz -     \
             SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
    
    and then we refer to it via macro below:
    
    static inline struct skb_shared_info *
    xdp_get_shared_info_from_buff(const struct xdp_buff *xdp)
    {
            return (struct skb_shared_info *)xdp_data_hard_end(xdp);
    }
    
    Currently we do not respect this tailroom space in multi-buffer AF_XDP
    ZC scenario. To address this, introduce xsk_pool_get_tailroom() and use
    it within xsk_pool_get_rx_frame_size() which is used in ZC drivers to
    configure length of HW Rx buffer.
    
    Typically drivers on Rx Hw buffers side work on 128 byte alignment so
    let us align the value returned by xsk_pool_get_rx_frame_size() in order
    to avoid addressing this on driver's side. This addresses the fact that
    idpf uses mentioned function *before* pool->dev being set so we were at
    risk that after subtracting tailroom we would not provide 128-byte
    aligned value to HW.
    
    Since xsk_pool_get_rx_frame_size() is actively used in xsk_rcv_check()
    and __xsk_rcv(), add a variant of this routine that will not include 128
    byte alignment and therefore old behavior is preserved.
    
    Reviewed-by: Björn Töpel <bjorn@kernel.org>
    Acked-by: Stanislav Fomichev <sdf@fomichev.me>
    Fixes: 24ea50127ecf ("xsk: support mbuf on ZC RX")
    Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
    Link: https://patch.msgid.link/20260402154958.562179-3-maciej.fijalkowski@intel.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

xsk: tighten UMEM headroom validation to account for tailroom and min frame [+ + +]
Author: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Date:   Thu Apr 2 17:49:51 2026 +0200

    xsk: tighten UMEM headroom validation to account for tailroom and min frame
    
    [ Upstream commit a315e022a72d95ef5f1d4e58e903cb492b0ad931 ]
    
    The current headroom validation in xdp_umem_reg() could leave us with
    insufficient space dedicated to even receive minimum-sized ethernet
    frame. Furthermore if multi-buffer would come to play then
    skb_shared_info stored at the end of XSK frame would be corrupted.
    
    HW typically works with 128-aligned sizes so let us provide this value
    as bare minimum.
    
    Multi-buffer setting is known later in the configuration process so
    besides accounting for 128 bytes, let us also take care of tailroom space
    upfront.
    
    Reviewed-by: Björn Töpel <bjorn@kernel.org>
    Acked-by: Stanislav Fomichev <sdf@fomichev.me>
    Fixes: 99e3a236dd43 ("xsk: Add missing check on user supplied headroom size")
    Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
    Link: https://patch.msgid.link/20260402154958.562179-2-maciej.fijalkowski@intel.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

xsk: validate MTU against usable frame size on bind [+ + +]
Author: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Date:   Thu Apr 2 17:49:54 2026 +0200

    xsk: validate MTU against usable frame size on bind
    
    [ Upstream commit 36ee60b569ba0dfb6f961333b90d19ab5b323fa9 ]
    
    AF_XDP bind currently accepts zero-copy pool configurations without
    verifying that the device MTU fits into the usable frame space provided
    by the UMEM chunk.
    
    This becomes a problem since we started to respect tailroom which is
    subtracted from chunk_size (among with headroom). 2k chunk size might
    not provide enough space for standard 1500 MTU, so let us catch such
    settings at bind time. Furthermore, validate whether underlying HW will
    be able to satisfy configured MTU wrt XSK's frame size multiplied by
    supported Rx buffer chain length (that is exposed via
    net_device::xdp_zc_max_segs).
    
    Fixes: 24ea50127ecf ("xsk: support mbuf on ZC RX")
    Reviewed-by: Björn Töpel <bjorn@kernel.org>
    Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
    Link: https://patch.msgid.link/20260402154958.562179-5-maciej.fijalkowski@intel.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>