Skip to content

Conversation

@bmastbergen
Copy link
Collaborator

Background

All clean cherry-picks. Two bugfixes.

Commits

    md-raid10: fix KASAN warning

    jira VULN-73365
    cve CVE-2022-50211
    commit-author Mikulas Patocka <[email protected]>
    commit d17f744e883b2f8d13cca252d71cfe8ace346f7d
    ALSA: bcd2000: Fix a UAF bug on the error path of probing

    jira VULN-131355
    cve CVE-2022-50229
    commit-author Zheyu Ma <[email protected]>
    commit ffb2759df7efbc00187bfd9d1072434a13a54139
    net: usb: smsc75xx: Limit packet length to skb->len

    jira VULN-67483
    cve CVE-2023-53125
    commit-author Szymon Heidrich <[email protected]>
    commit d8b228318935044dafe3a5bc07ee71a1f1424b8d
    net: usb: smsc75xx: Move packet length check to prevent kernel panic in skb_pull

    jira VULN-67483
    cve-bf CVE-2023-53125
    commit-author Szymon Heidrich <[email protected]>
    commit 43ffe6caccc7a1bb9d7442fbab521efbf6c1378c
    i40e: fix MMIO write access to an invalid page in i40e_clear_hw

    jira VULN-72058
    cve CVE-2025-38200
    commit-author Kyungwook Boo <[email protected]>
    commit 015bac5daca978448f2671478c553ce1f300c21e
    net/sched: sch_qfq: Fix race condition on qfq_aggregate

    jira VULN-89287
    cve CVE-2025-38477
    commit-author Xiang Mei <[email protected]>
    commit 5e28d5a3f774f118896aec17a3a20a9c5c9dfc64
    net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class

    jira VULN-89287
    cve-bf CVE-2025-38477
    commit-author Xiang Mei <[email protected]>
    commit cf074eca0065bc5142e6004ae236bb35a2687fdf

Build Log

  CLEAN   scripts/selinux/genheaders
  CLEAN   scripts/selinux/mdp
  CLEAN   scripts
  CLEAN   include/config usr/include include/generated arch/x86/include/generated
  CLEAN   .config .config.old .version include/generated/uapi/linux/version.h Module.symvers signing_key.priv signing_key.x509 x509.genkey
[TIMER]{MRPROPER}: 14s
x86_64 architecture detected, copying config
‘configs/kernel-3.10.0-x86_64.config’ -> ‘.config’
Setting Local Version for build
CONFIG_LOCALVERSION="-bmastbergen_ciqcbr7_9_many-vulns-10-3-25-5c16b6a"
Making olddefconfig
--
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --olddefconfig Kconfig
#
# configuration written to .config
#
Starting Build
scripts/kconfig/conf --silentoldconfig Kconfig
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_32.h
--
  H16TOFW firmware/edgeport/down2.fw
  IHEX2FW firmware/whiteheat_loader.fw
  IHEX2FW firmware/keyspan_pda/keyspan_pda.fw
  IHEX2FW firmware/whiteheat.fw
  IHEX2FW firmware/keyspan_pda/xircom_pgs.fw
[TIMER]{BUILD}: 525s
Making Modules
  INSTALL arch/x86/crypto/ablk_helper.ko
  INSTALL arch/x86/crypto/aesni-intel.ko
  INSTALL arch/x86/crypto/blowfish-x86_64.ko
  INSTALL arch/x86/crypto/camellia-aesni-avx-x86_64.ko
--
  INSTALL /lib/firmware/whiteheat_loader.fw
  INSTALL /lib/firmware/whiteheat.fw
  INSTALL /lib/firmware/keyspan_pda/keyspan_pda.fw
  INSTALL /lib/firmware/keyspan_pda/xircom_pgs.fw
  DEPMOD  3.10.0-bmastbergen_ciqcbr7_9_many-vulns-10-3-25-5c16b6a+
[TIMER]{MODULES}: 13s
Making Install
sh ./arch/x86/boot/install.sh 3.10.0-bmastbergen_ciqcbr7_9_many-vulns-10-3-25-5c16b6a+ arch/x86/boot/bzImage \
	System.map "/boot"
[TIMER]{INSTALL}: 45s
Checking kABI
kABI check passed
Setting Default Kernel to /boot/vmlinuz-3.10.0-bmastbergen_ciqcbr7_9_many-vulns-10-3-25-481e971+ and Index to 1
Hopefully Grub2.0 took everything ... rebooting after time metrices
[TIMER]{MRPROPER}: 14s
[TIMER]{BUILD}: 525s
[TIMER]{MODULES}: 13s
[TIMER]{INSTALL}: 45s
[TIMER]{TOTAL} 604s
Rebooting in 10 seconds

