| CVE |
Vendors |
Products |
Updated |
CVSS v3.1 |
| In the Linux kernel, the following vulnerability has been resolved:
crypto: rsassa-pkcs1 - reject undersized keys when verifying
rsassa_pkcs1_verify() accepts any nonzero key size.
With a one-byte key and a zero RSA result, the leading-zero handling
decrements dst_len to zero and advances out_buf past the allocation.
The next out_buf[0] access reads out of bounds.
KASAN reports:
BUG: KASAN: slab-out-of-bounds in rsassa_pkcs1_verify+0x79d/0x900
Read of size 1 at addr ...
The buggy address is located 0 bytes to the right of
allocated 73-byte region [...]
Reject keys shorter than the minimum PKCS#1 v1.5 encoded message size. |
| In the Linux kernel, the following vulnerability has been resolved:
ACPI: glue: Carry out companion lookup under bus_type_sem
When acpi_device_notify() looks up an ACPI companion for the given
device, it invokes callbacks from struct acpi_bus_type() without
synchronization which may lead to a use-after-free if the driver
module containing those callbacks is unloaded at the same time.
Address this by holding bus_type_sem throughout the entire ACPI
companion lookup and the execution of the .setup() callback in
struct acpi_bus_type (if present) instead of dropping the semaphore
(prematurely) after finding a matching struct acpi_bus_type.
For this purpose, rename acpi_get_bus_type() to acpi_companion_lookup(),
make it return a struct acpi_device pointer, and move the relevant code
from acpi_device_notify() to it.
Also notice that the only case in which the .bind() callback from an
ACPI scan handler may need to be invoked is when the given device is
a platform one, so adjust acpi_device_notify() accordingly and drop
the "done" label that is not used any more from it. |
| In the Linux kernel, the following vulnerability has been resolved:
md/raid5: give the io_unit slab caches per-array names
Both raid5 log backends create their io_unit slab cache per array but
name it after the struct:
ppl_conf->io_kc = KMEM_CACHE(ppl_io_unit, 0);
log->io_kc = KMEM_CACHE(r5l_io_unit, 0);
KMEM_CACHE() passes the stringified type as the cache name, so every
array that enables PPL or attaches a journal asks for a cache called
"ppl_io_unit" or "r5l_io_unit". With two such arrays live at the same
time the second one trips kmem_cache_sanity_check():
kmem_cache of name 'ppl_io_unit' already exists
WARNING: mm/slab_common.c:112 at __kmem_cache_create_args+0xae/0x460
ppl_init_log+0x285/0x1310 drivers/md/raid5-ppl.c:1363
log_init drivers/md/raid5-log.h:138 [inline]
raid5_change_consistency_policy+0x255/0x740 drivers/md/raid5.c:9141
consistency_policy_store+0x7f/0x230 drivers/md/md.c:5883
md_attr_store+0x3b7/0x640 drivers/md/md.c:6158
which is reachable by any user that can write "ppl" to
md/consistency_policy on two arrays, and equally by assembling two
journalled arrays. The cache is created and destroyed correctly on
every path, so this is a name collision only - duplicate names confuse
slabtop and /proc/slabinfo, which is what the check is there to catch.
Build the name from the array instead, the way grow_stripes() already
does for the stripe_head cache in this driver, and fall back to the
mddev pointer for dm-raid where mdname() is the constant "mdX". The
buffer is sized like conf->cache_name[] because mdname() can return up
to DISK_NAME_LEN bytes.
The explicit size/align arguments keep what KMEM_CACHE() expanded to,
so object layout does not change. |
| In the Linux kernel, the following vulnerability has been resolved:
RDMA/irdma: Use kvzalloc for lvl2 leafmem allocation
During VM live migration or when registering large memory regions
(e.g., guest memory >= 256 GB backed by 4 KiB pages), get_lvl2_pble()
calculates total leaves exceeding ~131,072. The memory required for
lvl2->leafmem.va exceeds 4 MiB (sizeof(*leaf) * total > 5.24 MiB).
Because kzalloc() requires physically contiguous pages, requests larger
than MAX_PAGE_ORDER (4 MiB on x86_64) fail and trigger a warning:
WARNING: CPU: 123 PID: 119906 at mm/page_alloc.c:5997 __alloc_frozen_pages_noprof+0x50c/0x1050
Call Trace:
<TASK>
alloc_frozen_pages_noprof+0xc0/0x240
___kmalloc_large_node+0x3d/0xd0
__kmalloc_large_node_noprof+0x1b/0x90
__kmalloc_noprof+0x254/0x660
get_lvl1_lvl2_pble+0xbc/0x270 [irdma]
irdma_get_pble+0x44/0xc0 [irdma]
irdma_setup_pbles+0x46/0x1d0 [irdma]
irdma_reg_user_mr_type_mem+0x41/0x230 [irdma]
irdma_reg_user_mr+0x194/0x1c0 [irdma]
ib_uverbs_reg_mr+0x1b0/0x2c0 [ib_uverbs]
The leafmem array is purely host software tracking structures (struct
irdma_pble_info) and does not require physically contiguous memory.
Switch the allocation from kzalloc() to kvzalloc() and free it with
kvfree() so that requests exceeding MAX_PAGE_ORDER fall back to
virtually contiguous memory via vmalloc. |
| In the Linux kernel, the following vulnerability has been resolved:
RDMA/siw: Fix qp use-after-free in siw_get_base_qp()
The reference taken by siw_qp_id2obj() is dropped before the address
of the embedded ib_qp is taken from the QP. If that reference was
the last one the QP is freed and the pointer returned to the iwarp
core is dangling; the core only pins the QP with iw_add_ref() after
the call has returned.
Copy the pointer while the reference is still held. |
| In the Linux kernel, the following vulnerability has been resolved:
NFS: use TCP for MOUNT when xprtsec= selects TLS
An NFSv2 or NFSv3 text mount that specifies xprtsec= but no
mountproto= crashes in nfs_init_timeout_values():
RIP: 0010:nfs_init_timeout_values+0x10a/0x110 [nfs]
Call Trace:
nfs_mount+0x1c3/0x330 [nfs]
nfs_try_get_tree+0x1e5/0x460 [nfs]
nfs_get_tree+0x64d/0x6d0 [nfs]
vfs_get_tree+0x2b/0xe0
vfs_cmd_create+0x5f/0xd0
vfs_fsconfig_locked+0x50/0x130
__se_sys_fsconfig+0x2f9/0x3a0
nfs_validate_transport_protocol() sets nfs_server.protocol to
XPRT_TRANSPORT_TCP_TLS when xprtsec= is present, but the switch in
nfs_set_mount_transport_protocol() has no case for that value.
mount_server.protocol stays zero, and nfs_init_timeout_values()
calls BUG() on a transport it does not recognize.
mount.nfs always appends mountproto= after probing the server's
rpcbind, so only a caller that bypasses it, such as "mount -i" or a
program that drives fsconfig() directly, reaches the crash.
Select TCP for MOUNT when the NFS transport is XPRT_TRANSPORT_TCP_TLS.
nfs_mount() requests no transport security, so MOUNT already runs
over plain TCP whenever mount.nfs supplies mountproto=tcp. |
| In the Linux kernel, the following vulnerability has been resolved:
sysctl: unregister tables before freeing bitmap
The table registered for bitmap_0001 retains a pointer to
test_data.bitmap_0001. unregister_sysctl_table() prevents new handlers
from starting and waits for active handlers to finish.
test_sysctl_exit() currently frees the bitmap before unregistering the
table. A concurrent read during module removal can therefore enter
proc_do_large_bitmap() while the bitmap is freed. KASAN reports a
slab-use-after-free in _find_next_bit().
Unregister all tables before freeing the bitmap so the unregister rundown
provides the required lifetime boundary.
The unmodified module reproduced the use-after-free in three KASAN runs.
With this change, three runs each completed 100 load, read and unload race
rounds without a kernel diagnostic. |
| In the Linux kernel, the following vulnerability has been resolved:
powerpc/interrupt: Use early_radix_enabled() in NMI real-mode guard
radix_enabled() uses a jump label which is only valid after
setup_feature_keys() is called. Before that point, on a pSeries
hash guest, early_check_vec5() clears MMU_FTR_TYPE_RADIX in
cur_cpu_spec->mmu_features, but the jump label has not yet been patched,
so radix_enabled() incorrectly returns true.
The dangerous usage window where it goes wrong in early_setup():
early_setup:
configure_exceptions();
<exceptions can happen now, and handler enter/exit can be invoked>
<those could use radix_enabled(), which returns stale true>
setup_feature_keys();
<jump labels set up; post this it is safe to use radix_enabled()>
If an NMI occurs in this window, !radix_enabled() evaluates to false in
DEFINE_INTERRUPT_HANDLER_NMI. The handler fails to skip NMI entry in real
mode and attempts to access memory outside the Real Mode Area (RMA),
hanging the boot.
Since common interrupt wrappers do not have the context of early or late,
using early_radix_enabled() is the safer option. It does a plain bitmask
check against cur_cpu_spec->mmu_features and is correct at all times.
Console logs from a pSeries HASH guest showing values across boot stages:
[ 0.000000] DEBUG: after early_init_devtree: early_radix_enabled=0 radix_enabled=1 (mismatch means NMI real-mode check is unsafe!)
[ 0.000000] DEBUG: after configure_exceptions (DANGEROUS WINDOW): early_radix_enabled=0 radix_enabled=1
[ 0.000000] DEBUG: after setup_feature_keys (jump labels initialized): early_radix_enabled=0 radix_enabled=0 (should now match!)
[ 0.057124] DEBUG: post secondary CPU bringup: early_radix_enabled=0 radix_enabled=0 (should match!)
Console logs from a RADIX guest showing values across boot stages:
[ 0.000000] DEBUG: after early_init_devtree: early_radix_enabled=1 radix_enabled=1 (mismatch means NMI real-mode check is unsafe!)
[ 0.000000] DEBUG: after configure_exceptions (DANGEROUS WINDOW): early_radix_enabled=1 radix_enabled=1
[ 0.000000] DEBUG: after setup_feature_keys (jump labels initialized): early_radix_enabled=1 radix_enabled=1 (should now match!)
[ 0.057016] DEBUG: post secondary CPU bringup: early_radix_enabled=1 radix_enabled=1 (should match!)
Add the missing #include <asm/mmu.h> in alphabetical order since
early_radix_enabled() is declared there. |
| In the Linux kernel, the following vulnerability has been resolved:
rtc: ftrtc010: use devm clock APIs to fix use-after-disable in remove
The driver mixes devm_rtc_register_device() with manual clock
disabling in ftrtc010_rtc_remove(). Because the RTC device was
registered via devm, it remains registered until devres cleanup
runs after .remove() returns. An unprivileged process holding an
open /dev/rtc0 file descriptor could issue ioctl(RTC_RD_TIME)
during this window, triggering MMIO reads on clock-gated hardware
and causing a synchronous external abort.
Replace devm_clk_get() + clk_prepare_enable() with
devm_clk_get_enabled() to tie clock lifecycle to devres. Remove
the manual .remove() callback and the corresponding error handling
labels in ftrtc010_rtc_probe(). |
| In the Linux kernel, the following vulnerability has been resolved:
riscv: dts: spacemit: k3-com260: keep dldo4 enabled
dldo4 on the P1 PMIC is marked regulator-boot-on, but has no consumer
described in the device tree. The regulator core can therefore disable
the firmware-enabled rail during unused-regulator cleanup.
Enabling pcie4_rc on a K3 CoM260 Dev Kit without this change while the
board's included RTL8852BE module is connected to the M.2 E-key slot
results in CPU hard-lock, as seen in kernel log:
[ 32.521536] dldo4: disabling
[ 48.125823] watchdog: CPU3: Watchdog detected hard LOCKUP on cpu 4
[ 64.125829] watchdog: BUG: soft lockup - CPU#1 stuck for 26s!
[ 64.125926] Hardware name: SpacemiT K3 CoM260 IFX (DT)
[ 64.125928] epc : smp_call_function_many_cond+0x158/0x740
[ 64.125938] ra : smp_call_function_many_cond+0x11a/0x740
GitHub Copilot assisted with diagnosis and build and test automation, and
changelog drafting. |
| In the Linux kernel, the following vulnerability has been resolved:
drm/msm/a6xx: fix use-after-free of OPP in a6xx_pm_resume
The OPP reference obtained via dev_pm_opp_find_freq_ceil() is dropped
with dev_pm_opp_put() before being passed to dev_pm_opp_set_opp(). If
the reference count reaches zero, the OPP object may be freed, leading
to a use-after-free when dev_pm_opp_set_opp() dereferences it.
Fix the order of calls: first use the OPP to set the required
performance state, then release the reference.
Patchwork: https://patchwork.freedesktop.org/patch/757104/ |
| In the Linux kernel, the following vulnerability has been resolved:
ALSA: hda: Use linked list for jack table
So far we've used snd_array infrastructure for managing the
hda_jack_tbl elements, but it turned out that this may lead to a UAF
when a different order of destruction procedure is applied; namely,
each hda_jack_tbl object creates a snd_jack object and sets the
private_data pointing to the hda_jack_tbl, and private_free to release
it. It looks harmless, but since snd_array may reallocate the whole
table at growing, the formerly referred jack pointer may become stale.
Fortunately, currently there is no call pattern that triggers this
issue, so it's only hypothetical, but we should address it in anyway.
There are several ways to address this, and at this time, we rather
redesign the hda_jack_tbl allocations: instead of snd_array(), do a
normal kmalloc() + linked list. There will be more kmalloc calls than
the original code, but as the number of jacks are usually at most
handful, it must not be a problem. This change allows us the
persistent jack pointer, so no stale pointer access can happen any
longer.
This also fixes another reported issue about the stale jack pointer
reference in snd_hda_jack_tbl_new(), too. |
| In the Linux kernel, the following vulnerability has been resolved:
powerpc: fix NMI exit ordering: restore soft masks after irqentry_nmi_exit()
When running with CONFIG_PPC_IRQ_SOFT_MASK_DEBUG=y and LOCKDEP=y, an
Oops is triggered during NMI exit:
[ 202.258332] Oops: Exception in kernel mode, sig: 4 [#1]
NIP [000000000003e178] 0x3e178
LR [c00000000003e174] arch_local_irq_restore+0x2a4/0x328
TRAP: 0700 MSR: 0000000000081000 <ME>
The faulting instruction at NIP is a 'trap' (0fe00000) inside the
rfi_flush_fallback trampoline at a userspace-looking low address, reached
after a bad rfid caused by an incorrect SRR0 value.
Root cause:
DEFINE_INTERRUPT_HANDLER_NMI used to call arch_interrupt_nmi_exit_prepare()
*before* irqentry_nmi_exit(), giving this sequence:
arch_interrupt_nmi_enter_prepare() // saves irq_soft_mask, irq_happened
irqentry_nmi_enter() // __nmi_enter() -> nmi_count++, in_nmi()=true
____func(regs) // NMI handler body
arch_interrupt_nmi_exit_prepare() // RESTORES irq_soft_mask=0 (IRQS_ENABLED)
// RESTORES irq_happened with pending bits
irqentry_nmi_exit() // instrumentation block runs here...
trace_hardirqs_on_prepare() // ...with in_nmi()==true still
lockdep_hardirqs_on_prepare() // ...and irq_soft_mask already restored to 0
-> arch_local_irq_restore(0) // mask=0 -> enable path entered
WARN_ON_ONCE(in_nmi()) // FIRES: __nmi_exit() hasn't run yet
__nmi_exit() // nmi_count-- (too late)
arch_interrupt_nmi_exit_prepare() restores irq_soft_mask to whatever
the interrupted thread had (IRQS_ENABLED / 0) and restores irq_happened
with any pending deferred-interrupt bits that were present when the NMI
fired. This is correct and necessary before rfid back to the interrupted
context, but it must not happen until irqentry_nmi_exit() has fully
completed.
With irq_soft_mask=0 and pending bits in irq_happened, the
trace_hardirqs_on_prepare() call inside irqentry_nmi_exit()'s
instrumentation block reaches lockdep_hardirqs_on_prepare() which
calls __trace_hardirqs_on_caller(), which eventually calls
arch_local_irq_restore(0) (the IRQS_ENABLED / enable path).
arch_local_irq_restore() with mask=0 hits the CONFIG_PPC_IRQ_SOFT_MASK_DEBUG
guards at irq_64.c:217:
WARN_ON_ONCE(in_nmi()); // TRUE: __nmi_exit() not yet called
The WARN_ON_ONCE fires a 'trap' instruction (tw 31,0,0 / 0fe00000) in
kernel mode with MSR_PR=0, MSR_IR=0 (real-mode). The program check
handler (TRAP 0700) takes the sig:4 (SIGILL) path via do_program_check()
and calls die(), producing the Oops.
The RESTART_TABLE mechanism in arch_local_irq_restore then causes the
bad rfid that lands at the userspace-looking address visible in the NIP.
The bug is invisible with LOCKDEP=n because trace_hardirqs_on_prepare()
is a no-op when CONFIG_TRACE_IRQFLAGS is not set (TRACE_IRQFLAGS is
selected by PROVE_LOCKING which selects LOCKDEP).
Fix:
Move arch_interrupt_nmi_exit_prepare() to after the irqentry_nmi_exit()
block, so that:
irqentry_nmi_exit() // __nmi_exit() -> nmi_count--, in_nmi()=false
arch_interrupt_nmi_exit_prepare() // now safe to restore soft mask state
The instrumentation inside irqentry_nmi_exit() now executes while
in_nmi() is still true (nmi_count not yet decremented), but
irq_soft_mask is still IRQS_ALL_DISABLED (NMI-entry value), so
arch_local_irq_restore() is never called with mask=0 from that path.
After __nmi_exit() returns, arch_interrupt_nmi_exit_prepare() restores
the pre-NMI soft mask and irq_happened, which is the correct state for
the rfid back to the interrupted context. |
| In the Linux kernel, the following vulnerability has been resolved:
ALSA: timer: Pin the module for userspace timer controllers
The static snd_utimer_ids IDA must remain live until a userspace timer
controller has returned its ID. However, snd_utimer_fops has no owner,
so anon_inode_getfd() does not take a reference to snd-timer for the
controller file.
With CONFIG_SND_TIMER=m and CONFIG_SND_UTIMER=y, userspace can create a
controller with SNDRV_TIMER_IOCTL_CREATE and close the native timer
file. If no timer instances or dependent modules retain snd-timer,
ordinary module unload can then overlap the controller's final release:
Controller final release Module unload
snd_utimer_release()
snd_utimer_free()
snd_timer_free(): unlink provider
snd_utimer_put_id()
enter ida_free()
delete_module()
alsa_timer_exit()
free_module(): free MOD_DATA
access snd_utimer_ids.xa
The provider is already absent from snd_timer_free_all() when unload
runs. Neither register_mutex nor the IDA's lock keeps module storage
resident through the remaining IDA access. That access can therefore
use freed module data and fault while acquiring the XArray lock, as
shown in the Oops below.
Set snd_utimer_fops.owner to THIS_MODULE so anonymous-file creation
takes the existing module reference. The VFS drops it only after
snd_utimer_release() returns, keeping the IDA resident through
ida_free() and preventing ordinary unload during that interval.
Oops report as below:
BUG: unable to handle page fault for address: fffffbfff80480af
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 1a7ff6067 P4D 1a7ff6067 PUD 1a7ff2067 PMD 100ad6067 PTE 0
Oops: Oops: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 485 Comm: alsa-utimer-fix Tainted: G O 7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy)
Tainted: [O]=OOT_MODULE
Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:kasan_byte_accessible+0x15/0x30
Code: 00 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 40 d6 48 b8 00 00 00 00 00 fc ff df 48 c1 ef 03 48 01 c7 <0f> b6 07 3c 07 0f 96 c0 e9 69 f1 2b ff 66 66 2e 0f 1f 84 00 00 00
RSP: 0018:ffff88811a457c48 EFLAGS: 00010086
RAX: dffffc0000000000 RBX: ffffffffc0240578 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff861f111c RDI: fffffbfff80480af
RBP: ffffffffc0240578 R08: 0000000000000001 R09: 0000000000000000
R10: ffffffff891cc057 R11: ffff88811531ba00 R12: ffffffff861f111c
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS: 00007ff190ff7780(0000) GS:ffff8881fda2a000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffbfff80480af CR3: 0000000116890003 CR4: 0000000000770ef0
PKRU: 55555554
Call Trace:
<TASK>
__kasan_check_byte+0x13/0x50
lock_acquire+0x113/0x2f0
? __pfx_pmbd_probe_hit_cookie+0x10/0x10
? lock_release+0xc8/0x280
? srso_alias_return_thunk+0x5/0xfbef5
_raw_spin_lock_irqsave+0x3c/0x60
? ida_free+0xd4/0x2b0
ida_free+0xd4/0x2b0
? __pfx_ida_free+0x10/0x10
? srso_alias_return_thunk+0x5/0xfbef5
? __pfx_locks_remove_file+0x10/0x10
? __fput+0x39f/0xa60
? fput_close_sync+0xff/0x200
? __pfx_fput_close_sync+0x10/0x10
? dnotify_flush+0x22/0x4b0
? __x64_sys_close+0x8c/0xf0
? do_syscall_64+0x115/0x6a0
? entry_SYSCALL_64_after_hwframe+0x77/0x7f
</TASK>
Modules linked in: snd(O) [last unloaded: snd_timer(O)]
CR2: fffffbfff80480af
---[ end trace 0000000000000000 ]--- |
| In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix dangling nodes in tree-mod-log after error in btrfs_tree_mod_log_insert_root()
If in btrfs_tree_mod_log_insert_root() there is an error in the call to
tree_mod_log_insert() (the only possible error is -EEXIST, which means we
have a bug or some memory corruption maybe) we free all the nodes in the
'tm_list' array but we don't remove them from the tree-mod-log rbtree,
which can result in use-after-free bugs later.
So make sure we remove the nodes from the rbtree before freeing them after
an error. |
| In the Linux kernel, the following vulnerability has been resolved:
ALSA: pcm: Protect delay DMA sync against concurrent HW_FREE
A PCM DMA buffer must remain allocated until explicit DMA synchronization
finishes. snd_pcm_delay() calls snd_pcm_dma_buffer_sync() after dropping
the stream lock, without participating in the buffer-access exclusion
used by HW_FREE.
With a managed NONCONTIG buffer requiring explicit sync, HW_PARAMS can
allocate a separate runtime descriptor when the requested ring exceeds
the preallocation. In PREPARED state with mmap_count zero, concurrent
HWSYNC and HW_FREE calls on the same open PCM file can interleave:
1. HWSYNC checks the state in snd_pcm_delay() under the stream lock and
releases that lock.
2. The sync helper fetches runtime->dma_buffer_p and enters
snd_dma_noncontig_sync() with that descriptor.
3. HW_FREE takes the negative buffer-access count, checks PREPARED under
the stream lock, releases the lock, and frees the DMA allocation and
dynamic descriptor through snd_pcm_lib_free_pages().
4. The sync callback resumes and reads the freed descriptor.
The stream lock does not cover the allocation's release, and the sync
operation has no positive buffer-access count to prevent it. The stale
read causes a use-after-free in snd_dma_noncontig_sync(). DELAY uses the
same snd_pcm_delay() path.
Take a positive buffer-access count before checking the state and keep it
until the DMA sync finishes, as the transfer and mmap paths already do.
HW_FREE then returns -EBUSY while this access is active. If a buffer
writer has already entered, snd_pcm_delay() returns -EBUSY before using
the buffer. Keep the sync outside the stream lock and balance the count
on the state-error path as well.
KASAN report as below:
BUG: KASAN: slab-use-after-free in snd_dma_noncontig_sync+0x295/0x310 [snd_pcm]
Read of size 4 at addr ffff888108f58584 by task pcm-uaf-fixture/487
CPU: 1 UID: 0 PID: 487 Comm: pcm-uaf-fixture Not tainted 7.2.0-rc6-pmb-alsa-functional-v2+ #1 PREEMPT(lazy)
Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0x93/0xd0
print_report+0xce/0x630
? snd_dma_noncontig_sync+0x295/0x310 [snd_pcm]
? srso_alias_return_thunk+0x5/0xfbef5
? __virt_addr_valid+0x20d/0x410
? snd_dma_noncontig_sync+0x295/0x310 [snd_pcm]
kasan_report+0xe0/0x110
? snd_dma_noncontig_sync+0x295/0x310 [snd_pcm]
? __pfx_snd_dma_noncontig_sync+0x10/0x10 [snd_pcm]
snd_dma_noncontig_sync+0x295/0x310 [snd_pcm]
? __pfx_snd_dma_noncontig_sync+0x10/0x10 [snd_pcm]
snd_dma_buffer_sync+0xc9/0x110 [snd_pcm]
snd_pcm_delay+0x3bd/0x550 [snd_pcm]
snd_pcm_common_ioctl+0x1e7/0x3aa0 [snd_pcm]
? srso_alias_return_thunk+0x5/0xfbef5
? do_vfs_ioctl+0x1f5/0x1280
? __pfx_do_vfs_ioctl+0x10/0x10
? ioctl_has_perm.constprop.0.isra.0+0x34f/0x500
? __pfx_snd_pcm_common_ioctl+0x10/0x10 [snd_pcm]
? srso_alias_return_thunk+0x5/0xfbef5
snd_pcm_ioctl+0x76/0xb0 [snd_pcm]
? __pfx_snd_pcm_ioctl+0x10/0x10 [snd_pcm]
__x64_sys_ioctl+0x163/0x1d0
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1cae7ab91b
Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
RSP: 002b:00007ffe12d544f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f1cae7ab91b
RDX: 0000000000000000 RSI: 0000000000004122 RDI: 0000000000000003
RBP: 00000000000001ee R08: 0000000000000073 R09: 00000000ffffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
R13: 0000000000000001 R14: 00005584f32b1398 R15: 00005584f32b2ce8
</TASK>
Allocated by task 487:
kasan_sa
---truncated--- |
| In the Linux kernel, the following vulnerability has been resolved:
thermal/drivers/qcom-spmi-temp-alarm: Fix temp_map indexing
Fix the following issue noticed when booting on the db845c-dragonboard:
BUG: KASAN: global-out-of-bounds in qpnp_tm_sync_thresholds+0x11c/0x180 [qcom_spmi_temp_alarm]
Read of size 24 at addr ffffdd2495f01200 by task (udev-worker)/371
CPU: 3 UID: 0 PID: 371 Comm: (udev-worker) Not tainted 7.3.0-rc3 #116 PREEMPT
Hardware name: Thundercomm Dragonboard 845c (DT)
Call trace:
show_stack+0x18/0x24 (C)
dump_stack_lvl+0xa4/0xf4
print_report+0x1f4/0x5ac
kasan_report+0x84/0xcc
kasan_check_range+0xf0/0x1a4
memcpy+0x3c/0xa4
qpnp_tm_sync_thresholds+0x11c/0x180 [qcom_spmi_temp_alarm]
qpnp_tm_probe+0x3dc/0xae8 [qcom_spmi_temp_alarm]
platform_probe+0xc4/0x18c
really_probe+0x17c/0x4fc
...
The buggy address belongs to the variable:
temp_map_gen1+0x60/0xc4 [qcom_spmi_temp_alarm]
It looks like temp_map is a pointer to the complete temperature map.
Indexing it directly advances the entire map, rather than selecting a
threshold row.
Fix this by dereferencing the temp_map before indexing it to select the
requested threshold row. |
| In the Linux kernel, the following vulnerability has been resolved:
iomap: follow the alignment requirement for iomap_dio_hole_iter()
[BUG]
On the latest development branch, btrfs with 8K block size on 4K page
sized systems will fail all test cases that run fsstress.
One very short example would be:
# $fsstress -n 4 -d $mnt -s 1785675805 -v
0/0: dwrite - no filename
0/1: creat f0 x:0 0 0
0/1: creat add id=0,parent=-1
0/2: write dontcache f0[259 1 0 0 0 0] [816411,3620] 0
0/3: dread - xfsctl(XFS_IOC_DIOINFO) f0[259 1 0 0 32 820031] return 25, fallback to stat()
0/3: dread f0[259 1 0 0 32 820031] [483328,81920] 0
Which triggered the following ASSERT():
assertion failed: IS_ALIGNED(state->start, blocksize) && IS_ALIGNED(state->end + 1, blocksize), in fs/btrfs/extent-io-tree.c:346 (unaligned extent state, blocksize=8192 start=487424 end=565247 state=0x0)
------------[ cut here ]------------
kernel BUG at fs/btrfs/extent-io-tree.c:346!
Oops: invalid opcode: 0000 [#1] SMP
CPU: 4 UID: 0 PID: 648 Comm: fsstress Tainted: G E 7.2.0-rc5-custom+ #431 PREEMPT(full) 7c507bd40d65e4d871e698b22d80f1306bbec543
Tainted: [E]=UNSIGNED_MODULE
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 02/02/2022
RIP: 0010:validate_extent_state.part.0.isra.0.cold+0x24/0x26 [btrfs]
Call Trace:
<TASK>
insert_state+0x34/0x1a0 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8]
set_extent_bit+0x440/0x8d0 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8]
btrfs_lock_extent_bits+0x58/0x380 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8]
btrfs_dio_iomap_begin+0x319/0xb70 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8]
iomap_iter+0x1a2/0x370
__iomap_dio_rw+0x236/0x8d0
iomap_dio_rw+0x12/0x30
btrfs_direct_read+0x15f/0x290 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8]
btrfs_file_read_iter+0x42/0x90 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8]
vfs_read+0x25e/0x380
ksys_read+0x73/0xe0
do_syscall_64+0xe1/0x790
entry_SYSCALL_64_after_hwframe+0x4b/0x53
RIP: 0033:0x7fc3f129318e
</TASK>
[CAUSE]
iomap_dio_hole_iter() is responsible for zeroing out the buffer for a
hole, which calls iov_iter_zero() to zero the range.
However btrfs disables page fault during its __iomap_dio_rw() call, so
iov_iter_zero() can fail at any page boundary.
When the fs block size is larger than page size, iov_iter_zero() may
only have zeroed one page, which is not aligned to the fs block size.
Such one page long range is passed back to btrfs, which triggers the
above ASSERT().
[FIX]
For iomap_dio_hole_iter() round down the copied length, and revert
any excessive range that is beyond the aligned copied length.
Also use @aligned_copied for the size increment and iter advancement.
This should only affect btrfs, which is the only fs utilizing iomap dio
with page fault disabled. |
| In the Linux kernel, the following vulnerability has been resolved:
ALSA: pcm: Protect delay DMA sync in forward and rewind, too
Like the previous fix for snd_pcm_delay() (in the commit 50f413b83b31
"ALSA: pcm: Protect delay DMA sync against concurrent HW_FREE"), the
snd_pcm_dma_buffer_sync() call in snd_pcm_forward() and
snd_pcm_rewind() needs the similar protection against the concurrent
hw_free action for avoiding potential UAFs. |
| In the Linux kernel, the following vulnerability has been resolved:
ALSA: vmaster: Serialize hook registration with control callbacks
An HDA virtual-master hook must have its private argument initialized
before a control callback can invoke it. snd_hda_add_vmaster_hook()
installs the trampoline through snd_ctl_add_vmaster_hook(), which stores
master->hook before master->hook_private_data without serialization.
When a codec with a vmaster mute hook binds to an already registered
card, snd_hda_gen_build_controls() publishes and initializes the Master
Playback Switch before installing the hook. A native write that changes
the switch can then run in the following order:
1. The codec bind path publishes and initializes the master control in
__snd_hda_add_vmaster(), then calls snd_hda_add_vmaster_hook().
2. The hook setter stores master->hook, but has not yet stored its
private argument.
3. SNDRV_CTL_IOCTL_ELEM_WRITE takes controls_rwsem and calls
master_put() while the setter remains between those stores.
4. master_put() sees the callback and invokes vmaster_hook() with a
NULL argument. The trampoline dereferences it before the setter
can complete publication.
The write lock held by snd_ctl_elem_write() does not exclude the hook
setter, so this can cause a NULL pointer dereference. Take the same
controls_rwsem for writing inside snd_ctl_add_vmaster_hook() so the
callback and its argument are installed together with respect to
native control callbacks. Pass the card into the helper and update
the HDA caller, keeping the lock in the ALSA core. Release it when
registration returns, before the caller synchronizes the hook.
KASAN report as below:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 1 UID: 0 PID: 499 Comm: alsa-vmaster-tr Not tainted 7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy)
Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:vmaster_hook+0x35/0xb0
Code: f5 53 48 89 fb 48 83 ec 08 e8 57 f0 9a fc eb 50 e8 50 f0 9a fc 48 8d 7b 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 59 48 8d 7b 10 48 8b 43 08 48 ba 00 00 00 00 00 fc
RSP: 0018:ffff888117647cd0 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff84e9ff50
RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff89427457 R11: ffff888115ad1d00 R12: ffffffff84e9ff30
R13: ffff888114943ca0 R14: 0000000000000000 R15: 0000000000000001
FS: 00007fe8167b3780(0000) GS:ffff88826b7e3000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000557c8c2842a8 CR3: 000000011579f005 CR4: 0000000000770ef0
PKRU: 55555554
Call Trace:
<TASK>
master_put+0x20e/0x2b0
snd_ctl_elem_write+0x37f/0x5e0
snd_ctl_ioctl+0x997/0xdd0
? __pfx_snd_ctl_ioctl+0x10/0x10
? srso_alias_return_thunk+0x5/0xfbef5
? selinux_file_ioctl+0xaa/0x280
? __pfx_snd_ctl_ioctl+0x10/0x10
__x64_sys_ioctl+0x163/0x1d0
do_syscall_64+0x115/0x6a0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe8168c291b
Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
RSP: 002b:00007fffab0cb150 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fe8168c291b
RDX: 00007fffab0cb310 RSI: 00000000c4c85513 RDI: 0000000000000003
RBP: 00007fffab0cb310 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007fff
---truncated--- |