Skip to content

Conversation

@shreeya-patel98
Copy link
Collaborator

Commits

    tcp: Don't call reqsk_fastopen_remove() in tcp_conn_request().
    
    jira VULN-160312
    cve CVE-2025-40186
    commit-author Kuniyuki Iwashima <kuniyu@google.com>
    commit 2e7cbbbe3d61c63606994b7ff73c72537afe2e1c
    tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect().
    
    jira VULN-158533
    cve CVE-2025-39955
    commit-author Kuniyuki Iwashima <kuniyu@google.com>
    commit 45c8a6cc2bcd780e634a6ba8e46bffbdf1fc5c01
    wifi: cfg80211: fix use-after-free in cmp_bss()
    
    jira VULN-156101
    cve CVE-2025-39864
    commit-author Dmitry Antipov <dmantipov@yandex.ru>
    commit 26e84445f02ce6b2fe5f3e0e28ff7add77f35e08
    scsi: qla2xxx: Wait for io return on terminate rport
   
   jira VULN-155089
   cve CVE-2023-53322
   commit-author Quinn Tran <qutran@marvell.com>
   commit fc0cba0c7be8261a1625098bd1d695077ec621c9
   
    scsi: lpfc: Fix buffer free/clear order in deferred receive path
    
    jira VULN-156035
    cve CVE-2025-39841
    commit-author John Evans <evans1210144@gmail.com>
    commit 9dba9a45c348e8460da97c450cddf70b2056deb3

Kernel Build

/mnt/scratch/workspace/fips-9-compliant/kernel-src-tree
Skipping make mrproper
[TIMER]{MRPROPER}: 0s
x86_64 architecture detected, copying config
'configs/kernel-x86_64-rhel.config' -> '.config'
Setting Local Version for build
CONFIG_LOCALVERSION="-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7"
Making olddefconfig
#
# configuration written to .config
#
Starting Build
  SYNC    include/config/auto.conf.cmd
  DESCEND objtool
  DESCEND bpf/resolve_btfids
  HOSTCC  /mnt/scratch/workspace/fips-9-compliant/kernel-src-tree/tools/bpf/resolve_btfids/fixdep.o
  HOSTCC  /mnt/scratch/workspace/fips-9-compliant/kernel-src-tree/tools/objtool/fixdep.o
  HOSTLD  /mnt/scratch/workspace/fips-9-compliant/kernel-src-tree/tools/bpf/resolve_btfids/fixdep-in.o
  CC      scripts/mod/empty.o
  CC      scripts/mod/devicetable-offsets.s
  LINK    /mnt/scratch/workspace/fips-9-compliant/kernel-src-tree/tools/bpf/resolve_btfids/fixdep
  HOSTLD  /mnt/scratch/workspace/fips-9-compliant/kernel-src-tree/tools/objtool/fixdep-in.o
  LINK    /mnt/scratch/workspace/fips-9-compliant/kernel-src-tree/tools/objtool/fixdep
  CC      /mnt/scratch/workspace/fips-9-compliant/kernel-src-tree/tools/bpf/resolve_btfids/main.o
  CC      /mnt/scratch/workspace/fips-9-compliant/kernel-src-tree/tools/bpf/resolve_btfids/rbtree.o
  CC      /mnt/scratch/workspace/fips-9-compliant/kernel-src-tree/tools/bpf/resolve_btfids/string.o
  CC      /mnt/scratch/workspace/fips-9-compliant/kernel-src-tree/tools/bpf/resolve_btfids/ctype.o
  CC      /mnt/scratch/workspace/fips-9-compliant/kernel-src-tree/tools/bpf/resolve_btfids/str_error_r.o
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/mod/modpost.o
  <--snip-->
  SIGN    /lib/modules/5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+/kernel/sound/x86/snd-hdmi-lpe-audio.ko
  SIGN    /lib/modules/5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+/kernel/virt/lib/irqbypass.ko
  SIGN    /lib/modules/5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+/kernel/sound/soc/sof/intel/snd-sof-acpi-intel-byt.ko
  DEPMOD  /lib/modules/5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+
[TIMER]{MODULES}: 11s
Making Install
sh ./arch/x86/boot/install.sh \
	5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+ arch/x86/boot/bzImage \
	System.map "/boot"
