--- /dev/null
+From f3ad0f32db9be0e5923e17b5e0764ba1f7856e42 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 5 Sep 2024 06:22:18 +0800
+Subject: ceph: remove the incorrect Fw reference check when dirtying pages
+
+From: Xiubo Li <xiubli@redhat.com>
+
+[ Upstream commit c08dfb1b49492c09cf13838c71897493ea3b424e ]
+
+When doing the direct-io reads it will also try to mark pages dirty,
+but for the read path it won't hold the Fw caps and there is case
+will it get the Fw reference.
+
+Fixes: 5dda377cf0a6 ("ceph: set i_head_snapc when getting CEPH_CAP_FILE_WR reference")
+Signed-off-by: Xiubo Li <xiubli@redhat.com>
+Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/ceph/addr.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
+index de10899da837c..98b17992524b0 100644
+--- a/fs/ceph/addr.c
++++ b/fs/ceph/addr.c
+@@ -88,7 +88,6 @@ static int ceph_set_page_dirty(struct page *page)
+
+ /* dirty the head */
+ spin_lock(&ci->i_ceph_lock);
+- BUG_ON(ci->i_wr_ref == 0); // caller should hold Fw reference
+ if (__ceph_have_pending_cap_snap(ci)) {
+ struct ceph_cap_snap *capsnap =
+ list_last_entry(&ci->i_cap_snaps,
+--
+2.43.0
+
--- /dev/null
+From d4d68ef12ce321804caab8f3209e50b7aa96f507 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 25 Sep 2024 02:51:59 +0300
+Subject: ipv4: ip_gre: Fix drops of small packets in ipgre_xmit
+
+From: Anton Danilov <littlesmilingcloud@gmail.com>
+
+[ Upstream commit c4a14f6d9d17ad1e41a36182dd3b8a5fd91efbd7 ]
+
+Regression Description:
+
+Depending on the options specified for the GRE tunnel device, small
+packets may be dropped. This occurs because the pskb_network_may_pull
+function fails due to the packet's insufficient length.
+
+For example, if only the okey option is specified for the tunnel device,
+original (before encapsulation) packets smaller than 28 bytes (including
+the IPv4 header) will be dropped. This happens because the required
+length is calculated relative to the network header, not the skb->head.
+
+Here is how the required length is computed and checked:
+
+* The pull_len variable is set to 28 bytes, consisting of:
+ * IPv4 header: 20 bytes
+ * GRE header with Key field: 8 bytes
+
+* The pskb_network_may_pull function adds the network offset, shifting
+the checkable space further to the beginning of the network header and
+extending it to the beginning of the packet. As a result, the end of
+the checkable space occurs beyond the actual end of the packet.
+
+Instead of ensuring that 28 bytes are present in skb->head, the function
+is requesting these 28 bytes starting from the network header. For small
+packets, this requested length exceeds the actual packet size, causing
+the check to fail and the packets to be dropped.
+
+This issue affects both locally originated and forwarded packets in
+DMVPN-like setups.
+
+How to reproduce (for local originated packets):
+
+ ip link add dev gre1 type gre ikey 1.9.8.4 okey 1.9.8.4 \
+ local <your-ip> remote 0.0.0.0
+
+ ip link set mtu 1400 dev gre1
+ ip link set up dev gre1
+ ip address add 192.168.13.1/24 dev gre1
+ ip neighbor add 192.168.13.2 lladdr <remote-ip> dev gre1
+ ping -s 1374 -c 10 192.168.13.2
+ tcpdump -vni gre1
+ tcpdump -vni <your-ext-iface> 'ip proto 47'
+ ip -s -s -d link show dev gre1
+
+Solution:
+
+Use the pskb_may_pull function instead the pskb_network_may_pull.
+
+Fixes: 80d875cfc9d3 ("ipv4: ip_gre: Avoid skb_pull() failure in ipgre_xmit()")
+Signed-off-by: Anton Danilov <littlesmilingcloud@gmail.com>
+Reviewed-by: Eric Dumazet <edumazet@google.com>
+Link: https://patch.msgid.link/20240924235158.106062-1-littlesmilingcloud@gmail.com
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/ipv4/ip_gre.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
+index 2f5d2109c9192..ea30393c8c66c 100644
+--- a/net/ipv4/ip_gre.c
++++ b/net/ipv4/ip_gre.c
+@@ -711,11 +711,11 @@ static netdev_tx_t ipgre_xmit(struct sk_buff *skb,
+ if (skb_cow_head(skb, 0))
+ goto free_skb;
+
+- tnl_params = (const struct iphdr *)skb->data;
+-
+- if (!pskb_network_may_pull(skb, pull_len))
++ if (!pskb_may_pull(skb, pull_len))
+ goto free_skb;
+
++ tnl_params = (const struct iphdr *)skb->data;
++
+ /* ip_tunnel_xmit() needs skb->data pointing to gre header. */
+ skb_pull(skb, pull_len);
+ skb_reset_mac_header(skb);
+--
+2.43.0
+
--- /dev/null
+From 1116889a2a8ff6ee7a3d051408dde7392d0ea189 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 21 Aug 2024 23:40:44 +0200
+Subject: mailbox: bcm2835: Fix timeout during suspend mode
+
+From: Stefan Wahren <wahrenst@gmx.net>
+
+[ Upstream commit dc09f007caed3b2f6a3b6bd7e13777557ae22bfd ]
+
+During noirq suspend phase the Raspberry Pi power driver suffer of
+firmware property timeouts. The reason is that the IRQ of the underlying
+BCM2835 mailbox is disabled and rpi_firmware_property_list() will always
+run into a timeout [1].
+
+Since the VideoCore side isn't consider as a wakeup source, set the
+IRQF_NO_SUSPEND flag for the mailbox IRQ in order to keep it enabled
+during suspend-resume cycle.
+
+[1]
+PM: late suspend of devices complete after 1.754 msecs
+WARNING: CPU: 0 PID: 438 at drivers/firmware/raspberrypi.c:128
+ rpi_firmware_property_list+0x204/0x22c
+Firmware transaction 0x00028001 timeout
+Modules linked in:
+CPU: 0 PID: 438 Comm: bash Tainted: G C 6.9.3-dirty #17
+Hardware name: BCM2835
+Call trace:
+unwind_backtrace from show_stack+0x18/0x1c
+show_stack from dump_stack_lvl+0x34/0x44
+dump_stack_lvl from __warn+0x88/0xec
+__warn from warn_slowpath_fmt+0x7c/0xb0
+warn_slowpath_fmt from rpi_firmware_property_list+0x204/0x22c
+rpi_firmware_property_list from rpi_firmware_property+0x68/0x8c
+rpi_firmware_property from rpi_firmware_set_power+0x54/0xc0
+rpi_firmware_set_power from _genpd_power_off+0xe4/0x148
+_genpd_power_off from genpd_sync_power_off+0x7c/0x11c
+genpd_sync_power_off from genpd_finish_suspend+0xcc/0xe0
+genpd_finish_suspend from dpm_run_callback+0x78/0xd0
+dpm_run_callback from device_suspend_noirq+0xc0/0x238
+device_suspend_noirq from dpm_suspend_noirq+0xb0/0x168
+dpm_suspend_noirq from suspend_devices_and_enter+0x1b8/0x5ac
+suspend_devices_and_enter from pm_suspend+0x254/0x2e4
+pm_suspend from state_store+0xa8/0xd4
+state_store from kernfs_fop_write_iter+0x154/0x1a0
+kernfs_fop_write_iter from vfs_write+0x12c/0x184
+vfs_write from ksys_write+0x78/0xc0
+ksys_write from ret_fast_syscall+0x0/0x54
+Exception stack(0xcc93dfa8 to 0xcc93dff0)
+[...]
+PM: noirq suspend of devices complete after 3095.584 msecs
+
+Link: https://github.com/raspberrypi/firmware/issues/1894
+Fixes: 0bae6af6d704 ("mailbox: Enable BCM2835 mailbox support")
+Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
+Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
+Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/mailbox/bcm2835-mailbox.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/mailbox/bcm2835-mailbox.c b/drivers/mailbox/bcm2835-mailbox.c
+index e92bbc533821a..9466cb0076294 100644
+--- a/drivers/mailbox/bcm2835-mailbox.c
++++ b/drivers/mailbox/bcm2835-mailbox.c
+@@ -152,7 +152,8 @@ static int bcm2835_mbox_probe(struct platform_device *pdev)
+ spin_lock_init(&mbox->lock);
+
+ ret = devm_request_irq(dev, irq_of_parse_and_map(dev->of_node, 0),
+- bcm2835_mbox_irq, 0, dev_name(dev), mbox);
++ bcm2835_mbox_irq, IRQF_NO_SUSPEND, dev_name(dev),
++ mbox);
+ if (ret) {
+ dev_err(dev, "Failed to register a mailbox IRQ handler: %d\n",
+ ret);
+--
+2.43.0
+
--- /dev/null
+From 603a628b2c5033de1689988fb30243047d5be4fd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 14 Aug 2024 02:51:47 +0000
+Subject: mailbox: rockchip: fix a typo in module autoloading
+
+From: Liao Chen <liaochen4@huawei.com>
+
+[ Upstream commit e92d87c9c5d769e4cb1dd7c90faa38dddd7e52e3 ]
+
+MODULE_DEVICE_TABLE(of, rockchip_mbox_of_match) could let the module
+properly autoloaded based on the alias from of_device_id table. It
+should be 'rockchip_mbox_of_match' instead of 'rockchp_mbox_of_match',
+just fix it.
+
+Fixes: f70ed3b5dc8b ("mailbox: rockchip: Add Rockchip mailbox driver")
+Signed-off-by: Liao Chen <liaochen4@huawei.com>
+Reviewed-by: Heiko Stuebner <heiko@sntech.de>
+Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/mailbox/rockchip-mailbox.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/mailbox/rockchip-mailbox.c b/drivers/mailbox/rockchip-mailbox.c
+index d702a204f5c10..bf09ab923d1e2 100644
+--- a/drivers/mailbox/rockchip-mailbox.c
++++ b/drivers/mailbox/rockchip-mailbox.c
+@@ -167,7 +167,7 @@ static const struct of_device_id rockchip_mbox_of_match[] = {
+ { .compatible = "rockchip,rk3368-mailbox", .data = &rk3368_drv_data},
+ { },
+ };
+-MODULE_DEVICE_TABLE(of, rockchp_mbox_of_match);
++MODULE_DEVICE_TABLE(of, rockchip_mbox_of_match);
+
+ static int rockchip_mbox_probe(struct platform_device *pdev)
+ {
+--
+2.43.0
+
--- /dev/null
+From 2d3d7e7809e0a340a0528e1fb4b8dabc2100c5aa Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 24 Sep 2024 15:02:57 +0000
+Subject: net: add more sanity checks to qdisc_pkt_len_init()
+
+From: Eric Dumazet <edumazet@google.com>
+
+[ Upstream commit ab9a9a9e9647392a19e7a885b08000e89c86b535 ]
+
+One path takes care of SKB_GSO_DODGY, assuming
+skb->len is bigger than hdr_len.
+
+virtio_net_hdr_to_skb() does not fully dissect TCP headers,
+it only make sure it is at least 20 bytes.
+
+It is possible for an user to provide a malicious 'GSO' packet,
+total length of 80 bytes.
+
+- 20 bytes of IPv4 header
+- 60 bytes TCP header
+- a small gso_size like 8
+
+virtio_net_hdr_to_skb() would declare this packet as a normal
+GSO packet, because it would see 40 bytes of payload,
+bigger than gso_size.
+
+We need to make detect this case to not underflow
+qdisc_skb_cb(skb)->pkt_len.
+
+Fixes: 1def9238d4aa ("net_sched: more precise pkt_len computation")
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Reviewed-by: Willem de Bruijn <willemb@google.com>
+Reviewed-by: David Ahern <dsahern@kernel.org>
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/core/dev.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/net/core/dev.c b/net/core/dev.c
+index 916a095eaee27..0409c051ed5d4 100644
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -3443,10 +3443,14 @@ static void qdisc_pkt_len_init(struct sk_buff *skb)
+ hdr_len += sizeof(struct udphdr);
+ }
+
+- if (shinfo->gso_type & SKB_GSO_DODGY)
+- gso_segs = DIV_ROUND_UP(skb->len - hdr_len,
+- shinfo->gso_size);
++ if (unlikely(shinfo->gso_type & SKB_GSO_DODGY)) {
++ int payload = skb->len - hdr_len;
+
++ /* Malicious packet. */
++ if (payload <= 0)
++ return;
++ gso_segs = DIV_ROUND_UP(payload, shinfo->gso_size);
++ }
+ qdisc_skb_cb(skb)->pkt_len += (gso_segs - 1) * hdr_len;
+ }
+ }
+--
+2.43.0
+
--- /dev/null
+From 6de800cea7603b31c1317f2336b984153fe48097 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 24 Sep 2024 15:02:56 +0000
+Subject: net: avoid potential underflow in qdisc_pkt_len_init() with UFO
+
+From: Eric Dumazet <edumazet@google.com>
+
+[ Upstream commit c20029db28399ecc50e556964eaba75c43b1e2f1 ]
+
+After commit 7c6d2ecbda83 ("net: be more gentle about silly gso
+requests coming from user") virtio_net_hdr_to_skb() had sanity check
+to detect malicious attempts from user space to cook a bad GSO packet.
+
+Then commit cf9acc90c80ec ("net: virtio_net_hdr_to_skb: count
+transport header in UFO") while fixing one issue, allowed user space
+to cook a GSO packet with the following characteristic :
+
+IPv4 SKB_GSO_UDP, gso_size=3, skb->len = 28.
+
+When this packet arrives in qdisc_pkt_len_init(), we end up
+with hdr_len = 28 (IPv4 header + UDP header), matching skb->len
+
+Then the following sets gso_segs to 0 :
+
+gso_segs = DIV_ROUND_UP(skb->len - hdr_len,
+ shinfo->gso_size);
+
+Then later we set qdisc_skb_cb(skb)->pkt_len to back to zero :/
+
+qdisc_skb_cb(skb)->pkt_len += (gso_segs - 1) * hdr_len;
+
+This leads to the following crash in fq_codel [1]
+
+qdisc_pkt_len_init() is best effort, we only want an estimation
+of the bytes sent on the wire, not crashing the kernel.
+
+This patch is fixing this particular issue, a following one
+adds more sanity checks for another potential bug.
+
+[1]
+[ 70.724101] BUG: kernel NULL pointer dereference, address: 0000000000000000
+[ 70.724561] #PF: supervisor read access in kernel mode
+[ 70.724561] #PF: error_code(0x0000) - not-present page
+[ 70.724561] PGD 10ac61067 P4D 10ac61067 PUD 107ee2067 PMD 0
+[ 70.724561] Oops: Oops: 0000 [#1] SMP NOPTI
+[ 70.724561] CPU: 11 UID: 0 PID: 2163 Comm: b358537762 Not tainted 6.11.0-virtme #991
+[ 70.724561] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
+[ 70.724561] RIP: 0010:fq_codel_enqueue (net/sched/sch_fq_codel.c:120 net/sched/sch_fq_codel.c:168 net/sched/sch_fq_codel.c:230) sch_fq_codel
+[ 70.724561] Code: 24 08 49 c1 e1 06 44 89 7c 24 18 45 31 ed 45 31 c0 31 ff 89 44 24 14 4c 03 8b 90 01 00 00 eb 04 39 ca 73 37 4d 8b 39 83 c7 01 <49> 8b 17 49 89 11 41 8b 57 28 45 8b 5f 34 49 c7 07 00 00 00 00 49
+All code
+========
+ 0: 24 08 and $0x8,%al
+ 2: 49 c1 e1 06 shl $0x6,%r9
+ 6: 44 89 7c 24 18 mov %r15d,0x18(%rsp)
+ b: 45 31 ed xor %r13d,%r13d
+ e: 45 31 c0 xor %r8d,%r8d
+ 11: 31 ff xor %edi,%edi
+ 13: 89 44 24 14 mov %eax,0x14(%rsp)
+ 17: 4c 03 8b 90 01 00 00 add 0x190(%rbx),%r9
+ 1e: eb 04 jmp 0x24
+ 20: 39 ca cmp %ecx,%edx
+ 22: 73 37 jae 0x5b
+ 24: 4d 8b 39 mov (%r9),%r15
+ 27: 83 c7 01 add $0x1,%edi
+ 2a:* 49 8b 17 mov (%r15),%rdx <-- trapping instruction
+ 2d: 49 89 11 mov %rdx,(%r9)
+ 30: 41 8b 57 28 mov 0x28(%r15),%edx
+ 34: 45 8b 5f 34 mov 0x34(%r15),%r11d
+ 38: 49 c7 07 00 00 00 00 movq $0x0,(%r15)
+ 3f: 49 rex.WB
+
+Code starting with the faulting instruction
+===========================================
+ 0: 49 8b 17 mov (%r15),%rdx
+ 3: 49 89 11 mov %rdx,(%r9)
+ 6: 41 8b 57 28 mov 0x28(%r15),%edx
+ a: 45 8b 5f 34 mov 0x34(%r15),%r11d
+ e: 49 c7 07 00 00 00 00 movq $0x0,(%r15)
+ 15: 49 rex.WB
+[ 70.724561] RSP: 0018:ffff95ae85e6fb90 EFLAGS: 00000202
+[ 70.724561] RAX: 0000000002000000 RBX: ffff95ae841de000 RCX: 0000000000000000
+[ 70.724561] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
+[ 70.724561] RBP: ffff95ae85e6fbf8 R08: 0000000000000000 R09: ffff95b710a30000
+[ 70.724561] R10: 0000000000000000 R11: bdf289445ce31881 R12: ffff95ae85e6fc58
+[ 70.724561] R13: 0000000000000000 R14: 0000000000000040 R15: 0000000000000000
+[ 70.724561] FS: 000000002c5c1380(0000) GS:ffff95bd7fcc0000(0000) knlGS:0000000000000000
+[ 70.724561] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+[ 70.724561] CR2: 0000000000000000 CR3: 000000010c568000 CR4: 00000000000006f0
+[ 70.724561] Call Trace:
+[ 70.724561] <TASK>
+[ 70.724561] ? __die (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:434)
+[ 70.724561] ? page_fault_oops (arch/x86/mm/fault.c:715)
+[ 70.724561] ? exc_page_fault (./arch/x86/include/asm/irqflags.h:26 ./arch/x86/include/asm/irqflags.h:87 ./arch/x86/include/asm/irqflags.h:147 arch/x86/mm/fault.c:1489 arch/x86/mm/fault.c:1539)
+[ 70.724561] ? asm_exc_page_fault (./arch/x86/include/asm/idtentry.h:623)
+[ 70.724561] ? fq_codel_enqueue (net/sched/sch_fq_codel.c:120 net/sched/sch_fq_codel.c:168 net/sched/sch_fq_codel.c:230) sch_fq_codel
+[ 70.724561] dev_qdisc_enqueue (net/core/dev.c:3784)
+[ 70.724561] __dev_queue_xmit (net/core/dev.c:3880 (discriminator 2) net/core/dev.c:4390 (discriminator 2))
+[ 70.724561] ? irqentry_enter (kernel/entry/common.c:237)
+[ 70.724561] ? sysvec_apic_timer_interrupt (./arch/x86/include/asm/hardirq.h:74 (discriminator 2) arch/x86/kernel/apic/apic.c:1043 (discriminator 2) arch/x86/kernel/apic/apic.c:1043 (discriminator 2))
+[ 70.724561] ? trace_hardirqs_on (kernel/trace/trace_preemptirq.c:58 (discriminator 4))
+[ 70.724561] ? asm_sysvec_apic_timer_interrupt (./arch/x86/include/asm/idtentry.h:702)
+[ 70.724561] ? virtio_net_hdr_to_skb.constprop.0 (./include/linux/virtio_net.h:129 (discriminator 1))
+[ 70.724561] packet_sendmsg (net/packet/af_packet.c:3145 (discriminator 1) net/packet/af_packet.c:3177 (discriminator 1))
+[ 70.724561] ? _raw_spin_lock_bh (./arch/x86/include/asm/atomic.h:107 (discriminator 4) ./include/linux/atomic/atomic-arch-fallback.h:2170 (discriminator 4) ./include/linux/atomic/atomic-instrumented.h:1302 (discriminator 4) ./include/asm-generic/qspinlock.h:111 (discriminator 4) ./include/linux/spinlock.h:187 (discriminator 4) ./include/linux/spinlock_api_smp.h:127 (discriminator 4) kernel/locking/spinlock.c:178 (discriminator 4))
+[ 70.724561] ? netdev_name_node_lookup_rcu (net/core/dev.c:325 (discriminator 1))
+[ 70.724561] __sys_sendto (net/socket.c:730 (discriminator 1) net/socket.c:745 (discriminator 1) net/socket.c:2210 (discriminator 1))
+[ 70.724561] ? __sys_setsockopt (./include/linux/file.h:34 net/socket.c:2355)
+[ 70.724561] __x64_sys_sendto (net/socket.c:2222 (discriminator 1) net/socket.c:2218 (discriminator 1) net/socket.c:2218 (discriminator 1))
+[ 70.724561] do_syscall_64 (arch/x86/entry/common.c:52 (discriminator 1) arch/x86/entry/common.c:83 (discriminator 1))
+[ 70.724561] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)
+[ 70.724561] RIP: 0033:0x41ae09
+
+Fixes: cf9acc90c80ec ("net: virtio_net_hdr_to_skb: count transport header in UFO")
+Reported-by: syzbot <syzkaller@googlegroups.com>
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Cc: Jonathan Davies <jonathan.davies@nutanix.com>
+Reviewed-by: Willem de Bruijn <willemb@google.com>
+Reviewed-by: Jonathan Davies <jonathan.davies@nutanix.com>
+Reviewed-by: David Ahern <dsahern@kernel.org>
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/core/dev.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/core/dev.c b/net/core/dev.c
+index b5c9648c2192f..916a095eaee27 100644
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -3435,7 +3435,7 @@ static void qdisc_pkt_len_init(struct sk_buff *skb)
+ sizeof(_tcphdr), &_tcphdr);
+ if (likely(th))
+ hdr_len += __tcp_hdrlen(th);
+- } else {
++ } else if (shinfo->gso_type & SKB_GSO_UDP_L4) {
+ struct udphdr _udphdr;
+
+ if (skb_header_pointer(skb, skb_transport_offset(skb),
+--
+2.43.0
+
--- /dev/null
+From 30c1a477413c8a6f5a0ff6d47864b5e619a87e84 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 23 Sep 2024 23:49:49 +0200
+Subject: net: ethernet: lantiq_etop: fix memory disclosure
+
+From: Aleksander Jan Bajkowski <olek2@wp.pl>
+
+[ Upstream commit 45c0de18ff2dc9af01236380404bbd6a46502c69 ]
+
+When applying padding, the buffer is not zeroed, which results in memory
+disclosure. The mentioned data is observed on the wire. This patch uses
+skb_put_padto() to pad Ethernet frames properly. The mentioned function
+zeroes the expanded buffer.
+
+In case the packet cannot be padded it is silently dropped. Statistics
+are also not incremented. This driver does not support statistics in the
+old 32-bit format or the new 64-bit format. These will be added in the
+future. In its current form, the patch should be easily backported to
+stable versions.
+
+Ethernet MACs on Amazon-SE and Danube cannot do padding of the packets
+in hardware, so software padding must be applied.
+
+Fixes: 504d4721ee8e ("MIPS: Lantiq: Add ethernet driver")
+Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
+Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
+Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
+Link: https://patch.msgid.link/20240923214949.231511-2-olek2@wp.pl
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/lantiq_etop.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
+index b41822d08649d..d492b8899d32a 100644
+--- a/drivers/net/ethernet/lantiq_etop.c
++++ b/drivers/net/ethernet/lantiq_etop.c
+@@ -478,7 +478,9 @@ ltq_etop_tx(struct sk_buff *skb, struct net_device *dev)
+ unsigned long flags;
+ u32 byte_offset;
+
+- len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
++ if (skb_put_padto(skb, ETH_ZLEN))
++ return NETDEV_TX_OK;
++ len = skb->len;
+
+ if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) || ch->skb[ch->dma.desc]) {
+ netdev_err(dev, "tx ring full\n");
+--
+2.43.0
+
--- /dev/null
+From b7b33e9a4c1cc80822ddd5545b341b6449a0d98d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 26 Sep 2024 18:56:11 +0000
+Subject: netfilter: nf_tables: prevent nf_skb_duplicated corruption
+
+From: Eric Dumazet <edumazet@google.com>
+
+[ Upstream commit 92ceba94de6fb4cee2bf40b485979c342f44a492 ]
+
+syzbot found that nf_dup_ipv4() or nf_dup_ipv6() could write
+per-cpu variable nf_skb_duplicated in an unsafe way [1].
+
+Disabling preemption as hinted by the splat is not enough,
+we have to disable soft interrupts as well.
+
+[1]
+BUG: using __this_cpu_write() in preemptible [00000000] code: syz.4.282/6316
+ caller is nf_dup_ipv4+0x651/0x8f0 net/ipv4/netfilter/nf_dup_ipv4.c:87
+CPU: 0 UID: 0 PID: 6316 Comm: syz.4.282 Not tainted 6.11.0-rc7-syzkaller-00104-g7052622fccb1 #0
+Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
+Call Trace:
+ <TASK>
+ __dump_stack lib/dump_stack.c:93 [inline]
+ dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119
+ check_preemption_disabled+0x10e/0x120 lib/smp_processor_id.c:49
+ nf_dup_ipv4+0x651/0x8f0 net/ipv4/netfilter/nf_dup_ipv4.c:87
+ nft_dup_ipv4_eval+0x1db/0x300 net/ipv4/netfilter/nft_dup_ipv4.c:30
+ expr_call_ops_eval net/netfilter/nf_tables_core.c:240 [inline]
+ nft_do_chain+0x4ad/0x1da0 net/netfilter/nf_tables_core.c:288
+ nft_do_chain_ipv4+0x202/0x320 net/netfilter/nft_chain_filter.c:23
+ nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
+ nf_hook_slow+0xc3/0x220 net/netfilter/core.c:626
+ nf_hook+0x2c4/0x450 include/linux/netfilter.h:269
+ NF_HOOK_COND include/linux/netfilter.h:302 [inline]
+ ip_output+0x185/0x230 net/ipv4/ip_output.c:433
+ ip_local_out net/ipv4/ip_output.c:129 [inline]
+ ip_send_skb+0x74/0x100 net/ipv4/ip_output.c:1495
+ udp_send_skb+0xacf/0x1650 net/ipv4/udp.c:981
+ udp_sendmsg+0x1c21/0x2a60 net/ipv4/udp.c:1269
+ sock_sendmsg_nosec net/socket.c:730 [inline]
+ __sock_sendmsg+0x1a6/0x270 net/socket.c:745
+ ____sys_sendmsg+0x525/0x7d0 net/socket.c:2597
+ ___sys_sendmsg net/socket.c:2651 [inline]
+ __sys_sendmmsg+0x3b2/0x740 net/socket.c:2737
+ __do_sys_sendmmsg net/socket.c:2766 [inline]
+ __se_sys_sendmmsg net/socket.c:2763 [inline]
+ __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2763
+ do_syscall_x64 arch/x86/entry/common.c:52 [inline]
+ do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
+ entry_SYSCALL_64_after_hwframe+0x77/0x7f
+RIP: 0033:0x7f4ce4f7def9
+Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
+RSP: 002b:00007f4ce5d4a038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
+RAX: ffffffffffffffda RBX: 00007f4ce5135f80 RCX: 00007f4ce4f7def9
+RDX: 0000000000000001 RSI: 0000000020005d40 RDI: 0000000000000006
+RBP: 00007f4ce4ff0b76 R08: 0000000000000000 R09: 0000000000000000
+R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
+R13: 0000000000000000 R14: 00007f4ce5135f80 R15: 00007ffd4cbc6d68
+ </TASK>
+
+Fixes: d877f07112f1 ("netfilter: nf_tables: add nft_dup expression")
+Reported-by: syzbot <syzkaller@googlegroups.com>
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/ipv4/netfilter/nf_dup_ipv4.c | 7 +++++--
+ net/ipv6/netfilter/nf_dup_ipv6.c | 7 +++++--
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/net/ipv4/netfilter/nf_dup_ipv4.c b/net/ipv4/netfilter/nf_dup_ipv4.c
+index 39895b9ddeb96..b385c97ddc29b 100644
+--- a/net/ipv4/netfilter/nf_dup_ipv4.c
++++ b/net/ipv4/netfilter/nf_dup_ipv4.c
+@@ -55,8 +55,9 @@ void nf_dup_ipv4(struct net *net, struct sk_buff *skb, unsigned int hooknum,
+ {
+ struct iphdr *iph;
+
++ local_bh_disable();
+ if (this_cpu_read(nf_skb_duplicated))
+- return;
++ goto out;
+ /*
+ * Copy the skb, and route the copy. Will later return %XT_CONTINUE for
+ * the original skb, which should continue on its way as if nothing has
+@@ -64,7 +65,7 @@ void nf_dup_ipv4(struct net *net, struct sk_buff *skb, unsigned int hooknum,
+ */
+ skb = pskb_copy(skb, GFP_ATOMIC);
+ if (skb == NULL)
+- return;
++ goto out;
+
+ #if IS_ENABLED(CONFIG_NF_CONNTRACK)
+ /* Avoid counting cloned packets towards the original connection. */
+@@ -93,6 +94,8 @@ void nf_dup_ipv4(struct net *net, struct sk_buff *skb, unsigned int hooknum,
+ } else {
+ kfree_skb(skb);
+ }
++out:
++ local_bh_enable();
+ }
+ EXPORT_SYMBOL_GPL(nf_dup_ipv4);
+
+diff --git a/net/ipv6/netfilter/nf_dup_ipv6.c b/net/ipv6/netfilter/nf_dup_ipv6.c
+index 4a7ddeddbaabf..941e389c227f3 100644
+--- a/net/ipv6/netfilter/nf_dup_ipv6.c
++++ b/net/ipv6/netfilter/nf_dup_ipv6.c
+@@ -50,11 +50,12 @@ static bool nf_dup_ipv6_route(struct net *net, struct sk_buff *skb,
+ void nf_dup_ipv6(struct net *net, struct sk_buff *skb, unsigned int hooknum,
+ const struct in6_addr *gw, int oif)
+ {
++ local_bh_disable();
+ if (this_cpu_read(nf_skb_duplicated))
+- return;
++ goto out;
+ skb = pskb_copy(skb, GFP_ATOMIC);
+ if (skb == NULL)
+- return;
++ goto out;
+
+ #if IS_ENABLED(CONFIG_NF_CONNTRACK)
+ nf_reset(skb);
+@@ -72,6 +73,8 @@ void nf_dup_ipv6(struct net *net, struct sk_buff *skb, unsigned int hooknum,
+ } else {
+ kfree_skb(skb);
+ }
++out:
++ local_bh_enable();
+ }
+ EXPORT_SYMBOL_GPL(nf_dup_ipv6);
+
+--
+2.43.0
+
--- /dev/null
+From 3c1217a1124e3d108361e4911361e9b8a0982292 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 25 Sep 2024 20:01:20 +0200
+Subject: netfilter: uapi: NFTA_FLOWTABLE_HOOK is NLA_NESTED
+
+From: Phil Sutter <phil@nwl.cc>
+
+[ Upstream commit 76f1ed087b562a469f2153076f179854b749c09a ]
+
+Fix the comment which incorrectly defines it as NLA_U32.
+
+Fixes: 3b49e2e94e6e ("netfilter: nf_tables: add flow table netlink frontend")
+Signed-off-by: Phil Sutter <phil@nwl.cc>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/uapi/linux/netfilter/nf_tables.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
+index 00781db114192..af33a7519b08c 100644
+--- a/include/uapi/linux/netfilter/nf_tables.h
++++ b/include/uapi/linux/netfilter/nf_tables.h
+@@ -1464,7 +1464,7 @@ enum nft_object_attributes {
+ *
+ * @NFTA_FLOWTABLE_TABLE: name of the table containing the expression (NLA_STRING)
+ * @NFTA_FLOWTABLE_NAME: name of this flow table (NLA_STRING)
+- * @NFTA_FLOWTABLE_HOOK: netfilter hook configuration(NLA_U32)
++ * @NFTA_FLOWTABLE_HOOK: netfilter hook configuration (NLA_NESTED)
+ * @NFTA_FLOWTABLE_USE: number of references to this flow table (NLA_U32)
+ * @NFTA_FLOWTABLE_HANDLE: object handle (NLA_U64)
+ */
+--
+2.43.0
+
--- /dev/null
+From d2df8513a85cce438b7461b01403bcf1462cc990 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 1 Oct 2019 01:35:57 -0700
+Subject: r8152: Factor out OOB link list waits
+
+From: Prashant Malani <pmalani@chromium.org>
+
+[ Upstream commit 5f71c84038d39def573744a145c573758f52a949 ]
+
+The same for-loop check for the LINK_LIST_READY bit of an OOB_CTRL
+register is used in several places. Factor these out into a single
+function to reduce the lines of code.
+
+Change-Id: I20e8f327045a72acc0a83e2d145ae2993ab62915
+Signed-off-by: Prashant Malani <pmalani@chromium.org>
+Reviewed-by: Grant Grundler <grundler@chromium.org>
+Acked-by: Hayes Wang <hayeswang@realtek.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Stable-dep-of: 45c0de18ff2d ("net: ethernet: lantiq_etop: fix memory disclosure")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/usb/r8152.c | 73 ++++++++++++-----------------------------
+ 1 file changed, 21 insertions(+), 52 deletions(-)
+
+diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
+index 9c17332c19fd3..2f9daf077e8a7 100644
+--- a/drivers/net/usb/r8152.c
++++ b/drivers/net/usb/r8152.c
+@@ -3007,11 +3007,23 @@ static void r8152b_hw_phy_cfg(struct r8152 *tp)
+ set_bit(PHY_RESET, &tp->flags);
+ }
+
+-static void r8152b_exit_oob(struct r8152 *tp)
++static void wait_oob_link_list_ready(struct r8152 *tp)
+ {
+ u32 ocp_data;
+ int i;
+
++ for (i = 0; i < 1000; i++) {
++ ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
++ if (ocp_data & LINK_LIST_READY)
++ break;
++ usleep_range(1000, 2000);
++ }
++}
++
++static void r8152b_exit_oob(struct r8152 *tp)
++{
++ u32 ocp_data;
++
+ ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR);
+ ocp_data &= ~RCR_ACPT_ALL;
+ ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data);
+@@ -3029,23 +3041,13 @@ static void r8152b_exit_oob(struct r8152 *tp)
+ ocp_data &= ~MCU_BORW_EN;
+ ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data);
+
+- for (i = 0; i < 1000; i++) {
+- ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
+- if (ocp_data & LINK_LIST_READY)
+- break;
+- usleep_range(1000, 2000);
+- }
++ wait_oob_link_list_ready(tp);
+
+ ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7);
+ ocp_data |= RE_INIT_LL;
+ ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data);
+
+- for (i = 0; i < 1000; i++) {
+- ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
+- if (ocp_data & LINK_LIST_READY)
+- break;
+- usleep_range(1000, 2000);
+- }
++ wait_oob_link_list_ready(tp);
+
+ rtl8152_nic_reset(tp);
+
+@@ -3087,7 +3089,6 @@ static void r8152b_exit_oob(struct r8152 *tp)
+ static void r8152b_enter_oob(struct r8152 *tp)
+ {
+ u32 ocp_data;
+- int i;
+
+ ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
+ ocp_data &= ~NOW_IS_OOB;
+@@ -3099,23 +3100,13 @@ static void r8152b_enter_oob(struct r8152 *tp)
+
+ rtl_disable(tp);
+
+- for (i = 0; i < 1000; i++) {
+- ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
+- if (ocp_data & LINK_LIST_READY)
+- break;
+- usleep_range(1000, 2000);
+- }
++ wait_oob_link_list_ready(tp);
+
+ ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7);
+ ocp_data |= RE_INIT_LL;
+ ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data);
+
+- for (i = 0; i < 1000; i++) {
+- ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
+- if (ocp_data & LINK_LIST_READY)
+- break;
+- usleep_range(1000, 2000);
+- }
++ wait_oob_link_list_ready(tp);
+
+ ocp_write_word(tp, MCU_TYPE_PLA, PLA_RMS, RTL8152_RMS);
+
+@@ -3388,7 +3379,6 @@ static void r8153b_hw_phy_cfg(struct r8152 *tp)
+ static void r8153_first_init(struct r8152 *tp)
+ {
+ u32 ocp_data;
+- int i;
+
+ rxdy_gated_en(tp, true);
+ r8153_teredo_off(tp);
+@@ -3408,23 +3398,13 @@ static void r8153_first_init(struct r8152 *tp)
+ ocp_data &= ~MCU_BORW_EN;
+ ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data);
+
+- for (i = 0; i < 1000; i++) {
+- ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
+- if (ocp_data & LINK_LIST_READY)
+- break;
+- usleep_range(1000, 2000);
+- }
++ wait_oob_link_list_ready(tp);
+
+ ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7);
+ ocp_data |= RE_INIT_LL;
+ ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data);
+
+- for (i = 0; i < 1000; i++) {
+- ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
+- if (ocp_data & LINK_LIST_READY)
+- break;
+- usleep_range(1000, 2000);
+- }
++ wait_oob_link_list_ready(tp);
+
+ rtl_rx_vlan_en(tp, tp->netdev->features & NETIF_F_HW_VLAN_CTAG_RX);
+
+@@ -3449,7 +3429,6 @@ static void r8153_first_init(struct r8152 *tp)
+ static void r8153_enter_oob(struct r8152 *tp)
+ {
+ u32 ocp_data;
+- int i;
+
+ ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
+ ocp_data &= ~NOW_IS_OOB;
+@@ -3458,23 +3437,13 @@ static void r8153_enter_oob(struct r8152 *tp)
+ rtl_disable(tp);
+ rtl_reset_bmu(tp);
+
+- for (i = 0; i < 1000; i++) {
+- ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
+- if (ocp_data & LINK_LIST_READY)
+- break;
+- usleep_range(1000, 2000);
+- }
++ wait_oob_link_list_ready(tp);
+
+ ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7);
+ ocp_data |= RE_INIT_LL;
+ ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data);
+
+- for (i = 0; i < 1000; i++) {
+- ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
+- if (ocp_data & LINK_LIST_READY)
+- break;
+- usleep_range(1000, 2000);
+- }
++ wait_oob_link_list_ready(tp);
+
+ ocp_data = tp->netdev->mtu + VLAN_ETH_HLEN + ETH_FCS_LEN;
+ ocp_write_word(tp, MCU_TYPE_PLA, PLA_RMS, ocp_data);
+--
+2.43.0
+
--- /dev/null
+From ed68aa297e18d69115d00b73539f9ce36467fd94 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 30 Sep 2024 16:49:51 -0400
+Subject: sctp: set sk_state back to CLOSED if autobind fails in
+ sctp_listen_start
+
+From: Xin Long <lucien.xin@gmail.com>
+
+[ Upstream commit 8beee4d8dee76b67c75dc91fd8185d91e845c160 ]
+
+In sctp_listen_start() invoked by sctp_inet_listen(), it should set the
+sk_state back to CLOSED if sctp_autobind() fails due to whatever reason.
+
+Otherwise, next time when calling sctp_inet_listen(), if sctp_sk(sk)->reuse
+is already set via setsockopt(SCTP_REUSE_PORT), sctp_sk(sk)->bind_hash will
+be dereferenced as sk_state is LISTENING, which causes a crash as bind_hash
+is NULL.
+
+ KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
+ RIP: 0010:sctp_inet_listen+0x7f0/0xa20 net/sctp/socket.c:8617
+ Call Trace:
+ <TASK>
+ __sys_listen_socket net/socket.c:1883 [inline]
+ __sys_listen+0x1b7/0x230 net/socket.c:1894
+ __do_sys_listen net/socket.c:1902 [inline]
+
+Fixes: 5e8f3f703ae4 ("sctp: simplify sctp listening code")
+Reported-by: syzbot+f4e0f821e3a3b7cee51d@syzkaller.appspotmail.com
+Signed-off-by: Xin Long <lucien.xin@gmail.com>
+Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
+Link: https://patch.msgid.link/a93e655b3c153dc8945d7a812e6d8ab0d52b7aa0.1727729391.git.lucien.xin@gmail.com
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/sctp/socket.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/net/sctp/socket.c b/net/sctp/socket.c
+index c429a1a2bfe23..421b0340b6310 100644
+--- a/net/sctp/socket.c
++++ b/net/sctp/socket.c
+@@ -7845,8 +7845,10 @@ static int sctp_listen_start(struct sock *sk, int backlog)
+ */
+ inet_sk_set_state(sk, SCTP_SS_LISTENING);
+ if (!ep->base.bind_addr.port) {
+- if (sctp_autobind(sk))
++ if (sctp_autobind(sk)) {
++ inet_sk_set_state(sk, SCTP_SS_CLOSED);
+ return -EAGAIN;
++ }
+ } else {
+ if (sctp_get_port(sk, inet_sk(sk)->inet_num)) {
+ inet_sk_set_state(sk, SCTP_SS_CLOSED);
+--
+2.43.0
+
i2c-aspeed-update-the-stop-sw-state-when-the-bus-recovery-occurs.patch
i2c-isch-add-missed-else.patch
usb-yurex-fix-inconsistent-locking-bug-in-yurex_read.patch
+mailbox-rockchip-fix-a-typo-in-module-autoloading.patch
+mailbox-bcm2835-fix-timeout-during-suspend-mode.patch
+ceph-remove-the-incorrect-fw-reference-check-when-di.patch
+netfilter-uapi-nfta_flowtable_hook-is-nla_nested.patch
+netfilter-nf_tables-prevent-nf_skb_duplicated-corrup.patch
+r8152-factor-out-oob-link-list-waits.patch
+net-ethernet-lantiq_etop-fix-memory-disclosure.patch
+net-avoid-potential-underflow-in-qdisc_pkt_len_init-.patch
+net-add-more-sanity-checks-to-qdisc_pkt_len_init.patch
+ipv4-ip_gre-fix-drops-of-small-packets-in-ipgre_xmit.patch
+sctp-set-sk_state-back-to-closed-if-autobind-fails-i.patch