CVE-2022-50497

binfmt_misc: fix shift-out-of-bounds in check_special_flags

No CVSS score yet EPSS 0.17%

Published 4 Oct 2025 Updated 5 Nov 2026 CNA: Linux

Check your servers for CVE-2022-50497

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-50497 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

binfmt_misc: fix shift-out-of-bounds in check_special_flags

UBSAN reported a shift-out-of-bounds warning:

left shift of 1 by 31 places cannot be represented in type 'int' Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8d/0xcf lib/dump_stack.c:106 ubsan_epilogue+0xa/0x44 lib/ubsan.c:151 __ubsan_handle_shift_out_of_bounds+0x1e7/0x208 lib/ubsan.c:322 check_special_flags fs/binfmt_misc.c:241 [inline] create_entry fs/binfmt_misc.c:456 [inline] bm_register_write+0x9d3/0xa20 fs/binfmt_misc.c:654 vfs_write+0x11e/0x580 fs/read_write.c:582 ksys_write+0xcf/0x120 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x34/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x4194e1

Since the type of Node's flags is unsigned long, we should define these macros with same type too.

Exploitation

EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 6.52% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 5 Nov 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 0f1a48994b3e516d5c7fd5d12204fdba7a604771
affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before ea6145370be8016755c43aca799815fc4b8c88b1
affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 97382a2639b1cd9631f6069061e9d7062cd2b098
affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 419b808504c26b3e3342365f34ccd0843e09a7f8
affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before dcbc51d31d0afbd45e830e3cf565a7b3ca7bf0d8
affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 88cea1676a09f7c45a1438153a126610c33b1590
affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before a651bb5ff997b9f02662bcdef3d8b4e6f0d79656
affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before a91123d4bda463469f68f0427adabf8108001f94
affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 6a46bf558803dd2b959ca7435a5c143efe837217
Other versions: unaffected
Linux
affected 2.6.12
unaffected before 2.6.12
unaffected from 4.9.337 up to and including 4.9.*
unaffected from 4.14.303 up to and including 4.14.*
unaffected from 4.19.270 up to and including 4.19.*
unaffected from 5.4.229 up to and including 5.4.*
unaffected from 5.10.163 up to and including 5.10.*
unaffected from 5.15.86 up to and including 5.15.*
unaffected from 6.0.16 up to and including 6.0.*
unaffected from 6.1.2 up to and including 6.1.*
unaffected 6.2 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-50497 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-50497

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2022-50497
trivy image --scanners vuln IMAGE | grep CVE-2022-50497

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2022-50497 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.