CVE-2022-50497: binfmt_misc: fix shift-out-of-bounds in check_special_flags
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
Remediation
Event History
Frequently Asked Questions
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.
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.
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.
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.
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.