CVE-2022-50497

Source
https://cve.org/CVERecord?id=CVE-2022-50497
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50497.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50497
Downstream
Related
Published
2025-10-04T15:43:48.656Z
Modified
2026-03-20T11:47:30.480574Z
Summary
binfmt_misc: fix shift-out-of-bounds in check_special_flags
Details

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

binfmtmisc: fix shift-out-of-bounds in checkspecial_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> __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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50497.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Fixed
0f1a48994b3e516d5c7fd5d12204fdba7a604771
Fixed
ea6145370be8016755c43aca799815fc4b8c88b1
Fixed
97382a2639b1cd9631f6069061e9d7062cd2b098
Fixed
419b808504c26b3e3342365f34ccd0843e09a7f8
Fixed
dcbc51d31d0afbd45e830e3cf565a7b3ca7bf0d8
Fixed
88cea1676a09f7c45a1438153a126610c33b1590
Fixed
a651bb5ff997b9f02662bcdef3d8b4e6f0d79656
Fixed
a91123d4bda463469f68f0427adabf8108001f94
Fixed
6a46bf558803dd2b959ca7435a5c143efe837217

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50497.json"