Testing

selftest-3.10.0-1160.119.1.el7_9.ciqcbr.8.1.x86_64-1.log

selftest-3.10.0-bmastbergen_ciqcbr7_9_many-vulns-10-3-25-5c16b6a+-1.log

brett@lycia ~/ciq/many-79-vulns-10-3-25
 % grep ^ok selftest-3.10.0-1160.119.1.el7_9.ciqcbr.8.1.x86_64-1.log | wc -l
4
brett@lycia ~/ciq/many-79-vulns-10-3-25
 % grep ^ok selftest-3.10.0-bmastbergen_ciqcbr7_9_many-vulns-10-3-25-5c16b6a+-1.log | wc -l
4
brett@lycia ~/ciq/many-79-vulns-10-3-25
 % grep ok <(diff -adU0 <(grep ^ok selftest-3.10.0-1160.119.1.el7_9.ciqcbr.8.1.x86_64-1.log | sort -h) <(grep ^ok selftest-3.10.0-bmastbergen_ciqcbr7_9_many-vulns-10-3-25-5c16b6a+-1.log | sort -h))
brett@lycia ~/ciq/many-79-vulns-10-3-25
 %

jira VULN-73365
cve CVE-2022-50211
commit-author Mikulas Patocka <[email protected]>
commit d17f744

There's a KASAN warning in raid10_remove_disk when running the lvm
test lvconvert-raid-reshape.sh. We fix this warning by verifying that the
value "number" is valid.

BUG: KASAN: slab-out-of-bounds in raid10_remove_disk+0x61/0x2a0 [raid10]
Read of size 8 at addr ffff889108f3d300 by task mdX_raid10/124682

CPU: 3 PID: 124682 Comm: mdX_raid10 Not tainted 5.19.0-rc6 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x34/0x44
 print_report.cold+0x45/0x57a
 ? __lock_text_start+0x18/0x18
 ? raid10_remove_disk+0x61/0x2a0 [raid10]
 kasan_report+0xa8/0xe0
 ? raid10_remove_disk+0x61/0x2a0 [raid10]
 raid10_remove_disk+0x61/0x2a0 [raid10]
Buffer I/O error on dev dm-76, logical block 15344, async page read
 ? __mutex_unlock_slowpath.constprop.0+0x1e0/0x1e0
 remove_and_add_spares+0x367/0x8a0 [md_mod]
 ? super_written+0x1c0/0x1c0 [md_mod]
 ? mutex_trylock+0xac/0x120
 ? _raw_spin_lock+0x72/0xc0
 ? _raw_spin_lock_bh+0xc0/0xc0
 md_check_recovery+0x848/0x960 [md_mod]
 raid10d+0xcf/0x3360 [raid10]
 ? sched_clock_cpu+0x185/0x1a0
 ? rb_erase+0x4d4/0x620
 ? var_wake_function+0xe0/0xe0
 ? psi_group_change+0x411/0x500
 ? preempt_count_sub+0xf/0xc0
 ? _raw_spin_lock_irqsave+0x78/0xc0
 ? __lock_text_start+0x18/0x18
 ? raid10_sync_request+0x36c0/0x36c0 [raid10]
 ? preempt_count_sub+0xf/0xc0
 ? _raw_spin_unlock_irqrestore+0x19/0x40
 ? del_timer_sync+0xa9/0x100
 ? try_to_del_timer_sync+0xc0/0xc0
 ? _raw_spin_lock_irqsave+0x78/0xc0
 ? __lock_text_start+0x18/0x18
 ? _raw_spin_unlock_irq+0x11/0x24
 ? __list_del_entry_valid+0x68/0xa0
 ? finish_wait+0xa3/0x100
 md_thread+0x161/0x260 [md_mod]
 ? unregister_md_personality+0xa0/0xa0 [md_mod]
 ? _raw_spin_lock_irqsave+0x78/0xc0
 ? prepare_to_wait_event+0x2c0/0x2c0
 ? unregister_md_personality+0xa0/0xa0 [md_mod]
 kthread+0x148/0x180
 ? kthread_complete_and_exit+0x20/0x20
 ret_from_fork+0x1f/0x30
 </TASK>

Allocated by task 124495:
 kasan_save_stack+0x1e/0x40
 __kasan_kmalloc+0x80/0xa0
 setup_conf+0x140/0x5c0 [raid10]
 raid10_run+0x4cd/0x740 [raid10]
 md_run+0x6f9/0x1300 [md_mod]
 raid_ctr+0x2531/0x4ac0 [dm_raid]
 dm_table_add_target+0x2b0/0x620 [dm_mod]
 table_load+0x1c8/0x400 [dm_mod]
 ctl_ioctl+0x29e/0x560 [dm_mod]
 dm_compat_ctl_ioctl+0x7/0x20 [dm_mod]
 __do_compat_sys_ioctl+0xfa/0x160
 do_syscall_64+0x90/0xc0
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

