Linux · Linux Kernel · CVE-2022-49049
**Name of the Vulnerable Software and Affected Versions**
Linux kernel versions prior to the fixed version
**Description**
A issue in the Linux kernel has been resolved, related to the `memfd secret` functionality. When attempting to grow an existing `memfd secret` using `ftruncate`, a panic occurs due to the inability to zero part of the memory. This happens because `memfd secret` does not map its pages via the direct map, making the address returned by `page address()` useless. The patch implements a custom `setattr` for `memfd secret` that detects resizes and rejects them with `EINVAL`.
**Recommendations**
For Linux kernel versions prior to the fixed version, consider applying the patch that implements a custom `setattr` for `memfd secret` to avoid the panic when growing an existing `memfd secret`. As a temporary workaround, avoid using `ftruncate` to resize `memfd secret` objects until a patch is available.