Instituto Nacional de ciberseguridad. Sección Incibe
Instituto Nacional de Ciberseguridad. Sección INCIBE-CERT

CVE-2023-53860

Gravedad:
Pendiente de análisis
Tipo:
No Disponible / Otro tipo
Fecha de publicación:
09/12/2025
Última modificación:
09/12/2025

Descripción

*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> dm: don&amp;#39;t attempt to queue IO under RCU protection<br /> <br /> dm looks up the table for IO based on the request type, with an<br /> assumption that if the request is marked REQ_NOWAIT, it&amp;#39;s fine to<br /> attempt to submit that IO while under RCU read lock protection. This<br /> is not OK, as REQ_NOWAIT just means that we should not be sleeping<br /> waiting on other IO, it does not mean that we can&amp;#39;t potentially<br /> schedule.<br /> <br /> A simple test case demonstrates this quite nicely:<br /> <br /> int main(int argc, char *argv[])<br /> {<br /> struct iovec iov;<br /> int fd;<br /> <br /> fd = open("/dev/dm-0", O_RDONLY | O_DIRECT);<br /> posix_memalign(&amp;iov.iov_base, 4096, 4096);<br /> iov.iov_len = 4096;<br /> preadv2(fd, &amp;iov, 1, 0, RWF_NOWAIT);<br /> return 0;<br /> }<br /> <br /> which will instantly spew:<br /> <br /> BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306<br /> in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 5580, name: dm-nowait<br /> preempt_count: 0, expected: 0<br /> RCU nest depth: 1, expected: 0<br /> INFO: lockdep is turned off.<br /> CPU: 7 PID: 5580 Comm: dm-nowait Not tainted 6.6.0-rc1-g39956d2dcd81 #132<br /> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014<br /> Call Trace:<br /> <br /> dump_stack_lvl+0x11d/0x1b0<br /> __might_resched+0x3c3/0x5e0<br /> ? preempt_count_sub+0x150/0x150<br /> mempool_alloc+0x1e2/0x390<br /> ? mempool_resize+0x7d0/0x7d0<br /> ? lock_sync+0x190/0x190<br /> ? lock_release+0x4b7/0x670<br /> ? internal_get_user_pages_fast+0x868/0x2d40<br /> bio_alloc_bioset+0x417/0x8c0<br /> ? bvec_alloc+0x200/0x200<br /> ? internal_get_user_pages_fast+0xb8c/0x2d40<br /> bio_alloc_clone+0x53/0x100<br /> dm_submit_bio+0x27f/0x1a20<br /> ? lock_release+0x4b7/0x670<br /> ? blk_try_enter_queue+0x1a0/0x4d0<br /> ? dm_dax_direct_access+0x260/0x260<br /> ? rcu_is_watching+0x12/0xb0<br /> ? blk_try_enter_queue+0x1cc/0x4d0<br /> __submit_bio+0x239/0x310<br /> ? __bio_queue_enter+0x700/0x700<br /> ? kvm_clock_get_cycles+0x40/0x60<br /> ? ktime_get+0x285/0x470<br /> submit_bio_noacct_nocheck+0x4d9/0xb80<br /> ? should_fail_request+0x80/0x80<br /> ? preempt_count_sub+0x150/0x150<br /> ? lock_release+0x4b7/0x670<br /> ? __bio_add_page+0x143/0x2d0<br /> ? iov_iter_revert+0x27/0x360<br /> submit_bio_noacct+0x53e/0x1b30<br /> submit_bio_wait+0x10a/0x230<br /> ? submit_bio_wait_endio+0x40/0x40<br /> __blkdev_direct_IO_simple+0x4f8/0x780<br /> ? blkdev_bio_end_io+0x4c0/0x4c0<br /> ? stack_trace_save+0x90/0xc0<br /> ? __bio_clone+0x3c0/0x3c0<br /> ? lock_release+0x4b7/0x670<br /> ? lock_sync+0x190/0x190<br /> ? atime_needs_update+0x3bf/0x7e0<br /> ? timestamp_truncate+0x21b/0x2d0<br /> ? inode_owner_or_capable+0x240/0x240<br /> blkdev_direct_IO.part.0+0x84a/0x1810<br /> ? rcu_is_watching+0x12/0xb0<br /> ? lock_release+0x4b7/0x670<br /> ? blkdev_read_iter+0x40d/0x530<br /> ? reacquire_held_locks+0x4e0/0x4e0<br /> ? __blkdev_direct_IO_simple+0x780/0x780<br /> ? rcu_is_watching+0x12/0xb0<br /> ? __mark_inode_dirty+0x297/0xd50<br /> ? preempt_count_add+0x72/0x140<br /> blkdev_read_iter+0x2a4/0x530<br /> do_iter_readv_writev+0x2f2/0x3c0<br /> ? generic_copy_file_range+0x1d0/0x1d0<br /> ? fsnotify_perm.part.0+0x25d/0x630<br /> ? security_file_permission+0xd8/0x100<br /> do_iter_read+0x31b/0x880<br /> ? import_iovec+0x10b/0x140<br /> vfs_readv+0x12d/0x1a0<br /> ? vfs_iter_read+0xb0/0xb0<br /> ? rcu_is_watching+0x12/0xb0<br /> ? rcu_is_watching+0x12/0xb0<br /> ? lock_release+0x4b7/0x670<br /> do_preadv+0x1b3/0x260<br /> ? do_readv+0x370/0x370<br /> __x64_sys_preadv2+0xef/0x150<br /> do_syscall_64+0x39/0xb0<br /> entry_SYSCALL_64_after_hwframe+0x63/0xcd<br /> RIP: 0033:0x7f5af41ad806<br /> Code: 41 54 41 89 fc 55 44 89 c5 53 48 89 cb 48 83 ec 18 80 3d e4 dd 0d 00 00 74 7a 45 89 c1 49 89 ca 45 31 c0 b8 47 01 00 00 0f 05 3d 00 f0 ff ff 0f 87 be 00 00 00 48 85 c0 79 4a 48 8b 0d da 55<br /> RSP: 002b:00007ffd3145c7f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000147<br /> RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5af41ad806<br /> RDX: 0000000000000001 RSI: 00007ffd3145c850 RDI: 0000000000000003<br /> RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000008<br /> R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003<br /> R13: 00007ffd3145c850 R14: 000055f5f0431dd8 R15: 0000000000000001<br /> <br /> <br /> where in fact it is<br /> ---truncated---

Impacto