CVE-2024-27031 – NFS: Fix nfs_netfs_issue_read() xarray locking for writeback interrupt
https://notcve.org/view.php?id=CVE-2024-27031
In the Linux kernel, the following vulnerability has been resolved: NFS: Fix nfs_netfs_issue_read() xarray locking for writeback interrupt The loop inside nfs_netfs_issue_read() currently does not disable interrupts while iterating through pages in the xarray to submit for NFS read. This is not safe though since after taking xa_lock, another page in the mapping could be processed for writeback inside an interrupt, and deadlock can occur. The fix is simple and clean if we use xa_for_each_range(), which handles the iteration with RCU while reducing code complexity. The problem is easily reproduced with the following test: mount -o vers=3,fsc 127.0.0.1:/export /mnt/nfs dd if=/dev/zero of=/mnt/nfs/file1.bin bs=4096 count=1 echo 3 > /proc/sys/vm/drop_caches dd if=/mnt/nfs/file1.bin of=/dev/null umount /mnt/nfs On the console with a lockdep-enabled kernel a message similar to the following will be seen: ================================ WARNING: inconsistent lock state 6.7.0-lockdbg+ #10 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. test5/1708 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff888127baa598 (&xa->xa_lock#4){+.?.}-{3:3}, at: nfs_netfs_issue_read+0x1b2/0x4b0 [nfs] {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x144/0x380 _raw_spin_lock_irqsave+0x4e/0xa0 __folio_end_writeback+0x17e/0x5c0 folio_end_writeback+0x93/0x1b0 iomap_finish_ioend+0xeb/0x6a0 blk_update_request+0x204/0x7f0 blk_mq_end_request+0x30/0x1c0 blk_complete_reqs+0x7e/0xa0 __do_softirq+0x113/0x544 __irq_exit_rcu+0xfe/0x120 irq_exit_rcu+0xe/0x20 sysvec_call_function_single+0x6f/0x90 asm_sysvec_call_function_single+0x1a/0x20 pv_native_safe_halt+0xf/0x20 default_idle+0x9/0x20 default_idle_call+0x67/0xa0 do_idle+0x2b5/0x300 cpu_startup_entry+0x34/0x40 start_secondary+0x19d/0x1c0 secondary_startup_64_no_verify+0x18f/0x19b irq event stamp: 176891 hardirqs last enabled at (176891): [<ffffffffa67a0be4>] _raw_spin_unlock_irqrestore+0x44/0x60 hardirqs last disabled at (176890): [<ffffffffa67a0899>] _raw_spin_lock_irqsave+0x79/0xa0 softirqs last enabled at (176646): [<ffffffffa515d91e>] __irq_exit_rcu+0xfe/0x120 softirqs last disabled at (176633): [<ffffffffa515d91e>] __irq_exit_rcu+0xfe/0x120 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&xa->xa_lock#4); <Interrupt> lock(&xa->xa_lock#4); *** DEADLOCK *** 2 locks held by test5/1708: #0: ffff888127baa498 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: nfs_start_io_read+0x28/0x90 [nfs] #1: ffff888127baa650 (mapping.invalidate_lock#3){.+.+}-{4:4}, at: page_cache_ra_unbounded+0xa4/0x280 stack backtrace: CPU: 6 PID: 1708 Comm: test5 Kdump: loaded Not tainted 6.7.0-lockdbg+ Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-1.fc39 04/01/2014 Call Trace: dump_stack_lvl+0x5b/0x90 mark_lock+0xb3f/0xd20 __lock_acquire+0x77b/0x3360 _raw_spin_lock+0x34/0x80 nfs_netfs_issue_read+0x1b2/0x4b0 [nfs] netfs_begin_read+0x77f/0x980 [netfs] nfs_netfs_readahead+0x45/0x60 [nfs] nfs_readahead+0x323/0x5a0 [nfs] read_pages+0xf3/0x5c0 page_cache_ra_unbounded+0x1c8/0x280 filemap_get_pages+0x38c/0xae0 filemap_read+0x206/0x5e0 nfs_file_read+0xb7/0x140 [nfs] vfs_read+0x2a9/0x460 ksys_read+0xb7/0x140 En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: NFS: corrige el bloqueo de matriz x de nfs_netfs_issue_read() para interrupción de escritura regresiva. El bucle dentro de nfs_netfs_issue_read() actualmente no deshabilita las interrupciones mientras se itera a través de páginas en la matriz x para enviarlas a lectura NFS. • https://git.kernel.org/stable/c/000dbe0bec058cbf2ca9e156e4a5584f5158b0f9 https://git.kernel.org/stable/c/ad27382f8495f8ef6d2c66c413d756bfd13c0598 https://git.kernel.org/stable/c/8df1678c021ffeb20ef8a203bd9413f3ed9b0e9a https://git.kernel.org/stable/c/8a2e5977cecd3cde6a0e3e86b7b914d00240e5dc https://git.kernel.org/stable/c/fd5860ab6341506004219b080aea40213b299d2e •
CVE-2024-27030 – octeontx2-af: Use separate handlers for interrupts
https://notcve.org/view.php?id=CVE-2024-27030
In the Linux kernel, the following vulnerability has been resolved: octeontx2-af: Use separate handlers for interrupts For PF to AF interrupt vector and VF to AF vector same interrupt handler is registered which is causing race condition. When two interrupts are raised to two CPUs at same time then two cores serve same event corrupting the data. En el kernel de Linux, se resolvió la siguiente vulnerabilidad: octeontx2-af: utilice controladores separados para las interrupciones. Para el vector de interrupción PF a AF y el vector VF a AF, se registra el mismo controlador de interrupciones, lo que provoca la condición de ejecución. Cuando se generan dos interrupciones en dos CPU al mismo tiempo, dos núcleos atienden el mismo evento y corrompen los datos. A race condition vulnerability was found in the Linux kernel. • https://git.kernel.org/stable/c/7304ac4567bcb72fd57cc79582bf53ca7840136f https://git.kernel.org/stable/c/94cb17e5cf3a3c484063abc0ce4b8a2b2e8c1cb2 https://git.kernel.org/stable/c/766c2627acb2d9d1722cce2e24837044d52d888a https://git.kernel.org/stable/c/772f18ded0e240cc1fa2b7020cc640e3e5c32b70 https://git.kernel.org/stable/c/29d2550d79a8cbd31e0fbaa5c0e2a2efdc444e44 https://git.kernel.org/stable/c/dc29dd00705a62c77de75b6d752259b869aac49d https://git.kernel.org/stable/c/ad6759e233db6fcc131055f8e23b4eafbe81053c https://git.kernel.org/stable/c/4fedae8f9eafa2ac8cdaca58e315f52a7 •
CVE-2024-27028 – spi: spi-mt65xx: Fix NULL pointer access in interrupt handler
https://notcve.org/view.php?id=CVE-2024-27028
In the Linux kernel, the following vulnerability has been resolved: spi: spi-mt65xx: Fix NULL pointer access in interrupt handler The TX buffer in spi_transfer can be a NULL pointer, so the interrupt handler may end up writing to the invalid memory and cause crashes. Add a check to trans->tx_buf before using it. En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: spi: spi-mt65xx: corrige el acceso al puntero NULL en el controlador de interrupciones. El búfer TX en spi_transfer puede ser un puntero NULL, por lo que el controlador de interrupciones puede terminar escribiendo en la memoria no válida y causar accidentes. Agregue una marca a trans->tx_buf antes de usarlo. • https://git.kernel.org/stable/c/1ce24864bff40e11500a699789412115fdf244bf https://git.kernel.org/stable/c/2342b05ec5342a519e00524a507f7a6ea6791a38 https://git.kernel.org/stable/c/55f8ea6731aa64871ee6aef7dba53ee9f9f3b2f6 https://git.kernel.org/stable/c/bcfcdf19698024565eff427706ebbd8df65abd11 https://git.kernel.org/stable/c/c10fed329c1c104f375a75ed97ea3abef0786d62 https://git.kernel.org/stable/c/766ec94cc57492eab97cbbf1595bd516ab0cb0e4 https://git.kernel.org/stable/c/62b1f837b15cf3ec2835724bdf8577e47d14c753 https://git.kernel.org/stable/c/bea82355df9e1c299625405b1947fc9b2 •
CVE-2023-52650 – drm/tegra: dsi: Add missing check for of_find_device_by_node
https://notcve.org/view.php?id=CVE-2023-52650
In the Linux kernel, the following vulnerability has been resolved: drm/tegra: dsi: Add missing check for of_find_device_by_node Add check for the return value of of_find_device_by_node() and return the error if it fails in order to avoid NULL pointer dereference. En el kernel de Linux, se resolvió la siguiente vulnerabilidad: drm/tegra: dsi: Agregar verificación faltante para of_find_device_by_node Agregue verificación para el valor de retorno de of_find_device_by_node() y devuelva el error si falla para evitar la desreferencia al puntero NULL. • https://git.kernel.org/stable/c/e94236cde4d519cdecd45e2435defba33abdc99f https://git.kernel.org/stable/c/47a13d0b9d8527518639ab5c39667f69d6203e80 https://git.kernel.org/stable/c/f05631a8525c3b5e5994ecb1304d2d878956c0f5 https://git.kernel.org/stable/c/92003981a6df5dc84af8a5904f8ee112fa324129 https://git.kernel.org/stable/c/93128052bf832359531c3c0a9e3567b2b8682a2d https://git.kernel.org/stable/c/50c0ad785a780c72a2fdaba10b38c645ffb4eae6 https://git.kernel.org/stable/c/52aa507148c4aad41436e2005d742ffcafad9976 https://git.kernel.org/stable/c/c5d2342d24ef6e08fc90a529fe3dc59de •
CVE-2024-27025 – nbd: null check for nla_nest_start
https://notcve.org/view.php?id=CVE-2024-27025
In the Linux kernel, the following vulnerability has been resolved: nbd: null check for nla_nest_start nla_nest_start() may fail and return NULL. Insert a check and set errno based on other call sites within the same source code. En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: nbd: la comprobación nula de nla_nest_start nla_nest_start() puede fallar y devolver NULL. Inserte una marca y establezca errno según otros sitios de llamadas dentro del mismo código fuente. • https://git.kernel.org/stable/c/47d902b90a32a42a3d33aef3a02170fc6f70aa23 https://git.kernel.org/stable/c/44214d744be32a4769faebba764510888f1eb19e https://git.kernel.org/stable/c/4af837db0fd3679fabc7b7758397090b0c06dced https://git.kernel.org/stable/c/98e60b538e66c90b9a856828c71d4e975ebfa797 https://git.kernel.org/stable/c/96436365e5d80d0106ea785a4f80a58e7c9edff8 https://git.kernel.org/stable/c/b7f5aed55829f376e4f7e5ea5b80ccdcb023e983 https://git.kernel.org/stable/c/e803040b368d046434fbc8a91945c690332c4fcf https://git.kernel.org/stable/c/ba6a9970ce9e284cbc04099361c58731e •