All reports
Medium

kernel: ext4: verify orphan file size is not too big

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2025-40179

Probability of exploitation in the next 30 days: 0.22%

FIRST EPSS · 2026-11-21

Description

In the Linux kernel, the following vulnerability has been resolved: ext4: verify orphan file size is not too big In principle orphan file can be arbitrarily large. However orphan replay needs to traverse it all and we also pin all its buffers in memory. Thus filesystems with absurdly large orphan files can lead to big amounts of memory consumed. Limit orphan file size to a sane value and also use kvmalloc() for allocating array of block descriptor structures to avoid large order allocations for sane but large orphan files.

A flaw was found in the Linux kernel’s ext4 filesystem implementation. The kernel did not limit the maximum size of orphan files, which could be made arbitrarily large. During orphan replay, the kernel traverses the file and pins all its buffers in memory, potentially resulting in excessive memory consumption.