--- /dev/null
+From 85fa3512048793076eef658f66489112dcc91993 Mon Sep 17 00:00:00 2001
+From: Shuvam Pandey <shuvampandey1@gmail.com>
+Date: Thu, 9 Apr 2026 00:32:30 +0545
+Subject: Bluetooth: hci_event: fix potential UAF in SSP passkey handlers
+
+From: Shuvam Pandey <shuvampandey1@gmail.com>
+
+commit 85fa3512048793076eef658f66489112dcc91993 upstream.
+
+hci_conn lookup and field access must be covered by hdev lock in
+hci_user_passkey_notify_evt() and hci_keypress_notify_evt(), otherwise
+the connection can be freed concurrently.
+
+Extend the hci_dev_lock critical section to cover all conn usage in both
+handlers.
+
+Keep the existing keypress notification behavior unchanged by routing
+the early exits through a common unlock path.
+
+Fixes: 92a25256f142 ("Bluetooth: mgmt: Implement support for passkey notification")
+Cc: stable@vger.kernel.org
+Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/bluetooth/hci_event.c | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+--- a/net/bluetooth/hci_event.c
++++ b/net/bluetooth/hci_event.c
+@@ -5409,9 +5409,11 @@ static void hci_user_passkey_notify_evt(
+
+ bt_dev_dbg(hdev, "");
+
++ hci_dev_lock(hdev);
++
+ conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr);
+ if (!conn)
+- return;
++ goto unlock;
+
+ conn->passkey_notify = __le32_to_cpu(ev->passkey);
+ conn->passkey_entered = 0;
+@@ -5420,6 +5422,9 @@ static void hci_user_passkey_notify_evt(
+ mgmt_user_passkey_notify(hdev, &conn->dst, conn->type,
+ conn->dst_type, conn->passkey_notify,
+ conn->passkey_entered);
++
++unlock:
++ hci_dev_unlock(hdev);
+ }
+
+ static void hci_keypress_notify_evt(struct hci_dev *hdev, void *data,
+@@ -5430,14 +5435,16 @@ static void hci_keypress_notify_evt(stru
+
+ bt_dev_dbg(hdev, "");
+
++ hci_dev_lock(hdev);
++
+ conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr);
+ if (!conn)
+- return;
++ goto unlock;
+
+ switch (ev->type) {
+ case HCI_KEYPRESS_STARTED:
+ conn->passkey_entered = 0;
+- return;
++ goto unlock;
+
+ case HCI_KEYPRESS_ENTERED:
+ conn->passkey_entered++;
+@@ -5452,13 +5459,16 @@ static void hci_keypress_notify_evt(stru
+ break;
+
+ case HCI_KEYPRESS_COMPLETED:
+- return;
++ goto unlock;
+ }
+
+ if (hci_dev_test_flag(hdev, HCI_MGMT))
+ mgmt_user_passkey_notify(hdev, &conn->dst, conn->type,
+ conn->dst_type, conn->passkey_notify,
+ conn->passkey_entered);
++
++unlock:
++ hci_dev_unlock(hdev);
+ }
+
+ static void hci_simple_pair_complete_evt(struct hci_dev *hdev, void *data,
--- /dev/null
+From fed4626501c871890da287bec62a96e52da1af89 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Fri, 27 Mar 2026 11:45:20 +0100
+Subject: can: ucan: fix devres lifetime
+
+From: Johan Hovold <johan@kernel.org>
+
+commit fed4626501c871890da287bec62a96e52da1af89 upstream.
+
+USB drivers bind to USB interfaces and any device managed resources
+should have their lifetime tied to the interface rather than parent USB
+device. This avoids issues like memory leaks when drivers are unbound
+without their devices being physically disconnected (e.g. on probe
+deferral or configuration changes).
+
+Fix the control message buffer lifetime so that it is released on driver
+unbind.
+
+Fixes: 9f2d3eae88d2 ("can: ucan: add driver for Theobroma Systems UCAN devices")
+Cc: stable@vger.kernel.org # 4.19
+Cc: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Link: https://patch.msgid.link/20260327104520.1310158-1-johan@kernel.org
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/can/usb/ucan.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/can/usb/ucan.c
++++ b/drivers/net/can/usb/ucan.c
+@@ -1399,7 +1399,7 @@ static int ucan_probe(struct usb_interfa
+ */
+
+ /* Prepare Memory for control transfers */
+- ctl_msg_buffer = devm_kzalloc(&udev->dev,
++ ctl_msg_buffer = devm_kzalloc(&intf->dev,
+ sizeof(union ucan_ctl_payload),
+ GFP_KERNEL);
+ if (!ctl_msg_buffer) {
--- /dev/null
+From f8f08d7cc43237e91e3aedf7b67d015d24c38fcc Mon Sep 17 00:00:00 2001
+From: Eric Biggers <ebiggers@kernel.org>
+Date: Wed, 18 Feb 2026 13:34:49 -0800
+Subject: crypto: arm64/aes - Fix 32-bit aes_mac_update() arg treated as 64-bit
+
+From: Eric Biggers <ebiggers@kernel.org>
+
+commit f8f08d7cc43237e91e3aedf7b67d015d24c38fcc upstream.
+
+Since the 'enc_after' argument to neon_aes_mac_update() and
+ce_aes_mac_update() has type 'int', it needs to be accessed using the
+corresponding 32-bit register, not the 64-bit register. The upper half
+of the corresponding 64-bit register may contain garbage.
+
+Fixes: 4860620da7e5 ("crypto: arm64/aes - add NEON/Crypto Extensions CBCMAC/CMAC/XCBC driver")
+Cc: stable@vger.kernel.org
+Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
+Link: https://lore.kernel.org/r/20260218213501.136844-4-ebiggers@kernel.org
+Signed-off-by: Eric Biggers <ebiggers@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/crypto/aes-modes.S | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/crypto/aes-modes.S
++++ b/arch/arm64/crypto/aes-modes.S
+@@ -838,7 +838,7 @@ AES_FUNC_START(aes_mac_update)
+ encrypt_block v0, w2, x1, x7, w8
+ eor v0.16b, v0.16b, v4.16b
+ cmp w3, wzr
+- csinv x5, x6, xzr, eq
++ csinv w5, w6, wzr, eq
+ cbz w5, .Lmacout
+ encrypt_block v0, w2, x1, x7, w8
+ st1 {v0.16b}, [x4] /* return dg */
+@@ -852,7 +852,7 @@ AES_FUNC_START(aes_mac_update)
+ eor v0.16b, v0.16b, v1.16b /* ..and xor with dg */
+
+ subs w3, w3, #1
+- csinv x5, x6, xzr, eq
++ csinv w5, w6, wzr, eq
+ cbz w5, .Lmacout
+
+ .Lmacenc:
--- /dev/null
+From 3fcfff4ed35f963380a68741bcd52742baff7f76 Mon Sep 17 00:00:00 2001
+From: Thorsten Blum <thorsten.blum@linux.dev>
+Date: Wed, 11 Mar 2026 03:07:35 +0100
+Subject: crypto: atmel-aes - Fix 3-page memory leak in atmel_aes_buff_cleanup
+
+From: Thorsten Blum <thorsten.blum@linux.dev>
+
+commit 3fcfff4ed35f963380a68741bcd52742baff7f76 upstream.
+
+atmel_aes_buff_init() allocates 4 pages using __get_free_pages() with
+ATMEL_AES_BUFFER_ORDER, but atmel_aes_buff_cleanup() frees only the
+first page using free_page(), leaking the remaining 3 pages. Use
+free_pages() with ATMEL_AES_BUFFER_ORDER to fix the memory leak.
+
+Fixes: bbe628ed897d ("crypto: atmel-aes - improve performances of data transfer")
+Cc: stable@vger.kernel.org
+Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/crypto/atmel-aes.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/crypto/atmel-aes.c
++++ b/drivers/crypto/atmel-aes.c
+@@ -2323,7 +2323,7 @@ static int atmel_aes_buff_init(struct at
+
+ static void atmel_aes_buff_cleanup(struct atmel_aes_dev *dd)
+ {
+- free_page((unsigned long)dd->buf);
++ free_pages((unsigned long)dd->buf, ATMEL_AES_BUFFER_ORDER);
+ }
+
+ static int atmel_aes_dma_init(struct atmel_aes_dev *dd)
--- /dev/null
+From 095d50008d55d13f8fcf1bbeb7c6eba51779bc85 Mon Sep 17 00:00:00 2001
+From: Thorsten Blum <thorsten.blum@linux.dev>
+Date: Fri, 20 Feb 2026 15:03:13 +0100
+Subject: crypto: atmel-ecc - Release client on allocation failure
+
+From: Thorsten Blum <thorsten.blum@linux.dev>
+
+commit 095d50008d55d13f8fcf1bbeb7c6eba51779bc85 upstream.
+
+Call atmel_ecc_i2c_client_free() to release the I2C client reserved by
+atmel_ecc_i2c_client_alloc() when crypto_alloc_kpp() fails. Otherwise
+->tfm_count will be out of sync.
+
+Fixes: 11105693fa05 ("crypto: atmel-ecc - introduce Microchip / Atmel ECC driver")
+Cc: stable@vger.kernel.org
+Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/crypto/atmel-ecc.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/crypto/atmel-ecc.c
++++ b/drivers/crypto/atmel-ecc.c
+@@ -261,6 +261,7 @@ static int atmel_ecdh_init_tfm(struct cr
+ if (IS_ERR(fallback)) {
+ dev_err(&ctx->client->dev, "Failed to allocate transformation for '%s': %ld\n",
+ alg, PTR_ERR(fallback));
++ atmel_ecc_i2c_client_free(ctx->client);
+ return PTR_ERR(fallback);
+ }
+
--- /dev/null
+From bab1adf3b87e4bfac92c4f5963c63db434d561c1 Mon Sep 17 00:00:00 2001
+From: Thorsten Blum <thorsten.blum@linux.dev>
+Date: Sat, 14 Mar 2026 20:36:29 +0100
+Subject: crypto: atmel-sha204a - Fix potential UAF and memory leak in remove path
+
+From: Thorsten Blum <thorsten.blum@linux.dev>
+
+commit bab1adf3b87e4bfac92c4f5963c63db434d561c1 upstream.
+
+Unregister the hwrng to prevent new ->read() calls and flush the Atmel
+I2C workqueue before teardown to prevent a potential UAF if a queued
+callback runs while the device is being removed.
+
+Drop the early return to ensure sysfs entries are removed and
+->hwrng.priv is freed, preventing a memory leak.
+
+Fixes: da001fb651b0 ("crypto: atmel-i2c - add support for SHA204A random number generator")
+Cc: stable@vger.kernel.org
+Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/crypto/atmel-sha204a.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/crypto/atmel-sha204a.c
++++ b/drivers/crypto/atmel-sha204a.c
+@@ -125,10 +125,8 @@ static void atmel_sha204a_remove(struct
+ {
+ struct atmel_i2c_client_priv *i2c_priv = i2c_get_clientdata(client);
+
+- if (atomic_read(&i2c_priv->tfm_count)) {
+- dev_emerg(&client->dev, "Device is busy, will remove it anyhow\n");
+- return;
+- }
++ devm_hwrng_unregister(&client->dev, &i2c_priv->hwrng);
++ atmel_i2c_flush_queue();
+
+ kfree((void *)i2c_priv->hwrng.priv);
+ }
--- /dev/null
+From c8a9a647532f5c2a04180352693215e24e9dba03 Mon Sep 17 00:00:00 2001
+From: Thorsten Blum <thorsten.blum@linux.dev>
+Date: Sat, 7 Mar 2026 16:31:10 +0100
+Subject: crypto: atmel-tdes - fix DMA sync direction
+
+From: Thorsten Blum <thorsten.blum@linux.dev>
+
+commit c8a9a647532f5c2a04180352693215e24e9dba03 upstream.
+
+Before DMA output is consumed by the CPU, ->dma_addr_out must be synced
+with dma_sync_single_for_cpu() instead of dma_sync_single_for_device().
+Using the wrong direction can return stale cache data on non-coherent
+platforms.
+
+Fixes: 13802005d8f2 ("crypto: atmel - add Atmel DES/TDES driver")
+Fixes: 1f858040c2f7 ("crypto: atmel-tdes - add support for latest release of the IP (0x700)")
+Cc: stable@vger.kernel.org
+Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/crypto/atmel-tdes.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/crypto/atmel-tdes.c
++++ b/drivers/crypto/atmel-tdes.c
+@@ -304,8 +304,8 @@ static int atmel_tdes_crypt_pdc_stop(str
+ dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE);
+ dma_unmap_sg(dd->dev, dd->in_sg, 1, DMA_TO_DEVICE);
+ } else {
+- dma_sync_single_for_device(dd->dev, dd->dma_addr_out,
+- dd->dma_size, DMA_FROM_DEVICE);
++ dma_sync_single_for_cpu(dd->dev, dd->dma_addr_out,
++ dd->dma_size, DMA_FROM_DEVICE);
+
+ /* copy data */
+ count = atmel_tdes_sg_copy(&dd->out_sg, &dd->out_offset,
+@@ -655,8 +655,8 @@ static int atmel_tdes_crypt_dma_stop(str
+ dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE);
+ dma_unmap_sg(dd->dev, dd->in_sg, 1, DMA_TO_DEVICE);
+ } else {
+- dma_sync_single_for_device(dd->dev, dd->dma_addr_out,
+- dd->dma_size, DMA_FROM_DEVICE);
++ dma_sync_single_for_cpu(dd->dev, dd->dma_addr_out,
++ dd->dma_size, DMA_FROM_DEVICE);
+
+ /* copy data */
+ count = atmel_tdes_sg_copy(&dd->out_sg, &dd->out_offset,
--- /dev/null
+From 02c64052fad03699b9c6d1df2f9b444d17e4ac50 Mon Sep 17 00:00:00 2001
+From: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
+Date: Mon, 30 Mar 2026 11:34:02 +0800
+Subject: crypto: ccree - fix a memory leak in cc_mac_digest()
+
+From: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
+
+commit 02c64052fad03699b9c6d1df2f9b444d17e4ac50 upstream.
+
+Add cc_unmap_result() if cc_map_hash_request_final()
+fails to prevent potential memory leak.
+
+Fixes: 63893811b0fc ("crypto: ccree - add ahash support")
+Cc: stable@vger.kernel.org
+Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/crypto/ccree/cc_hash.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/crypto/ccree/cc_hash.c
++++ b/drivers/crypto/ccree/cc_hash.c
+@@ -1448,6 +1448,7 @@ static int cc_mac_digest(struct ahash_re
+ if (cc_map_hash_request_final(ctx->drvdata, state, req->src,
+ req->nbytes, 1, flags)) {
+ dev_err(dev, "map_ahash_request_final() failed\n");
++ cc_unmap_result(dev, state, digestsize, req->result);
+ cc_unmap_req(dev, state, ctx);
+ return -ENOMEM;
+ }
--- /dev/null
+From 1ee57ab93b75eb59f426aef37b5498a7ffc28278 Mon Sep 17 00:00:00 2001
+From: Thomas Fourier <fourier.thomas@gmail.com>
+Date: Mon, 30 Mar 2026 17:19:32 +0200
+Subject: crypto: hisilicon - Fix dma_unmap_single() direction
+
+From: Thomas Fourier <fourier.thomas@gmail.com>
+
+commit 1ee57ab93b75eb59f426aef37b5498a7ffc28278 upstream.
+
+The direction used to map the buffer skreq->iv is DMA_TO_DEVICE but it is
+unmapped with direction DMA_BIDIRECTIONAL in the error path.
+
+Change the unmap to match the mapping.
+
+Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
+Reviewed-by: Thorsten Blum <thorsten.blum@linux.dev>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/crypto/hisilicon/sec/sec_algs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/crypto/hisilicon/sec/sec_algs.c
++++ b/drivers/crypto/hisilicon/sec/sec_algs.c
+@@ -844,7 +844,7 @@ err_free_elements:
+ if (crypto_skcipher_ivsize(atfm))
+ dma_unmap_single(info->dev, sec_req->dma_iv,
+ crypto_skcipher_ivsize(atfm),
+- DMA_BIDIRECTIONAL);
++ DMA_TO_DEVICE);
+ err_unmap_out_sg:
+ if (split)
+ sec_unmap_sg_on_err(skreq->dst, steps, splits_out,
--- /dev/null
+From 4c788c6f921b22f9b6c3f316c4a071c05683e7de Mon Sep 17 00:00:00 2001
+From: Junrui Luo <moonafterrain@outlook.com>
+Date: Sun, 1 Mar 2026 21:10:58 +0800
+Subject: dm mirror: fix integer overflow in create_dirty_log()
+
+From: Junrui Luo <moonafterrain@outlook.com>
+
+commit 4c788c6f921b22f9b6c3f316c4a071c05683e7de upstream.
+
+The argument count calculation in create_dirty_log() performs
+`*args_used = 2 + param_count` before validating against argc. When a
+user provides a param_count close to UINT_MAX via the device mapper
+table string, this unsigned addition wraps around to a small value,
+causing the subsequent `argc < *args_used` check to be bypassed.
+
+The overflowed param_count is then passed as argc to dm_dirty_log_create(),
+where it can cause out-of-bounds reads on the argv array.
+
+Fix by comparing param_count against argc - 2 before performing the
+addition, following the same pattern used by parse_features() in the
+same file. Since argc >= 2 is already guaranteed, the subtraction is
+safe.
+
+Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
+Cc: stable@vger.kernel.org
+Reported-by: Yuhao Jiang <danisjiang@gmail.com>
+Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
+Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
+Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/md/dm-raid1.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/md/dm-raid1.c
++++ b/drivers/md/dm-raid1.c
+@@ -993,13 +993,13 @@ static struct dm_dirty_log *create_dirty
+ return NULL;
+ }
+
+- *args_used = 2 + param_count;
+-
+- if (argc < *args_used) {
++ if (param_count > argc - 2) {
+ ti->error = "Insufficient mirror log arguments";
+ return NULL;
+ }
+
++ *args_used = 2 + param_count;
++
+ dl = dm_dirty_log_create(argv[0], ti, mirror_flush, param_count,
+ argv + 2);
+ if (!dl) {
--- /dev/null
+From eceafc31ea7b42c984ece10d79d505c0bb6615d5 Mon Sep 17 00:00:00 2001
+From: Deepanshu Kartikey <kartikey406@gmail.com>
+Date: Sat, 28 Mar 2026 20:30:38 +0530
+Subject: ext4: fix bounds check in check_xattrs() to prevent out-of-bounds access
+
+From: Deepanshu Kartikey <kartikey406@gmail.com>
+
+commit eceafc31ea7b42c984ece10d79d505c0bb6615d5 upstream.
+
+The bounds check for the next xattr entry in check_xattrs() uses
+(void *)next >= end, which allows next to point within sizeof(u32)
+bytes of end. On the next loop iteration, IS_LAST_ENTRY() reads 4
+bytes via *(__u32 *)(entry), which can overrun the valid xattr region.
+
+For example, if next lands at end - 1, the check passes since
+next < end, but IS_LAST_ENTRY() reads 4 bytes starting at end - 1,
+accessing 3 bytes beyond the valid region.
+
+Fix this by changing the check to (void *)next + sizeof(u32) > end,
+ensuring there is always enough space for the IS_LAST_ENTRY() read
+on the subsequent iteration.
+
+Fixes: 3478c83cf26b ("ext4: improve xattr consistency checking and error reporting")
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/all/20260224231429.31361-1-kartikey406@gmail.com/T/ [v1]
+Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
+Link: https://patch.msgid.link/20260328150038.349497-1-kartikey406@gmail.com
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ext4/xattr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/ext4/xattr.c
++++ b/fs/ext4/xattr.c
+@@ -226,7 +226,7 @@ check_xattrs(struct inode *inode, struct
+ /* Find the end of the names list */
+ while (!IS_LAST_ENTRY(e)) {
+ struct ext4_xattr_entry *next = EXT4_XATTR_NEXT(e);
+- if ((void *)next >= end) {
++ if ((void *)next + sizeof(u32) > end) {
+ err_str = "e_name out of bounds";
+ goto errout;
+ }
--- /dev/null
+From 77d059519382bd66283e6a4e83ee186e87e7708f Mon Sep 17 00:00:00 2001
+From: Sohei Koyama <skoyama@ddn.com>
+Date: Mon, 6 Apr 2026 16:48:30 +0900
+Subject: ext4: fix missing brelse() in ext4_xattr_inode_dec_ref_all()
+
+From: Sohei Koyama <skoyama@ddn.com>
+
+commit 77d059519382bd66283e6a4e83ee186e87e7708f upstream.
+
+The commit c8e008b60492 ("ext4: ignore xattrs past end")
+introduced a refcount leak in when block_csum is false.
+
+ext4_xattr_inode_dec_ref_all() calls ext4_get_inode_loc() to
+get iloc.bh, but never releases it with brelse().
+
+Fixes: c8e008b60492 ("ext4: ignore xattrs past end")
+Signed-off-by: Sohei Koyama <skoyama@ddn.com>
+Reviewed-by: Andreas Dilger <adilger@dilger.ca>
+Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
+Cc: stable@vger.kernel.org
+Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
+Reviewed-by: Baokun Li <libaokun@linux.alibaba.com>
+Link: https://patch.msgid.link/20260406074830.8480-1-skoyama@ddn.com
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ext4/xattr.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/fs/ext4/xattr.c
++++ b/fs/ext4/xattr.c
+@@ -1165,7 +1165,7 @@ ext4_xattr_inode_dec_ref_all(handle_t *h
+ {
+ struct inode *ea_inode;
+ struct ext4_xattr_entry *entry;
+- struct ext4_iloc iloc;
++ struct ext4_iloc iloc = { .bh = NULL };
+ bool dirty = false;
+ unsigned int ea_ino;
+ int err;
+@@ -1260,6 +1260,8 @@ ext4_xattr_inode_dec_ref_all(handle_t *h
+ ext4_warning_inode(parent,
+ "handle dirty metadata err=%d", err);
+ }
++
++ brelse(iloc.bh);
+ }
+
+ /*
--- /dev/null
+From 5e6de34d82b49cab9d8a42063e9cd0f22a4f31e5 Mon Sep 17 00:00:00 2001
+From: Chen Zhao <chezhao@nvidia.com>
+Date: Sun, 5 Apr 2026 18:44:55 +0300
+Subject: IB/core: Fix zero dmac race in neighbor resolution
+
+From: Chen Zhao <chezhao@nvidia.com>
+
+commit 5e6de34d82b49cab9d8a42063e9cd0f22a4f31e5 upstream.
+
+dst_fetch_ha() checks nud_state without holding the neighbor lock, then
+copies ha under the seqlock. A race in __neigh_update() where nud_state
+is set to NUD_REACHABLE before ha is written allows dst_fetch_ha() to
+read a zero MAC address while the seqlock reports no concurrent writer.
+
+netevent_callback amplifies this by waking ALL pending addr_req workers
+when ANY neighbor becomes NUD_VALID. At scale (N peers resolving ARP
+concurrently), the hit probability scales as N^2, making it near-certain
+for large RDMA workloads.
+
+N(A): neigh_update(A) W(A): addr_resolve(A)
+ | [sleep]
+ | write_lock_bh(&A->lock) |
+ | A->nud_state = NUD_REACHABLE |
+ | // A->ha is still 0 |
+ | [woken by netevent_cb() of
+ | another neighbour]
+ | | dst_fetch_ha(A)
+ | | A->nud_state & NUD_VALID
+ | | read_seqbegin(&A->ha_lock)
+ | | snapshot = A->ha /* 0 */
+ | | read_seqretry(&A->ha_lock)
+ | | return snapshot
+ | seqlock(&A->ha_lock)
+ | A->ha = mac_A /* too late */
+ | sequnlock(&A->ha_lock)
+ | write_unlock_bh(&A->lock)
+
+The incorrect/zero mac is read and programmed in the device QP while it
+was not yet updated. This causes silent packet loss and eventual
+RETRY_EXC_ERR.
+
+Fix by holding the neighbor read lock across the nud_state check and
+ha copy in dst_fetch_ha(), ensuring it synchronizes with
+__neigh_update() which is updating while holding the write lock.
+
+Cc: stable@vger.kernel.org
+Fixes: 92ebb6a0a13a ("IB/cm: Remove now useless rcu_lock in dst_fetch_ha")
+Link: https://patch.msgid.link/r/20260405-fix-dmac-race-v1-1-cfa1ec2ce54a@nvidia.com
+Signed-off-by: Chen Zhao <chezhao@nvidia.com>
+Reviewed-by: Parav Pandit <parav@nvidia.com>
+Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
+Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/core/addr.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/infiniband/core/addr.c
++++ b/drivers/infiniband/core/addr.c
+@@ -321,11 +321,14 @@ static int dst_fetch_ha(const struct dst
+ if (!n)
+ return -ENODATA;
+
++ read_lock_bh(&n->lock);
+ if (!(n->nud_state & NUD_VALID)) {
++ read_unlock_bh(&n->lock);
+ neigh_event_send(n, NULL);
+ ret = -ENODATA;
+ } else {
+ neigh_ha_snapshot(dev_addr->dst_dev_addr, n, dst->dev);
++ read_unlock_bh(&n->lock);
+ }
+
+ neigh_release(n);
--- /dev/null
+From 6a320935fa4293e9e599ec9f85dc9eb3be7029f8 Mon Sep 17 00:00:00 2001
+From: Chia-Ming Chang <chiamingc@synology.com>
+Date: Tue, 24 Feb 2026 17:34:42 +0800
+Subject: inotify: fix watch count leak when fsnotify_add_inode_mark_locked() fails
+
+From: Chia-Ming Chang <chiamingc@synology.com>
+
+commit 6a320935fa4293e9e599ec9f85dc9eb3be7029f8 upstream.
+
+When fsnotify_add_inode_mark_locked() fails in inotify_new_watch(),
+the error path calls inotify_remove_from_idr() but does not call
+dec_inotify_watches() to undo the preceding inc_inotify_watches().
+This leaks a watch count, and repeated failures can exhaust the
+max_user_watches limit with -ENOSPC even when no watches are active.
+
+Prior to commit 1cce1eea0aff ("inotify: Convert to using per-namespace
+limits"), the watch count was incremented after fsnotify_add_mark_locked()
+succeeded, so this path was not affected. The conversion moved
+inc_inotify_watches() before the mark insertion without adding the
+corresponding rollback.
+
+Add the missing dec_inotify_watches() call in the error path.
+
+Fixes: 1cce1eea0aff ("inotify: Convert to using per-namespace limits")
+Cc: stable@vger.kernel.org
+Signed-off-by: Chia-Ming Chang <chiamingc@synology.com>
+Signed-off-by: robbieko <robbieko@synology.com>
+Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
+Link: https://patch.msgid.link/20260224093442.3076294-1-chiamingc@synology.com
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/notify/inotify/inotify_user.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/notify/inotify/inotify_user.c
++++ b/fs/notify/inotify/inotify_user.c
+@@ -622,6 +622,7 @@ static int inotify_new_watch(struct fsno
+ if (ret) {
+ /* we failed to get on the inode, get off the idr */
+ inotify_remove_from_idr(group, tmp_i_mark);
++ dec_inotify_watches(group->inotify_data.ucounts);
+ goto out_err;
+ }
+
--- /dev/null
+From 768059ede35f197575a38b10797b52402d9d4d2f Mon Sep 17 00:00:00 2001
+From: Steven Rostedt <rostedt@goodmis.org>
+Date: Mon, 20 Apr 2026 14:24:26 -0400
+Subject: ktest: Fix the month in the name of the failure directory
+
+From: Steven Rostedt <rostedt@goodmis.org>
+
+commit 768059ede35f197575a38b10797b52402d9d4d2f upstream.
+
+The Perl localtime() function returns the month starting at 0 not 1. This
+caused the date produced to create the directory for saving files of a
+failed run to have the month off by one.
+
+ machine-test-useconfig-fail-20260314073628
+
+The above happened in April, not March. The correct name should have been:
+
+ machine-test-useconfig-fail-20260414073628
+
+This was somewhat confusing.
+
+Cc: stable@vger.kernel.org
+Cc: John 'Warthog9' Hawley <warthog9@kernel.org>
+Link: https://patch.msgid.link/20260420142426.33ad0293@fedora
+Fixes: 7faafbd69639b ("ktest: Add open and close console and start stop monitor")
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/ktest/ktest.pl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/testing/ktest/ktest.pl
++++ b/tools/testing/ktest/ktest.pl
+@@ -1777,7 +1777,7 @@ sub save_logs {
+ my ($result, $basedir) = @_;
+ my @t = localtime;
+ my $date = sprintf "%04d%02d%02d%02d%02d%02d",
+- 1900+$t[5],$t[4],$t[3],$t[2],$t[1],$t[0];
++ 1900+$t[5],$t[4]+1,$t[3],$t[2],$t[1],$t[0];
+
+ my $type = $build_type;
+ if ($type =~ /useconfig/) {
--- /dev/null
+From 7f9f7c697474268d9ef9479df3ddfe7cdcfbbffc Mon Sep 17 00:00:00 2001
+From: Chia-Ming Chang <chiamingc@synology.com>
+Date: Thu, 2 Apr 2026 14:14:06 +0800
+Subject: md/raid5: fix soft lockup in retry_aligned_read()
+
+From: Chia-Ming Chang <chiamingc@synology.com>
+
+commit 7f9f7c697474268d9ef9479df3ddfe7cdcfbbffc upstream.
+
+When retry_aligned_read() encounters an overlapped stripe, it releases
+the stripe via raid5_release_stripe() which puts it on the lockless
+released_stripes llist. In the next raid5d loop iteration,
+release_stripe_list() drains the stripe onto handle_list (since
+STRIPE_HANDLE is set by the original IO), but retry_aligned_read()
+runs before handle_active_stripes() and removes the stripe from
+handle_list via find_get_stripe() -> list_del_init(). This prevents
+handle_stripe() from ever processing the stripe to resolve the
+overlap, causing an infinite loop and soft lockup.
+
+Fix this by using __release_stripe() with temp_inactive_list instead
+of raid5_release_stripe() in the failure path, so the stripe does not
+go through the released_stripes llist. This allows raid5d to break out
+of its loop, and the overlap will be resolved when the stripe is
+eventually processed by handle_stripe().
+
+Fixes: 773ca82fa1ee ("raid5: make release_stripe lockless")
+Cc: stable@vger.kernel.org
+Signed-off-by: FengWei Shih <dannyshih@synology.com>
+Signed-off-by: Chia-Ming Chang <chiamingc@synology.com>
+Link: https://lore.kernel.org/linux-raid/20260402061406.455755-1-chiamingc@synology.com/
+Signed-off-by: Yu Kuai <yukuai@fnnas.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/md/raid5.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/md/raid5.c
++++ b/drivers/md/raid5.c
+@@ -6691,7 +6691,13 @@ static int retry_aligned_read(struct r5
+ }
+
+ if (!add_stripe_bio(sh, raid_bio, dd_idx, 0, 0)) {
+- raid5_release_stripe(sh);
++ int hash;
++
++ spin_lock_irq(&conf->device_lock);
++ hash = sh->hash_lock_index;
++ __release_stripe(conf, sh,
++ &conf->temp_inactive_list[hash]);
++ spin_unlock_irq(&conf->device_lock);
+ conf->retry_read_aligned = raid_bio;
+ conf->retry_read_offset = scnt;
+ return handled;
--- /dev/null
+From b0cc3ae97e893bf54bbce447f4e9fd2e0b88bff9 Mon Sep 17 00:00:00 2001
+From: Junrui Luo <moonafterrain@outlook.com>
+Date: Sat, 4 Apr 2026 15:44:35 +0800
+Subject: md/raid5: validate payload size before accessing journal metadata
+
+From: Junrui Luo <moonafterrain@outlook.com>
+
+commit b0cc3ae97e893bf54bbce447f4e9fd2e0b88bff9 upstream.
+
+r5c_recovery_analyze_meta_block() and
+r5l_recovery_verify_data_checksum_for_mb() iterate over payloads in a
+journal metadata block using on-disk payload size fields without
+validating them against the remaining space in the metadata block.
+
+A corrupted journal contains payload sizes extending beyond the PAGE_SIZE
+boundary can cause out-of-bounds reads when accessing payload fields or
+computing offsets.
+
+Add bounds validation for each payload type to ensure the full payload
+fits within meta_size before processing.
+
+Fixes: b4c625c67362 ("md/r5cache: r5cache recovery: part 1")
+Cc: stable@vger.kernel.org
+Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
+Link: https://lore.kernel.org/linux-raid/SYBPR01MB78815E78D829BB86CD7C8015AF5FA@SYBPR01MB7881.ausprd01.prod.outlook.com/
+Signed-off-by: Yu Kuai <yukuai@fnnas.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/md/raid5-cache.c | 48 ++++++++++++++++++++++++++++++++---------------
+ 1 file changed, 33 insertions(+), 15 deletions(-)
+
+--- a/drivers/md/raid5-cache.c
++++ b/drivers/md/raid5-cache.c
+@@ -2010,15 +2010,27 @@ r5l_recovery_verify_data_checksum_for_mb
+ return -ENOMEM;
+
+ while (mb_offset < le32_to_cpu(mb->meta_size)) {
++ sector_t payload_len;
++
+ payload = (void *)mb + mb_offset;
+ payload_flush = (void *)mb + mb_offset;
+
+ if (le16_to_cpu(payload->header.type) == R5LOG_PAYLOAD_DATA) {
++ payload_len = sizeof(struct r5l_payload_data_parity) +
++ (sector_t)sizeof(__le32) *
++ (le32_to_cpu(payload->size) >> (PAGE_SHIFT - 9));
++ if (mb_offset + payload_len > le32_to_cpu(mb->meta_size))
++ goto mismatch;
+ if (r5l_recovery_verify_data_checksum(
+ log, ctx, page, log_offset,
+ payload->checksum[0]) < 0)
+ goto mismatch;
+ } else if (le16_to_cpu(payload->header.type) == R5LOG_PAYLOAD_PARITY) {
++ payload_len = sizeof(struct r5l_payload_data_parity) +
++ (sector_t)sizeof(__le32) *
++ (le32_to_cpu(payload->size) >> (PAGE_SHIFT - 9));
++ if (mb_offset + payload_len > le32_to_cpu(mb->meta_size))
++ goto mismatch;
+ if (r5l_recovery_verify_data_checksum(
+ log, ctx, page, log_offset,
+ payload->checksum[0]) < 0)
+@@ -2031,22 +2043,18 @@ r5l_recovery_verify_data_checksum_for_mb
+ payload->checksum[1]) < 0)
+ goto mismatch;
+ } else if (le16_to_cpu(payload->header.type) == R5LOG_PAYLOAD_FLUSH) {
+- /* nothing to do for R5LOG_PAYLOAD_FLUSH here */
++ payload_len = sizeof(struct r5l_payload_flush) +
++ (sector_t)le32_to_cpu(payload_flush->size);
++ if (mb_offset + payload_len > le32_to_cpu(mb->meta_size))
++ goto mismatch;
+ } else /* not R5LOG_PAYLOAD_DATA/PARITY/FLUSH */
+ goto mismatch;
+
+- if (le16_to_cpu(payload->header.type) == R5LOG_PAYLOAD_FLUSH) {
+- mb_offset += sizeof(struct r5l_payload_flush) +
+- le32_to_cpu(payload_flush->size);
+- } else {
+- /* DATA or PARITY payload */
++ if (le16_to_cpu(payload->header.type) != R5LOG_PAYLOAD_FLUSH) {
+ log_offset = r5l_ring_add(log, log_offset,
+ le32_to_cpu(payload->size));
+- mb_offset += sizeof(struct r5l_payload_data_parity) +
+- sizeof(__le32) *
+- (le32_to_cpu(payload->size) >> (PAGE_SHIFT - 9));
+ }
+-
++ mb_offset += payload_len;
+ }
+
+ put_page(page);
+@@ -2097,6 +2105,7 @@ r5c_recovery_analyze_meta_block(struct r
+ log_offset = r5l_ring_add(log, ctx->pos, BLOCK_SECTORS);
+
+ while (mb_offset < le32_to_cpu(mb->meta_size)) {
++ sector_t payload_len;
+ int dd;
+
+ payload = (void *)mb + mb_offset;
+@@ -2105,6 +2114,12 @@ r5c_recovery_analyze_meta_block(struct r
+ if (le16_to_cpu(payload->header.type) == R5LOG_PAYLOAD_FLUSH) {
+ int i, count;
+
++ payload_len = sizeof(struct r5l_payload_flush) +
++ (sector_t)le32_to_cpu(payload_flush->size);
++ if (mb_offset + payload_len >
++ le32_to_cpu(mb->meta_size))
++ return -EINVAL;
++
+ count = le32_to_cpu(payload_flush->size) / sizeof(__le64);
+ for (i = 0; i < count; ++i) {
+ stripe_sect = le64_to_cpu(payload_flush->flush_stripes[i]);
+@@ -2118,12 +2133,17 @@ r5c_recovery_analyze_meta_block(struct r
+ }
+ }
+
+- mb_offset += sizeof(struct r5l_payload_flush) +
+- le32_to_cpu(payload_flush->size);
++ mb_offset += payload_len;
+ continue;
+ }
+
+ /* DATA or PARITY payload */
++ payload_len = sizeof(struct r5l_payload_data_parity) +
++ (sector_t)sizeof(__le32) *
++ (le32_to_cpu(payload->size) >> (PAGE_SHIFT - 9));
++ if (mb_offset + payload_len > le32_to_cpu(mb->meta_size))
++ return -EINVAL;
++
+ stripe_sect = (le16_to_cpu(payload->header.type) == R5LOG_PAYLOAD_DATA) ?
+ raid5_compute_sector(
+ conf, le64_to_cpu(payload->location), 0, &dd,
+@@ -2188,9 +2208,7 @@ r5c_recovery_analyze_meta_block(struct r
+ log_offset = r5l_ring_add(log, log_offset,
+ le32_to_cpu(payload->size));
+
+- mb_offset += sizeof(struct r5l_payload_data_parity) +
+- sizeof(__le32) *
+- (le32_to_cpu(payload->size) >> (PAGE_SHIFT - 9));
++ mb_offset += payload_len;
+ }
+
+ return 0;
--- /dev/null
+From b62567bca47408e6739dee75f02a2113548af875 Mon Sep 17 00:00:00 2001
+From: Tobias Gaertner <tob.gaertner@me.com>
+Date: Sun, 29 Mar 2026 04:17:02 -0700
+Subject: ntfs3: add buffer boundary checks to run_unpack()
+
+From: Tobias Gaertner <tob.gaertner@me.com>
+
+commit b62567bca47408e6739dee75f02a2113548af875 upstream.
+
+run_unpack() checks `run_buf < run_last` at the top of the while loop
+but then reads size_size and offset_size bytes via run_unpack_s64()
+without verifying they fit within the remaining buffer. A crafted NTFS
+image with truncated run data in an MFT attribute triggers an OOB heap
+read of up to 15 bytes when the filesystem is mounted.
+
+Add boundary checks before each run_unpack_s64() call to ensure the
+declared field size does not exceed the remaining buffer.
+
+Found by fuzzing with a source-patched harness (LibAFL + QEMU).
+
+Fixes: 82cae269cfa95 ("fs/ntfs3: Add initialization of super block")
+Cc: stable@vger.kernel.org
+Signed-off-by: Tobias Gaertner <tob.gaertner@me.com>
+Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ntfs3/run.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/fs/ntfs3/run.c
++++ b/fs/ntfs3/run.c
+@@ -963,6 +963,9 @@ int run_unpack(struct runs_tree *run, st
+ if (size_size > 8)
+ return -EINVAL;
+
++ if (run_buf + size_size > run_last)
++ return -EINVAL;
++
+ len = run_unpack_s64(run_buf, size_size, 0);
+ /* Skip size_size. */
+ run_buf += size_size;
+@@ -975,6 +978,9 @@ int run_unpack(struct runs_tree *run, st
+ else if (offset_size <= 8) {
+ s64 dlcn;
+
++ if (run_buf + offset_size > run_last)
++ return -EINVAL;
++
+ /* Initial value of dlcn is -1 or 0. */
+ dlcn = (run_buf[offset_size - 1] & 0x80) ? (s64)-1 : 0;
+ dlcn = run_unpack_s64(run_buf, offset_size, dlcn);
--- /dev/null
+From 984a415f019536ea2d24de9010744e5302a9a948 Mon Sep 17 00:00:00 2001
+From: Tobias Gaertner <tob.gaertner@me.com>
+Date: Sun, 29 Mar 2026 04:17:03 -0700
+Subject: ntfs3: fix integer overflow in run_unpack() volume boundary check
+
+From: Tobias Gaertner <tob.gaertner@me.com>
+
+commit 984a415f019536ea2d24de9010744e5302a9a948 upstream.
+
+The volume boundary check `lcn + len > sbi->used.bitmap.nbits` uses raw
+addition which can wrap around for large lcn and len values, bypassing
+the validation. Use check_add_overflow() as is already done for the
+adjacent prev_lcn + dlcn and vcn64 + len checks added by commit
+3ac37e100385 ("ntfs3: Fix integer overflow in run_unpack()").
+
+Found by fuzzing with a source-patched harness (LibAFL + QEMU).
+
+Fixes: 82cae269cfa95 ("fs/ntfs3: Add initialization of super block")
+Cc: stable@vger.kernel.org
+Signed-off-by: Tobias Gaertner <tob.gaertner@me.com>
+Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ntfs3/run.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/fs/ntfs3/run.c
++++ b/fs/ntfs3/run.c
+@@ -1018,9 +1018,15 @@ int run_unpack(struct runs_tree *run, st
+ return -EOPNOTSUPP;
+ }
+ #endif
+- if (lcn != SPARSE_LCN64 && lcn + len > sbi->used.bitmap.nbits) {
+- /* LCN range is out of volume. */
+- return -EINVAL;
++ if (lcn != SPARSE_LCN64) {
++ u64 lcn_end;
++
++ if (check_add_overflow(lcn, len, &lcn_end))
++ return -EINVAL;
++ if (lcn_end > sbi->used.bitmap.nbits) {
++ /* LCN range is out of volume. */
++ return -EINVAL;
++ }
+ }
+
+ if (!run)
--- /dev/null
+From 3bfdc63936dd4773109b7b8c280c0f3b5ae7d349 Mon Sep 17 00:00:00 2001
+From: Keenan Dong <keenanat2000@gmail.com>
+Date: Wed, 8 Apr 2026 16:46:00 +0800
+Subject: rtmutex: Use waiter::task instead of current in remove_waiter()
+
+From: Keenan Dong <keenanat2000@gmail.com>
+
+commit 3bfdc63936dd4773109b7b8c280c0f3b5ae7d349 upstream.
+
+remove_waiter() is used by the slowlock paths, but it is also used for
+proxy-lock rollback in rt_mutex_start_proxy_lock() when invoked from
+futex_requeue().
+
+In the latter case waiter::task is not current, but remove_waiter()
+operates on current for the dequeue operation. That results in several
+problems:
+
+ 1) the rbtree dequeue happens without waiter::task::pi_lock being held
+
+ 2) the waiter task's pi_blocked_on state is not cleared, which leaves a
+ dangling pointer primed for UAF around.
+
+ 3) rt_mutex_adjust_prio_chain() operates on the wrong top priority waiter
+ task
+
+Use waiter::task instead of current in all related operations in
+remove_waiter() to cure those problems.
+
+[ tglx: Fixup rt_mutex_adjust_prio_chain(), add a comment and amend the
+ changelog ]
+
+Fixes: 8161239a8bcc ("rtmutex: Simplify PI algorithm and make highest prio task get lock")
+Reported-by: Yuan Tan <yuantan098@gmail.com>
+Reported-by: Yifan Wu <yifanwucs@gmail.com>
+Reported-by: Juefei Pu <tomapufckgml@gmail.com>
+Reported-by: Xin Liu <bird@lzu.edu.cn>
+Signed-off-by: Keenan Dong <keenanat2000@gmail.com>
+Signed-off-by: Thomas Gleixner <tglx@kernel.org>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/locking/rtmutex.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/kernel/locking/rtmutex.c
++++ b/kernel/locking/rtmutex.c
+@@ -1511,20 +1511,23 @@ static bool rtmutex_spin_on_owner(struct
+ *
+ * Must be called with lock->wait_lock held and interrupts disabled. It must
+ * have just failed to try_to_take_rt_mutex().
++ *
++ * When invoked from rt_mutex_start_proxy_lock() waiter::task != current !
+ */
+ static void __sched remove_waiter(struct rt_mutex_base *lock,
+ struct rt_mutex_waiter *waiter)
+ {
+ bool is_top_waiter = (waiter == rt_mutex_top_waiter(lock));
+ struct task_struct *owner = rt_mutex_owner(lock);
++ struct task_struct *waiter_task = waiter->task;
+ struct rt_mutex_base *next_lock;
+
+ lockdep_assert_held(&lock->wait_lock);
+
+- raw_spin_lock(¤t->pi_lock);
+- rt_mutex_dequeue(lock, waiter);
+- current->pi_blocked_on = NULL;
+- raw_spin_unlock(¤t->pi_lock);
++ scoped_guard(raw_spinlock, &waiter_task->pi_lock) {
++ rt_mutex_dequeue(lock, waiter);
++ waiter_task->pi_blocked_on = NULL;
++ }
+
+ /*
+ * Only update priority if the waiter was the highest priority
+@@ -1560,7 +1563,7 @@ static void __sched remove_waiter(struct
+ raw_spin_unlock_irq(&lock->wait_lock);
+
+ rt_mutex_adjust_prio_chain(owner, RT_MUTEX_MIN_CHAINWALK, lock,
+- next_lock, NULL, current);
++ next_lock, NULL, waiter_task);
+
+ raw_spin_lock_irq(&lock->wait_lock);
+ }
--- /dev/null
+From 1e111c4b3a726df1254670a5cc4868cedb946d37 Mon Sep 17 00:00:00 2001
+From: Yang Xiuwei <yangxiuwei@kylinos.cn>
+Date: Mon, 30 Mar 2026 09:49:52 +0800
+Subject: scsi: sd: fix missing put_disk() when device_add(&disk_dev) fails
+
+From: Yang Xiuwei <yangxiuwei@kylinos.cn>
+
+commit 1e111c4b3a726df1254670a5cc4868cedb946d37 upstream.
+
+If device_add(&sdkp->disk_dev) fails, put_device() runs
+scsi_disk_release(), which frees the scsi_disk but leaves the gendisk
+referenced. The device_add_disk() error path in sd_probe() calls
+put_disk(gd); call put_disk(gd) here to mirror that cleanup.
+
+Fixes: 265dfe8ebbab ("scsi: sd: Free scsi_disk device via put_device()")
+Cc: stable@vger.kernel.org
+Reviewed-by: John Garry <john.g.garry@oracle.com>
+Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
+Link: https://patch.msgid.link/20260330014952.152776-1-yangxiuwei@kylinos.cn
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/scsi/sd.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/scsi/sd.c
++++ b/drivers/scsi/sd.c
+@@ -3727,6 +3727,7 @@ static int sd_probe(struct device *dev)
+ error = device_add(&sdkp->disk_dev);
+ if (error) {
+ put_device(&sdkp->disk_dev);
++ put_disk(gd);
+ goto out;
+ }
+
--- /dev/null
+From ade67d5f588832c7ba131aadd4215a94ce0a15c8 Mon Sep 17 00:00:00 2001
+From: Andrea Mayer <andrea.mayer@uniroma2.it>
+Date: Sat, 18 Apr 2026 18:28:38 +0200
+Subject: seg6: fix seg6 lwtunnel output redirect for L2 reduced encap mode
+
+From: Andrea Mayer <andrea.mayer@uniroma2.it>
+
+commit ade67d5f588832c7ba131aadd4215a94ce0a15c8 upstream.
+
+When SEG6_IPTUN_MODE_L2ENCAP_RED (L2ENCAP_RED) was introduced, the
+condition in seg6_build_state() that excludes L2 encap modes from
+setting LWTUNNEL_STATE_OUTPUT_REDIRECT was not updated to account for
+the new mode.
+As a consequence, L2ENCAP_RED routes incorrectly trigger seg6_output()
+on the output path, where the packet is silently dropped because
+skb_mac_header_was_set() fails on L3 packets.
+
+Extend the check to also exclude L2ENCAP_RED, consistent with L2ENCAP.
+
+Fixes: 13f0296be8ec ("seg6: add support for SRv6 H.L2Encaps.Red behavior")
+Cc: stable@vger.kernel.org
+Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
+Reviewed-by: Justin Iurman <justin.iurman@gmail.com>
+Link: https://patch.msgid.link/20260418162838.31979-1-andrea.mayer@uniroma2.it
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv6/seg6_iptunnel.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/net/ipv6/seg6_iptunnel.c
++++ b/net/ipv6/seg6_iptunnel.c
+@@ -711,7 +711,8 @@ static int seg6_build_state(struct net *
+ newts->type = LWTUNNEL_ENCAP_SEG6;
+ newts->flags |= LWTUNNEL_STATE_INPUT_REDIRECT;
+
+- if (tuninfo->mode != SEG6_IPTUN_MODE_L2ENCAP)
++ if (tuninfo->mode != SEG6_IPTUN_MODE_L2ENCAP &&
++ tuninfo->mode != SEG6_IPTUN_MODE_L2ENCAP_RED)
+ newts->flags |= LWTUNNEL_STATE_OUTPUT_REDIRECT;
+
+ newts->headroom = seg6_lwt_headroom(tuninfo);
mtd-docg3-convert-to-platform-remove-callback-return.patch
mtd-docg3-fix-use-after-free-in-docg3_release.patch
io_uring-poll-fix-multishot-recv-missing-eof-on-wake.patch
+ext4-fix-bounds-check-in-check_xattrs-to-prevent-out-of-bounds-access.patch
+ext4-fix-missing-brelse-in-ext4_xattr_inode_dec_ref_all.patch
+md-raid5-fix-soft-lockup-in-retry_aligned_read.patch
+md-raid5-validate-payload-size-before-accessing-journal-metadata.patch
+inotify-fix-watch-count-leak-when-fsnotify_add_inode_mark_locked-fails.patch
+tcp-call-sk_data_ready-after-listener-migration.patch
+taskstats-set-version-in-tgid-exit-notifications.patch
+bluetooth-hci_event-fix-potential-uaf-in-ssp-passkey-handlers.patch
+can-ucan-fix-devres-lifetime.patch
+crypto-arm64-aes-fix-32-bit-aes_mac_update-arg-treated-as-64-bit.patch
+crypto-atmel-aes-fix-3-page-memory-leak-in-atmel_aes_buff_cleanup.patch
+crypto-atmel-ecc-release-client-on-allocation-failure.patch
+crypto-hisilicon-fix-dma_unmap_single-direction.patch
+crypto-ccree-fix-a-memory-leak-in-cc_mac_digest.patch
+crypto-atmel-tdes-fix-dma-sync-direction.patch
+crypto-atmel-sha204a-fix-potential-uaf-and-memory-leak-in-remove-path.patch
+dm-mirror-fix-integer-overflow-in-create_dirty_log.patch
+ib-core-fix-zero-dmac-race-in-neighbor-resolution.patch
+ktest-fix-the-month-in-the-name-of-the-failure-directory.patch
+ntfs3-add-buffer-boundary-checks-to-run_unpack.patch
+ntfs3-fix-integer-overflow-in-run_unpack-volume-boundary-check.patch
+rtmutex-use-waiter-task-instead-of-current-in-remove_waiter.patch
+scsi-sd-fix-missing-put_disk-when-device_add-disk_dev-fails.patch
+seg6-fix-seg6-lwtunnel-output-redirect-for-l2-reduced-encap-mode.patch
--- /dev/null
+From 16c4f0211aaa1ec1422b11b59f64f1abe9009fc0 Mon Sep 17 00:00:00 2001
+From: Yiyang Chen <cyyzero16@gmail.com>
+Date: Mon, 30 Mar 2026 03:00:40 +0800
+Subject: taskstats: set version in TGID exit notifications
+
+From: Yiyang Chen <cyyzero16@gmail.com>
+
+commit 16c4f0211aaa1ec1422b11b59f64f1abe9009fc0 upstream.
+
+delay accounting started populating taskstats records with a valid version
+field via fill_pid() and fill_tgid().
+
+Later, commit ad4ecbcba728 ("[PATCH] delay accounting taskstats interface
+send tgid once") changed the TGID exit path to send the cached
+signal->stats aggregate directly instead of building the outgoing record
+through fill_tgid(). Unlike fill_tgid(), fill_tgid_exit() only
+accumulates accounting data and never initializes stats->version.
+
+As a result, TGID exit notifications can reach userspace with version == 0
+even though PID exit notifications and TASKSTATS_CMD_GET replies carry a
+valid taskstats version.
+
+This is easy to reproduce with `tools/accounting/getdelays.c`.
+
+I have a small follow-up patch for that tool which:
+
+1. increases the receive buffer/message size so the pid+tgid
+ combined exit notification is not dropped/truncated
+
+2. prints `stats->version`.
+
+With that patch, the reproducer is:
+
+ Terminal 1:
+ ./getdelays -d -v -l -m 0
+
+ Terminal 2:
+ taskset -c 0 python3 -c 'import threading,time; t=threading.Thread(target=time.sleep,args=(0.1,)); t.start(); t.join()'
+
+That produces both PID and TGID exit notifications for the same
+process. The PID exit record reports a valid taskstats version, while
+the TGID exit record reports `version 0`.
+
+
+This patch (of 2):
+
+Set stats->version = TASKSTATS_VERSION after copying the cached TGID
+aggregate into the outgoing netlink payload so all taskstats records are
+self-describing again.
+
+Link: https://lkml.kernel.org/r/ba83d934e59edd431b693607de573eb9ca059309.1774810498.git.cyyzero16@gmail.com
+Fixes: ad4ecbcba728 ("[PATCH] delay accounting taskstats interface send tgid once")
+Signed-off-by: Yiyang Chen <cyyzero16@gmail.com>
+Cc: Balbir Singh <bsingharora@gmail.com>
+Cc: Dr. Thomas Orgis <thomas.orgis@uni-hamburg.de>
+Cc: Fan Yu <fan.yu9@zte.com.cn>
+Cc: Wang Yaxin <wang.yaxin@zte.com.cn>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/taskstats.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/kernel/taskstats.c
++++ b/kernel/taskstats.c
+@@ -656,6 +656,7 @@ void taskstats_exit(struct task_struct *
+ goto err;
+
+ memcpy(stats, tsk->signal->stats, sizeof(*stats));
++ stats->version = TASKSTATS_VERSION;
+
+ send:
+ send_cpu_listeners(rep_skb, listeners);
--- /dev/null
+From 3864c6ba1e041bc75342353a70fa2a2c6f909923 Mon Sep 17 00:00:00 2001
+From: Zhenzhong Wu <jt26wzz@gmail.com>
+Date: Wed, 22 Apr 2026 10:45:53 +0800
+Subject: tcp: call sk_data_ready() after listener migration
+
+From: Zhenzhong Wu <jt26wzz@gmail.com>
+
+commit 3864c6ba1e041bc75342353a70fa2a2c6f909923 upstream.
+
+When inet_csk_listen_stop() migrates an established child socket from
+a closing listener to another socket in the same SO_REUSEPORT group,
+the target listener gets a new accept-queue entry via
+inet_csk_reqsk_queue_add(), but that path never notifies the target
+listener's waiters. A nonblocking accept() still works because it
+checks the queue directly, but poll()/epoll_wait() waiters and
+blocking accept() callers can also remain asleep indefinitely.
+
+Call READ_ONCE(nsk->sk_data_ready)(nsk) after a successful migration
+in inet_csk_listen_stop().
+
+However, after inet_csk_reqsk_queue_add() succeeds, the ref acquired
+in reuseport_migrate_sock() is effectively transferred to
+nreq->rsk_listener. Another CPU can then dequeue nreq via accept()
+or listener shutdown, hit reqsk_put(), and drop that listener ref.
+Since listeners are SOCK_RCU_FREE, wrap the post-queue_add()
+dereferences of nsk in rcu_read_lock()/rcu_read_unlock(), which also
+covers the existing sock_net(nsk) access in that path.
+
+The reqsk_timer_handler() path does not need the same changes for two
+reasons: half-open requests become readable only after the final ACK,
+where tcp_child_process() already wakes the listener; and once nreq is
+visible via inet_ehash_insert(), the success path no longer touches
+nsk directly.
+
+Fixes: 54b92e841937 ("tcp: Migrate TCP_ESTABLISHED/TCP_SYN_RECV sockets in accept queues.")
+Cc: stable@vger.kernel.org
+Suggested-by: Eric Dumazet <edumazet@google.com>
+Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
+Signed-off-by: Zhenzhong Wu <jt26wzz@gmail.com>
+Reviewed-by: Eric Dumazet <edumazet@google.com>
+Link: https://patch.msgid.link/20260422024554.130346-2-jt26wzz@gmail.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv4/inet_connection_sock.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/net/ipv4/inet_connection_sock.c
++++ b/net/ipv4/inet_connection_sock.c
+@@ -1429,16 +1429,19 @@ void inet_csk_listen_stop(struct sock *s
+ if (nreq) {
+ refcount_set(&nreq->rsk_refcnt, 1);
+
++ rcu_read_lock();
+ if (inet_csk_reqsk_queue_add(nsk, nreq, child)) {
+ __NET_INC_STATS(sock_net(nsk),
+ LINUX_MIB_TCPMIGRATEREQSUCCESS);
+ reqsk_migrate_reset(req);
++ READ_ONCE(nsk->sk_data_ready)(nsk);
+ } else {
+ __NET_INC_STATS(sock_net(nsk),
+ LINUX_MIB_TCPMIGRATEREQFAILURE);
+ reqsk_migrate_reset(nreq);
+ __reqsk_free(nreq);
+ }
++ rcu_read_unlock();
+
+ /* inet_csk_reqsk_queue_add() has already
+ * called inet_child_forget() on failure case.