{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-50699","id":"CVE-2022-50699","title":"selinux: enable use of both GFP_KERNEL and GFP_ATOMIC in convert_context()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nselinux: enable use of both GFP_KERNEL and GFP_ATOMIC in convert_context()\n\nThe following warning was triggered on a hardware environment:\n\n  SELinux: Converting 162 SID table entries...\n  BUG: sleeping function called from invalid context at\n       __might_sleep+0x60/0x74 0x0\n  in_atomic(): 1, irqs_disabled(): 128, non_block: 0,","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nselinux: enable use of both GFP_KERNEL and GFP_ATOMIC in convert_context()\n\nThe following warning was triggered on a hardware environment:\n\n  SELinux: Converting 162 SID table entries...\n  BUG: sleeping function called from invalid context at\n       __might_sleep+0x60/0x74 0x0\n  in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 5943, name: tar\n  CPU: 7 PID: 5943 Comm: tar Tainted: P O 5.10.0 #1\n  Call trace:\n   dump_backtrace+0x0/0x1c8\n   show_stack+0x18/0x28\n   dump_stack+0xe8/0x15c\n   ___might_sleep+0x168/0x17c\n   __might_sleep+0x60/0x74\n   __kmalloc_track_caller+0xa0/0x7dc\n   kstrdup+0x54/0xac\n   convert_context+0x48/0x2e4\n   sidtab_context_to_sid+0x1c4/0x36c\n   security_context_to_sid_core+0x168/0x238\n   security_context_to_sid_default+0x14/0x24\n   inode_doinit_use_xattr+0x164/0x1e4\n   inode_doinit_with_dentry+0x1c0/0x488\n   selinux_d_instantiate+0x20/0x34\n   security_d_instantiate+0x70/0xbc\n   d_splice_alias+0x4c/0x3c0\n   ext4_lookup+0x1d8/0x200 [ext4]\n   __lookup_slow+0x12c/0x1e4\n   walk_component+0x100/0x200\n   path_lookupat+0x88/0x118\n   filename_lookup+0x98/0x130\n   user_path_at_empty+0x48/0x60\n   vfs_statx+0x84/0x140\n   vfs_fstatat+0x20/0x30\n   __se_sys_newfstatat+0x30/0x74\n   __arm64_sys_newfstatat+0x1c/0x2c\n   el0_svc_common.constprop.0+0x100/0x184\n   do_el0_svc+0x1c/0x2c\n   el0_svc+0x20/0x34\n   el0_sync_handler+0x80/0x17c\n   el0_sync+0x13c/0x140\n  SELinux: Context system_u:object_r:pssp_rsyslog_log_t:s0:c0 is\n           not valid (left unmapped).\n\nIt was found that within a critical section of spin_lock_irqsave in\nsidtab_context_to_sid(), convert_context() (hooked by\nsidtab_convert_params.func) might cause the process to sleep via\nallocating memory with GFP_KERNEL, which is problematic.\n\nAs Ondrej pointed out [1], convert_context()/sidtab_convert_params.func\nhas another caller sidtab_convert_tree(), which is okay with GFP_KERNEL.\nTherefore, fix this problem by adding a gfp_t argument for\nconvert_context()/sidtab_convert_params.func and pass GFP_KERNEL/_ATOMIC\nproperly in individual callers.\n\n[PM: wrap long BUG() output lines, tweak subject line]","published":"2025-12-24T10:55:15.468Z","updated":"2026-10-28T02:30:39.420979222Z","reserved":"2025-12-24T10:53:15.517Z","status":"Deferred","rejected":false,"assigner":"Linux","metric":null,"metrics":[],"rating":"unrated","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d","lessThan":"2723875e9d677401d775a03a72abab7e9538c20c","status":"affected","versionType":"git"},{"version":"ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d","lessThan":"3006766d247bc93a25b34e92fff2f75bda597e2e","status":"affected","versionType":"git"},{"version":"ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d","lessThan":"277378631d26477451424cc73982b977961f3d8b","status":"affected","versionType":"git"},{"version":"ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d","lessThan":"abe3c631447dcd1ba7af972fe6f054bee6f136fa","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.0","status":"affected"},{"version":"0","lessThan":"5.0","status":"unaffected","versionType":"semver"},{"version":"5.10.152","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.76","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.0.6","lessThanOrEqual":"6.0.*","status":"unaffected","versionType":"semver"},{"version":"6.1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/2723875e9d677401d775a03a72abab7e9538c20c","tags":["web"]},{"url":"https://git.kernel.org/stable/c/3006766d247bc93a25b34e92fff2f75bda597e2e","tags":["web"]},{"url":"https://git.kernel.org/stable/c/277378631d26477451424cc73982b977961f3d8b","tags":["web"]},{"url":"https://git.kernel.org/stable/c/abe3c631447dcd1ba7af972fe6f054bee6f136fa","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50699.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50699","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.002,"epssPercentile":0.09989,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-50699","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50699","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-50699","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-50699","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}