sed: can't read /boot/.vmlinuz-5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+.hmac: No such file or directory
Can't create '/boot/.vmlinuz-0-rescue-553e9e7e5cc4484684bd4bf84cea2945.hmac' from '/boot/.vmlinuz-5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+.hmac'!
[TIMER]{INSTALL}: 39s
Checking kABI
kABI check passed
Setting Default Kernel to /boot/vmlinuz-5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+ and Index to 0
The default is /boot/loader/entries/553e9e7e5cc4484684bd4bf84cea2945-5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+.conf with index 0 and kernel /boot/vmlinuz-5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+
The default is /boot/loader/entries/553e9e7e5cc4484684bd4bf84cea2945-5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+.conf with index 0 and kernel /boot/vmlinuz-5.14.0-shreeya_fips-9-compliant_5.14.0-284.30.1-385c1365cca7+
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
Hopefully Grub2.0 took everything ... rebooting after time metrices
[TIMER]{MRPROPER}: 0s
[TIMER]{BUILD}: 1551s
[TIMER]{MODULES}: 11s
[TIMER]{INSTALL}: 39s
[TIMER]{TOTAL} 1604s
Rebooting in 10 seconds

kernel-build.log

Kselftest

shreeya@spatel-dev-bom ~/c/w/fips-9-compliant> grep -a ^ok kselftest-before.log | wc -l
317
shreeya@spatel-dev-bom ~/c/w/fips-9-compliant> grep -a ^ok kselftest-after.log | wc -l
317
shreeya@spatel-dev-bom ~/c/w/fips-9-compliant> 

kselftest-after.log
kselftest-before.log

jira VULN-156035
cve CVE-2025-39841
commit-author John Evans <evans1210144@gmail.com>
commit 9dba9a4

Fix a use-after-free window by correcting the buffer release sequence in
the deferred receive path. The code freed the RQ buffer first and only
then cleared the context pointer under the lock. Concurrent paths (e.g.,
ABTS and the repost path) also inspect and release the same pointer under
the lock, so the old order could lead to double-free/UAF.

Note that the repost path already uses the correct pattern: detach the
pointer under the lock, then free it after dropping the lock. The
deferred path should do the same.

Fixes: 472e146 ("scsi: lpfc: Correct upcalling nvmet_fc transport during io done downcall")
	Cc: stable@vger.kernel.org
	Signed-off-by: John Evans <evans1210144@gmail.com>
Link: https://lore.kernel.org/r/20250828044008.743-1-evans1210144@gmail.com
	Reviewed-by: Justin Tee <justin.tee@broadcom.com>
	Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 9dba9a4)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira VULN-155089
cve CVE-2023-53322
commit-author Quinn Tran <qutran@marvell.com>
commit fc0cba0

System crash due to use after free.
Current code allows terminate_rport_io to exit before making
sure all IOs has returned. For FCP-2 device, IO's can hang
on in HW because driver has not tear down the session in FW at
first sign of cable pull. When dev_loss_tmo timer pops,
terminate_rport_io is called and upper layer is about to
free various resources. Terminate_rport_io trigger qla to do
the final cleanup, but the cleanup might not be fast enough where it
leave qla still holding on to the same resource.

Wait for IO's to return to upper layer before resources are freed.

	Cc: stable@vger.kernel.org
	Signed-off-by: Quinn Tran <qutran@marvell.com>
	Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230428075339.32551-7-njavali@marvell.com
	Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
	Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit fc0cba0)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira VULN-156101
cve CVE-2025-39864
commit-author Dmitry Antipov <dmantipov@yandex.ru>
commit 26e8444

Following bss_free() quirk introduced in commit 776b358
("cfg80211: track hidden SSID networks properly"), adjust
cfg80211_update_known_bss() to free the last beacon frame
elements only if they're not shared via the corresponding
'hidden_beacon_bss' pointer.

	Reported-by: syzbot+30754ca335e6fb7e3092@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=30754ca335e6fb7e3092
Fixes: 3ab8227 ("cfg80211: refactor cfg80211_bss_update")
	Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://patch.msgid.link/20250813135236.799384-1-dmantipov@yandex.ru
	Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit 26e8444)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira VULN-158533
cve CVE-2025-39955
commit-author Kuniyuki Iwashima <kuniyu@google.com>
commit 45c8a6c

syzbot reported the splat below where a socket had tcp_sk(sk)->fastopen_rsk
in the TCP_ESTABLISHED state. [0]

syzbot reused the server-side TCP Fast Open socket as a new client before
the TFO socket completes 3WHS:

  1. accept()
  2. connect(AF_UNSPEC)
  3. connect() to another destination

As of accept(), sk->sk_state is TCP_SYN_RECV, and tcp_disconnect() changes
it to TCP_CLOSE and makes connect() possible, which restarts timers.

