CVE-2021-46927

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
27/02/2024
Last modified:
10/04/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> nitro_enclaves: Use get_user_pages_unlocked() call to handle mmap assert<br /> <br /> After commit 5b78ed24e8ec ("mm/pagemap: add mmap_assert_locked()<br /> annotations to find_vma*()"), the call to get_user_pages() will trigger<br /> the mmap assert.<br /> <br /> static inline void mmap_assert_locked(struct mm_struct *mm)<br /> {<br /> lockdep_assert_held(&amp;mm-&gt;mmap_lock);<br /> VM_BUG_ON_MM(!rwsem_is_locked(&amp;mm-&gt;mmap_lock), mm);<br /> }<br /> <br /> [ 62.521410] kernel BUG at include/linux/mmap_lock.h:156!<br /> ...........................................................<br /> [ 62.538938] RIP: 0010:find_vma+0x32/0x80<br /> ...........................................................<br /> [ 62.605889] Call Trace:<br /> [ 62.608502] <br /> [ 62.610956] ? lock_timer_base+0x61/0x80<br /> [ 62.614106] find_extend_vma+0x19/0x80<br /> [ 62.617195] __get_user_pages+0x9b/0x6a0<br /> [ 62.620356] __gup_longterm_locked+0x42d/0x450<br /> [ 62.623721] ? finish_wait+0x41/0x80<br /> [ 62.626748] ? __kmalloc+0x178/0x2f0<br /> [ 62.629768] ne_set_user_memory_region_ioctl.isra.0+0x225/0x6a0 [nitro_enclaves]<br /> [ 62.635776] ne_enclave_ioctl+0x1cf/0x6d7 [nitro_enclaves]<br /> [ 62.639541] __x64_sys_ioctl+0x82/0xb0<br /> [ 62.642620] do_syscall_64+0x3b/0x90<br /> [ 62.645642] entry_SYSCALL_64_after_hwframe+0x44/0xae<br /> <br /> Use get_user_pages_unlocked() when setting the enclave memory regions.<br /> That&amp;#39;s a similar pattern as mmap_read_lock() used together with<br /> get_user_pages().

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.15.0 (including) 5.15.13 (excluding)