CVE-2022-50699
Gravedad:
Pendiente de análisis
Tipo:
No Disponible / Otro tipo
Fecha de publicación:
24/12/2025
Última modificación:
29/12/2025
Descripción
*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
selinux: enable use of both GFP_KERNEL and GFP_ATOMIC in convert_context()<br />
<br />
The following warning was triggered on a hardware environment:<br />
<br />
SELinux: Converting 162 SID table entries...<br />
BUG: sleeping function called from invalid context at<br />
__might_sleep+0x60/0x74 0x0<br />
in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 5943, name: tar<br />
CPU: 7 PID: 5943 Comm: tar Tainted: P O 5.10.0 #1<br />
Call trace:<br />
dump_backtrace+0x0/0x1c8<br />
show_stack+0x18/0x28<br />
dump_stack+0xe8/0x15c<br />
___might_sleep+0x168/0x17c<br />
__might_sleep+0x60/0x74<br />
__kmalloc_track_caller+0xa0/0x7dc<br />
kstrdup+0x54/0xac<br />
convert_context+0x48/0x2e4<br />
sidtab_context_to_sid+0x1c4/0x36c<br />
security_context_to_sid_core+0x168/0x238<br />
security_context_to_sid_default+0x14/0x24<br />
inode_doinit_use_xattr+0x164/0x1e4<br />
inode_doinit_with_dentry+0x1c0/0x488<br />
selinux_d_instantiate+0x20/0x34<br />
security_d_instantiate+0x70/0xbc<br />
d_splice_alias+0x4c/0x3c0<br />
ext4_lookup+0x1d8/0x200 [ext4]<br />
__lookup_slow+0x12c/0x1e4<br />
walk_component+0x100/0x200<br />
path_lookupat+0x88/0x118<br />
filename_lookup+0x98/0x130<br />
user_path_at_empty+0x48/0x60<br />
vfs_statx+0x84/0x140<br />
vfs_fstatat+0x20/0x30<br />
__se_sys_newfstatat+0x30/0x74<br />
__arm64_sys_newfstatat+0x1c/0x2c<br />
el0_svc_common.constprop.0+0x100/0x184<br />
do_el0_svc+0x1c/0x2c<br />
el0_svc+0x20/0x34<br />
el0_sync_handler+0x80/0x17c<br />
el0_sync+0x13c/0x140<br />
SELinux: Context system_u:object_r:pssp_rsyslog_log_t:s0:c0 is<br />
not valid (left unmapped).<br />
<br />
It was found that within a critical section of spin_lock_irqsave in<br />
sidtab_context_to_sid(), convert_context() (hooked by<br />
sidtab_convert_params.func) might cause the process to sleep via<br />
allocating memory with GFP_KERNEL, which is problematic.<br />
<br />
As Ondrej pointed out [1], convert_context()/sidtab_convert_params.func<br />
has another caller sidtab_convert_tree(), which is okay with GFP_KERNEL.<br />
Therefore, fix this problem by adding a gfp_t argument for<br />
convert_context()/sidtab_convert_params.func and pass GFP_KERNEL/_ATOMIC<br />
properly in individual callers.<br />
<br />
[PM: wrap long BUG() output lines, tweak subject line]



