# CVE-2022-50699: selinux: enable use of both GFP\_KERNEL and GFP\_ATOMIC in convert\_context()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **Published:** 2025-12-24T10:55:15.468Z
- **Modified:** 2026-06-17T05:24:01.670Z

## Who should check

- Anyone running Linux \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< 2723875e9d677401d775a03a72abab7e9538c20c; \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< 3006766d247bc93a25b34e92fff2f75bda597e2e; \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< 277378631d26477451424cc73982b977961f3d8b; \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< abe3c631447dcd1ba7af972fe6f054bee6f136fa
- Anyone running Linux 5.0

## Description

In the Linux kernel, the following vulnerability has been resolved:

selinux: enable use of both GFP\_KERNEL and GFP\_ATOMIC in convert\_context()

The following warning was triggered on a hardware environment:

  SELinux: Converting 162 SID table entries...
  BUG: sleeping function called from invalid context at
       \_\_might\_sleep+0x60/0x74 0x0
  in\_atomic(): 1, irqs\_disabled(): 128, non\_block: 0, pid: 5943, name: tar
  CPU: 7 PID: 5943 Comm: tar Tainted: P O 5.10.0 \#1
  Call trace:
   dump\_backtrace+0x0/0x1c8
   show\_stack+0x18/0x28
   dump\_stack+0xe8/0x15c
   \_\_\_might\_sleep+0x168/0x17c
   \_\_might\_sleep+0x60/0x74
   \_\_kmalloc\_track\_caller+0xa0/0x7dc
   kstrdup+0x54/0xac
   convert\_context+0x48/0x2e4
   sidtab\_context\_to\_sid+0x1c4/0x36c
   security\_context\_to\_sid\_core+0x168/0x238
   security\_context\_to\_sid\_default+0x14/0x24
   inode\_doinit\_use\_xattr+0x164/0x1e4
   inode\_doinit\_with\_dentry+0x1c0/0x488
   selinux\_d\_instantiate+0x20/0x34
   security\_d\_instantiate+0x70/0xbc
   d\_splice\_alias+0x4c/0x3c0
   ext4\_lookup+0x1d8/0x200 \[ext4\]
   \_\_lookup\_slow+0x12c/0x1e4
   walk\_component+0x100/0x200
   path\_lookupat+0x88/0x118
   filename\_lookup+0x98/0x130
   user\_path\_at\_empty+0x48/0x60
   vfs\_statx+0x84/0x140
   vfs\_fstatat+0x20/0x30
   \_\_se\_sys\_newfstatat+0x30/0x74
   \_\_arm64\_sys\_newfstatat+0x1c/0x2c
   el0\_svc\_common.constprop.0+0x100/0x184
   do\_el0\_svc+0x1c/0x2c
   el0\_svc+0x20/0x34
   el0\_sync\_handler+0x80/0x17c
   el0\_sync+0x13c/0x140
  SELinux: Context system\_u:object\_r:pssp\_rsyslog\_log\_t:s0:c0 is
           not valid (left unmapped).

It was found that within a critical section of spin\_lock\_irqsave in
sidtab\_context\_to\_sid(), convert\_context() (hooked by
sidtab\_convert\_params.func) might cause the process to sleep via
allocating memory with GFP\_KERNEL, which is problematic.

As Ondrej pointed out \[1\], convert\_context()/sidtab\_convert\_params.func
has another caller sidtab\_convert\_tree(), which is okay with GFP\_KERNEL.
Therefore, fix this problem by adding a gfp\_t argument for
convert\_context()/sidtab\_convert\_params.func and pass GFP\_KERNEL/\_ATOMIC
properly in individual callers.

\[PM: wrap long BUG() output lines, tweak subject line\]

## Affected and fixed versions

- Linux: \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< 2723875e9d677401d775a03a72abab7e9538c20c; \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< 3006766d247bc93a25b34e92fff2f75bda597e2e; \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< 277378631d26477451424cc73982b977961f3d8b; \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< abe3c631447dcd1ba7af972fe6f054bee6f136fa (cvelist)
- Linux: 5.0 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50699. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50699.md
Affected: Linux >= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, < 2723875e9d677401d775a03a72abab7e9538c20c; >= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, < 3006766d247bc93a25b34e92fff2f75bda597e2e; >= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, < 277378631d26477451424cc73982b977961f3d8b; >= ee1a84fdfeedfd7362e9a8a…
Fixed in: Linux 2723875e9d677401d775a03a72abab7e9538c20c, Linux 3006766d247bc93a25b34e92fff2f75bda597e2e, Linux 277378631d26477451424cc73982b977961f3d8b

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50699 being exploited?

There is no confirmed exploitation: CVE-2022-50699 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50699?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2022-50699?

Linux \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< 2723875e9d677401d775a03a72abab7e9538c20c; \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< 3006766d247bc93a25b34e92fff2f75bda597e2e; \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< 277378631d26477451424cc73982b977961f3d8b; \>= ee1a84fdfeedfd7362e9a8a8f15fedc3482ade2d, \< abe3c631447dcd1ba7af972fe6f054bee6f136fa; Linux 5.0.

### Is there a fix for CVE-2022-50699?

Yes. Fixed in Linux 2723875e9d677401d775a03a72abab7e9538c20c, Linux 3006766d247bc93a25b34e92fff2f75bda597e2e, Linux 277378631d26477451424cc73982b977961f3d8b. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50699?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/2723875e9d677401d775a03a72abab7e9538c20c>
- other: <https://git.kernel.org/stable/c/3006766d247bc93a25b34e92fff2f75bda597e2e>
- other: <https://git.kernel.org/stable/c/277378631d26477451424cc73982b977961f3d8b>
- other: <https://git.kernel.org/stable/c/abe3c631447dcd1ba7af972fe6f054bee6f136fa>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50699>

HTML: <https://flawdb.com/CVE-2022-50699> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50699>
