CVE-2024-49996 cifs: Fix buffer overflow when parsing NFS reparse points

Critical 9.4 Published Updated

A buffer overflow in the Linux kernel CIFS module allows attackers to execute arbitrary code or cause a denial of service via crafted NFS reparse points.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-49996?

CVE-2024-49996 is a critical memory corruption vulnerability in Debian Debian Linux, published on 21 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

cifs: Fix buffer overflow when parsing NFS reparse points

ReparseDataLength is sum of the InodeType size and DataBuffer size. So to get DataBuffer size it is needed to subtract InodeType's size from ReparseDataLength.

Function cifs_strndup_from_utf16() is currentlly accessing buf->DataBuffer at position after the end of the buffer because it does not subtract InodeType size from the length. Fix this problem and correctly subtract variable len.

Member InodeType is present only when reparse buffer is large enough. Check for ReparseDataLength before accessing InodeType to prevent another invalid memory access.

Major and minor rdev values are present also only when reparse buffer is large enough. Check for reparse buffer size before calling reparse_mkdev().

Weakness: CWE-120

Which versions are affected by CVE-2024-49996?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2024-49996?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2024-49996 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-51324, BELL-CVE-2024-49996, DEBIAN-CVE-2024-49996, GHSA-276c-3gx4-x9pr, UBUNTU-CVE-2024-49996.

Is CVE-2024-49996 in your software?

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

Check your SBOMs for free