CVE-2024-50218 ocfs2: pass u64 to ocfs2_truncate_inline maybe overflow

Medium 5.5 Published Updated

A local attacker can trigger a kernel bug via integer overflow in OCFS2 inline data truncation, causing a denial of service.

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-2024-50218?

CVE-2024-50218 is a medium-severity vulnerability in Linux kernel, published on 9 Nov 2024. 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:

ocfs2: pass u64 to ocfs2_truncate_inline maybe overflow

Syzbot reported a kernel BUG in ocfs2_truncate_inline. There are two reasons for this: first, the parameter value passed is greater than ocfs2_max_inline_data_with_xattr, second, the start and end parameters of ocfs2_truncate_inline are "unsigned int".

So, we need to add a sanity check for byte_start and byte_len right before ocfs2_truncate_inline() in ocfs2_remove_inode_range(), if they are greater than ocfs2_max_inline_data_with_xattr return -EINVAL.

Which versions are affected by CVE-2024-50218?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-50218?

Apply the vendor's patch.

Is CVE-2024-50218 being exploited?

There is no known exploitation of CVE-2024-50218 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-50218, DEBIAN-CVE-2024-50218, GHSA-g32m-3vwh-7rwr, UBUNTU-CVE-2024-50218.

Is CVE-2024-50218 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free