CVE-2022-50313 erofs: fix order >= MAX_ORDER warning due to crafted negative i_size
A crafted negative file size in the EROFS filesystem triggers a kernel warning and potential denial of service due to improper integer handling.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-50313?
CVE-2022-50313 is a medium-severity vulnerability in Linux kernel, published on 15 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
erofs: fix order >= MAX_ORDER warning due to crafted negative i_size
As syzbot reported [1], the root cause is that i_size field is a signed type, and negative i_size is also less than EROFS_BLKSIZ. As a consequence, it's handled as fast symlink unexpectedly.
Let's fall back to the generic path to deal with such unusual i_size.
[1] https://lore.kernel.org/r/[email protected]
Which versions are affected by CVE-2022-50313?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-50313?
Apply the vendor's patch.
Is CVE-2022-50313 being exploited?
There is no known exploitation of CVE-2022-50313 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-50313, GHSA-8w2v-rqc9-m6rw, UBUNTU-CVE-2022-50313.