CVE-2022-50497: binfmt_misc: fix shift-out-of-bounds in check_special_flags

Published Oct 4, 2025
·
Updated

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

binfmtmisc: fix shift-out-of-bounds in checkspecialflags

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

left shift of 1 by 31 places cannot be represented in type 'int' Call Trace: <TASK> dumpstack lib/dumpstack.c:88 [inline] dumpstacklvl+0x8d/0xcf lib/dumpstack.c:106 ubsanepilogue+0xa/0x44 lib/ubsan.c:151 ubsanhandleshiftoutofbounds+0x1e7/0x208 lib/ubsan.c:322 checkspecialflags fs/binfmtmisc.c:241 [inline] createentry fs/binfmtmisc.c:456 [inline] bmregisterwrite+0x9d3/0xa20 fs/binfmtmisc.c:654 vfswrite+0x11e/0x580 fs/readwrite.c:582 ksyswrite+0xcf/0x120 fs/readwrite.c:637 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x34/0x80 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x63/0xcd RIP: 0033:0x4194e1

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

Affected Software

14 affected components
linux/kernel
Linux Linux kernel>=2.6.12.1<4.9.337
Linux Linux kernel>=4.10<4.14.303
Linux Linux kernel>=4.15<4.19.270
Linux Linux kernel>=4.20<5.4.229
Linux Linux kernel>=5.5<5.10.163
Linux Linux kernel>=5.11<5.15.86
Linux Linux kernel>=5.16<6.0.16
Linux Linux kernel>=6.1<6.1.2
Linux Linux kernel=2.6.12
Linux Linux kernel=2.6.12-rc2
Linux Linux kernel=2.6.12-rc3
Linux Linux kernel=2.6.12-rc4
Linux Linux kernel=2.6.12-rc5

Event History

Oct 4, 2025
CVE Published
via MITRE·03:43 PM
Data Sourced
via MITRE·03:43 PM
Description
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-50497?

CVE-2022-50497 has a severity rating that indicates it can lead to potential out-of-bounds access in the Linux kernel.

2

How do I fix CVE-2022-50497?

To fix CVE-2022-50497, update your Linux kernel to the latest stable release that includes the necessary patches.

3

What causes CVE-2022-50497?

CVE-2022-50497 is caused by a shift-out-of-bounds error in the binfmt_misc implementation of the Linux kernel.

4

Which versions of the Linux kernel are affected by CVE-2022-50497?

CVE-2022-50497 affects various versions of the Linux kernel prior to the application of the relevant security patches.

5

Is CVE-2022-50497 being actively exploited?

As of the latest updates, there are no public reports indicating that CVE-2022-50497 is being actively exploited in the wild.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203