Since tcp_disconnect() forgot to clear tcp_sk(sk)->fastopen_rsk, the
retransmit timer triggered the warning and the intended packet was not
retransmitted.

Let's call reqsk_fastopen_remove() in tcp_disconnect().

[0]:
WARNING: CPU: 2 PID: 0 at net/ipv4/tcp_timer.c:542 tcp_retransmit_timer (net/ipv4/tcp_timer.c:542 (discriminator 7))
Modules linked in:
CPU: 2 UID: 0 PID: 0 Comm: swapper/2 Not tainted 6.17.0-rc5-g201825fb4278 #62 PREEMPT(voluntary)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:tcp_retransmit_timer (net/ipv4/tcp_timer.c:542 (discriminator 7))
Code: 41 55 41 54 55 53 48 8b af b8 08 00 00 48 89 fb 48 85 ed 0f 84 55 01 00 00 0f b6 47 12 3c 03 74 0c 0f b6 47 12 3c 04 74 04 90 <0f> 0b 90 48 8b 85 c0 00 00 00 48 89 ef 48 8b 40 30 e8 6a 4f 06 3e
RSP: 0018:ffffc900002f8d40 EFLAGS: 00010293
RAX: 0000000000000002 RBX: ffff888106911400 RCX: 0000000000000017
RDX: 0000000002517619 RSI: ffffffff83764080 RDI: ffff888106911400
RBP: ffff888106d5c000 R08: 0000000000000001 R09: ffffc900002f8de8
R10: 00000000000000c2 R11: ffffc900002f8ff8 R12: ffff888106911540
R13: ffff888106911480 R14: ffff888106911840 R15: ffffc900002f8de0
FS:  0000000000000000(0000) GS:ffff88907b768000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8044d69d90 CR3: 0000000002c30003 CR4: 0000000000370ef0
Call Trace:
 <IRQ>
 tcp_write_timer (net/ipv4/tcp_timer.c:738)
 call_timer_fn (kernel/time/timer.c:1747)
 __run_timers (kernel/time/timer.c:1799 kernel/time/timer.c:2372)
 timer_expire_remote (kernel/time/timer.c:2385 kernel/time/timer.c:2376 kernel/time/timer.c:2135)
 tmigr_handle_remote_up (kernel/time/timer_migration.c:944 kernel/time/timer_migration.c:1035)
 __walk_groups.isra.0 (kernel/time/timer_migration.c:533 (discriminator 1))
 tmigr_handle_remote (kernel/time/timer_migration.c:1096)
 handle_softirqs (./arch/x86/include/asm/jump_label.h:36 ./include/trace/events/irq.h:142 kernel/softirq.c:580)
 irq_exit_rcu (kernel/softirq.c:614 kernel/softirq.c:453 kernel/softirq.c:680 kernel/softirq.c:696)
 sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1050 (discriminator 35) arch/x86/kernel/apic/apic.c:1050 (discriminator 35))
 </IRQ>

Fixes: 8336886 ("tcp: TCP Fast Open Server - support TFO listeners")
	Reported-by: syzkaller <syzkaller@googlegroups.com>
	Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250915175800.118793-2-kuniyu@google.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 45c8a6c)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira VULN-160312
cve CVE-2025-40186
commit-author Kuniyuki Iwashima <kuniyu@google.com>
commit 2e7cbbb

syzbot reported the splat below in tcp_conn_request(). [0]

If a listener is close()d while a TFO socket is being processed in
tcp_conn_request(), inet_csk_reqsk_queue_add() does not set reqsk->sk
and calls inet_child_forget(), which calls tcp_disconnect() for the
TFO socket.

After the cited commit, tcp_disconnect() calls reqsk_fastopen_remove(),
where reqsk_put() is called due to !reqsk->sk.

Then, reqsk_fastopen_remove() in tcp_conn_request() decrements the
last req->rsk_refcnt and frees reqsk, and __reqsk_free() at the
drop_and_free label causes the refcount underflow for the listener
and double-free of the reqsk.

Let's remove reqsk_fastopen_remove() in tcp_conn_request().

Note that other callers make sure tp->fastopen_rsk is not NULL.