Last potentially related work creation:
 kasan_save_stack+0x1e/0x40
 __kasan_record_aux_stack+0x9e/0xc0
 kvfree_call_rcu+0x84/0x480
 timerfd_release+0x82/0x140
L __fput+0xfa/0x400
 task_work_run+0x80/0xc0
 exit_to_user_mode_prepare+0x155/0x160
 syscall_exit_to_user_mode+0x12/0x40
 do_syscall_64+0x42/0xc0
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

Second to last potentially related work creation:
 kasan_save_stack+0x1e/0x40
 __kasan_record_aux_stack+0x9e/0xc0
 kvfree_call_rcu+0x84/0x480
 timerfd_release+0x82/0x140
 __fput+0xfa/0x400
 task_work_run+0x80/0xc0
 exit_to_user_mode_prepare+0x155/0x160
 syscall_exit_to_user_mode+0x12/0x40
 do_syscall_64+0x42/0xc0
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

The buggy address belongs to the object at ffff889108f3d200
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 0 bytes to the right of
 256-byte region [ffff889108f3d200, ffff889108f3d300)

The buggy address belongs to the physical page:
page:000000007ef2a34c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1108f3c
head:000000007ef2a34c order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=2)
raw: 4000000000010200 0000000000000000 dead000000000001 ffff889100042b40
raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff889108f3d200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff889108f3d280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff889108f3d300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff889108f3d380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff889108f3d400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

	Signed-off-by: Mikulas Patocka <[email protected]>
	Cc: [email protected]
	Signed-off-by: Song Liu <[email protected]>
	Signed-off-by: Jens Axboe <[email protected]>
(cherry picked from commit d17f744)
	Signed-off-by: Brett Mastbergen <[email protected]>
jira VULN-131355
cve CVE-2022-50229
commit-author Zheyu Ma <[email protected]>
commit ffb2759

When the driver fails in snd_card_register() at probe time, it will free
the 'bcd2k->midi_out_urb' before killing it, which may cause a UAF bug.

The following log can reveal it:

[   50.727020] BUG: KASAN: use-after-free in bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000]
[   50.727623] Read of size 8 at addr ffff88810fab0e88 by task swapper/4/0
[   50.729530] Call Trace:
[   50.732899]  bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000]

Fix this by adding usb_kill_urb() before usb_free_urb().

Fixes: b47a222 ("ALSA: MIDI driver for Behringer BCD2000 USB device")
	Signed-off-by: Zheyu Ma <[email protected]>
	Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
	Signed-off-by: Takashi Iwai <[email protected]>
(cherry picked from commit ffb2759)
	Signed-off-by: Brett Mastbergen <[email protected]>
jira VULN-67483
cve CVE-2023-53125
commit-author Szymon Heidrich <[email protected]>
commit d8b2283

Packet length retrieved from skb data may be larger than
the actual socket buffer length (up to 9026 bytes). In such
case the cloned skb passed up the network stack will leak
kernel memory contents.

Fixes: d0cad87 ("smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver")
	Signed-off-by: Szymon Heidrich <[email protected]>
	Signed-off-by: David S. Miller <[email protected]>
(cherry picked from commit d8b2283)
	Signed-off-by: Brett Mastbergen <[email protected]>
…in skb_pull

jira VULN-67483
cve-bf CVE-2023-53125
commit-author Szymon Heidrich <[email protected]>
commit 43ffe6c

Packet length check needs to be located after size and align_count
calculation to prevent kernel panic in skb_pull() in case
rx_cmd_a & RX_CMD_A_RED evaluates to true.

Fixes: d8b2283 ("net: usb: smsc75xx: Limit packet length to skb->len")
	Signed-off-by: Szymon Heidrich <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
	Signed-off-by: Jakub Kicinski <[email protected]>
(cherry picked from commit 43ffe6c)
	Signed-off-by: Brett Mastbergen <[email protected]>
jira VULN-72058
cve CVE-2025-38200
commit-author Kyungwook Boo <[email protected]>
commit 015bac5

When the device sends a specific input, an integer underflow can occur, leading
to MMIO write access to an invalid page.

Prevent the integer underflow by changing the type of related variables.

	Signed-off-by: Kyungwook Boo <[email protected]>
Link: https://lore.kernel.org/lkml/[email protected]/T/
	Reviewed-by: Przemek Kitszel <[email protected]>
	Reviewed-by: Simon Horman <[email protected]>
	Reviewed-by: Aleksandr Loktionov <[email protected]>
	Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)
	Signed-off-by: Tony Nguyen <[email protected]>
(cherry picked from commit 015bac5)
	Signed-off-by: Brett Mastbergen <[email protected]>
jira VULN-89287
cve CVE-2025-38477
commit-author Xiang Mei <[email protected]>
commit 5e28d5a

A race condition can occur when 'agg' is modified in qfq_change_agg
(called during qfq_enqueue) while other threads access it
concurrently. For example, qfq_dump_class may trigger a NULL
dereference, and qfq_delete_class may cause a use-after-free.

This patch addresses the issue by:

1. Moved qfq_destroy_class into the critical section.

2. Added sch_tree_lock protection to qfq_dump_class and
qfq_dump_class_stats.

Fixes: 462dbc9 ("pkt_sched: QFQ Plus: fair-queueing service at DRR cost")
	Signed-off-by: Xiang Mei <[email protected]>
	Reviewed-by: Cong Wang <[email protected]>
	Signed-off-by: David S. Miller <[email protected]>
(cherry picked from commit 5e28d5a)
	Signed-off-by: Brett Mastbergen <[email protected]>
… qfq_delete_class

jira VULN-89287
cve-bf CVE-2025-38477
commit-author Xiang Mei <[email protected]>
commit cf074ec

might_sleep could be trigger in the atomic context in qfq_delete_class.

qfq_destroy_class was moved into atomic context locked
by sch_tree_lock to avoid a race condition bug on
qfq_aggregate. However, might_sleep could be triggered by
qfq_destroy_class, which introduced sleeping in atomic context (path:
qfq_destroy_class->qdisc_put->__qdisc_destroy->lockdep_unregister_key
->might_sleep).

Considering the race is on the qfq_aggregate objects, keeping
qfq_rm_from_agg in the lock but moving the left part out can solve
this issue.

Fixes: 5e28d5a ("net/sched: sch_qfq: Fix race condition on qfq_aggregate")
	Reported-by: Dan Carpenter <[email protected]>
	Signed-off-by: Xiang Mei <[email protected]>
Link: https://patch.msgid.link/[email protected]
	Reviewed-by: Cong Wang <[email protected]>
	Reviewed-by: Dan Carpenter <[email protected]>
Link: https://patch.msgid.link/[email protected]
	Signed-off-by: Paolo Abeni <[email protected]>

(cherry picked from commit cf074ec)
	Signed-off-by: Brett Mastbergen <[email protected]>
@github-actions
Copy link

github-actions bot commented Oct 3, 2025

🔍 Upstream Linux Kernel Commit Check

  • ⚠️ PR commit 873aa349ce55 (net: usb: smsc75xx: Limit packet length to skb->len) references upstream commit
    d8b228318935 which has been referenced by a Fixes: tag in the upstream
    Linux kernel:
    43ffe6caccc7 net: usb: smsc75xx: Move packet length check to prevent kernel panic in skb_pull (Szymon Heidrich)
  • ⚠️ PR commit 17fdda8427d1 (net/sched: sch_qfq: Fix race condition on qfq_aggregate) references upstream commit
    5e28d5a3f774 which has been referenced by a Fixes: tag in the upstream
    Linux kernel:
    cf074eca0065 net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class (Xiang Mei)

This is an automated message from the kernel commit checker workflow.

@bmastbergen
Copy link
Collaborator Author

🔍 Upstream Linux Kernel Commit Check

  • ⚠️ PR commit 873aa349ce55 (net: usb: smsc75xx: Limit packet length to skb->len) references upstream commit
    d8b228318935 which has been referenced by a Fixes: tag in the upstream
    Linux kernel:
    43ffe6caccc7 net: usb: smsc75xx: Move packet length check to prevent kernel panic in skb_pull (Szymon Heidrich)
  • ⚠️ PR commit 17fdda8427d1 (net/sched: sch_qfq: Fix race condition on qfq_aggregate) references upstream commit
    5e28d5a3f774 which has been referenced by a Fixes: tag in the upstream
    Linux kernel:
    cf074eca0065 net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class (Xiang Mei)

This is an automated message from the kernel commit checker workflow.

The bugfix commits are already in the PR

@bmastbergen bmastbergen requested a review from a team October 3, 2025 21:02
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:

Copy link
Collaborator

@kerneltoast kerneltoast left a comment

Choose a reason for hiding this comment

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

Interdiff shows no differences. 🚢

@bmastbergen bmastbergen merged commit d4221b3 into ciqcbr7_9 Oct 6, 2025
2 checks passed
@bmastbergen bmastbergen deleted the bmastbergen_ciqcbr7_9/many-vulns-10-3-25 branch October 6, 2025 13:29
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