[0]:
refcount_t: underflow; use-after-free.
WARNING: CPU: 12 PID: 5563 at lib/refcount.c:28 refcount_warn_saturate (lib/refcount.c:28)
Modules linked in:
CPU: 12 UID: 0 PID: 5563 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:refcount_warn_saturate (lib/refcount.c:28)
Code: ab e8 8e b4 98 ff 0f 0b c3 cc cc cc cc cc 80 3d a4 e4 d6 01 00 75 9c c6 05 9b e4 d6 01 01 48 c7 c7 e8 df fb ab e8 6a b4 98 ff <0f> 0b e9 03 5b 76 00 cc 80 3d 7d e4 d6 01 00 0f 85 74 ff ff ff c6
RSP: 0018:ffffa79fc0304a98 EFLAGS: 00010246
RAX: d83af4db1c6b3900 RBX: ffff9f65c7a69020 RCX: d83af4db1c6b3900
RDX: 0000000000000000 RSI: 00000000ffff7fff RDI: ffffffffac78a280
RBP: 000000009d781b60 R08: 0000000000007fff R09: ffffffffac6ca280
R10: 0000000000017ffd R11: 0000000000000004 R12: ffff9f65c7b4f100
R13: ffff9f65c7d23c00 R14: ffff9f65c7d26000 R15: ffff9f65c7a64ef8
FS:  00007f9f962176c0(0000) GS:ffff9f65fcf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000000180 CR3: 000000000dbbe006 CR4: 0000000000372ef0
Call Trace:
 <IRQ>
 tcp_conn_request (./include/linux/refcount.h:400 ./include/linux/refcount.h:432 ./include/linux/refcount.h:450 ./include/net/sock.h:1965 ./include/net/request_sock.h:131 net/ipv4/tcp_input.c:7301)
 tcp_rcv_state_process (net/ipv4/tcp_input.c:6708)
 tcp_v6_do_rcv (net/ipv6/tcp_ipv6.c:1670)
 tcp_v6_rcv (net/ipv6/tcp_ipv6.c:1906)
 ip6_protocol_deliver_rcu (net/ipv6/ip6_input.c:438)
 ip6_input (net/ipv6/ip6_input.c:500)
 ipv6_rcv (net/ipv6/ip6_input.c:311)
 __netif_receive_skb (net/core/dev.c:6104)
 process_backlog (net/core/dev.c:6456)
 __napi_poll (net/core/dev.c:7506)
 net_rx_action (net/core/dev.c:7569 net/core/dev.c:7696)
 handle_softirqs (kernel/softirq.c:579)
 do_softirq (kernel/softirq.c:480)
 </IRQ>

Fixes: 45c8a6c ("tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect().")
	Reported-by: syzkaller <syzkaller@googlegroups.com>
	Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20251001233755.1340927-1-kuniyu@google.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 2e7cbbb)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
@shreeya-patel98 shreeya-patel98 requested a review from a team December 24, 2025 13:32
@github-actions
Copy link

🔍 Interdiff Analysis

  • ⚠️ PR commit 71da35ea188 (scsi: lpfc: Fix buffer free/clear order in deferred receive path) → upstream 9dba9a45c348
    Differences found:
diff -u b/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
--- b/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -1261,6 +1264,8 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
 				ctxp->oxid, ctxp->flag, ctxp->state);
 		return;
 	}
+	ctxp->rqb_buffer = NULL;
+	spin_unlock_irqrestore(&ctxp->ctxlock, iflag);
 
 	tgtp = phba->targetport->private;
 	if (tgtp)
@@ -1263,6 +1266,8 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 				ctxp->oxid, ctxp->flag, ctxp->state);
 		return;
 	}
+	ctxp->rqb_buffer = NULL;
+	spin_unlock_irqrestore(&ctxp->ctxlock, iflag);
 
 	tgtp = phba->targetport->private;
 	if (tgtp)
  • ⚠️ PR commit cc7841bfdc6 (tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect().) → upstream 45c8a6cc2bcd
    Differences found:
diff -u b/net/ipv4/tcp.c b/net/ipv4/tcp.c
--- b/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3151,3 +3151,3 @@
 	tcp_free_fastopen_req(tp);
-	inet_clear_bit(DEFER_CONNECT, sk);
+	inet->defer_connect = 0;
 	tp->fastopen_client_fail = 0;

This is an automated interdiff check for backported commits.

Copy link
Collaborator

@PlaidCat PlaidCat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@shreeya-patel98 shreeya-patel98 merged commit ddb1714 into fips-9-compliant/5.14.0-284.30.1 Dec 24, 2025
3 checks passed
@shreeya-patel98 shreeya-patel98 deleted the {shreeya}_fips-9-compliant/5.14.0-284.30.1 branch December 24, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants