NFS: fs_context: validate UDP retrans to prevent shift out-of-bounds

Kernel Updated 02 Oct 2025

Summary

31/05/2021
N/A
No i
Unrated
Not published

GSD-2021-1000068: NFS: fs_context: validate UDP retrans to prevent shift out-of-bounds. Affects Kernel versions >= 9954bf92c0cddd50a2a470be302e1c1ffdf21d42, < 3d0163821c035040a46d816a42c0780f0f0a30a8. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The NFS (Network File System) is a distributed file system protocol that allows a client computer to access files over a network as if they were on its local disks. It enables sharing files and directories among multiple computers in a network. The Linux Kernel is an open-source monolithic Unix-like computer operating system kernel that powers the majority of Linux distributions. This vulnerability affects the Linux Kernel package.

The fs_context is a structure in the Linux Kernel that represents the context for a file system. It contains various parameters and settings related to the file system. The UDP retrans (retransmission) is a parameter within the fs_context structure that determines the number of retransmissions for UDP (User Datagram Protocol) packets.

This vulnerability arises due to a lack of validation on the UDP retrans parameter, which can lead to a shift out-of-bounds issue. An attacker could exploit this vulnerability to cause a denial-of-service (DoS) condition or potentially execute arbitrary code.

Vulnerability Detail

The vulnerability in the NFS fs_context structure allows an attacker to manipulate the UDP retrans parameter, leading to a shift out-of-bounds issue. By providing a malicious value for UDP retrans, an attacker can cause the system to access memory outside the bounds of the allocated buffer. This can result in a crash or potentially allow the attacker to execute arbitrary code.

The vulnerability was introduced in version v5.6 of the Linux Kernel and was fixed in version v5.12.3. The fix involves validating the UDP retrans parameter to ensure it is within the acceptable range.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, you can disable the use of UDP for NFS by modifying the NFS mount options. Instead of using UDP, you can switch to TCP (Transmission Control Protocol) for NFS communication. TCP is a reliable and connection-oriented protocol that provides error checking and retransmission of lost packets.

To modify the NFS mount options, you can edit the /etc/fstab file and add the tcp option to the NFS mount entry. Here's an example:

# Before modification
server:/export /mnt nfs udp,rw 0 0

# After modification
server:/export /mnt nfs tcp,rw 0 0

After making the changes, you can remount the NFS file system for the changes to take effect:

sudo mount -o remount /mnt

Conclusion

The NFS fs_context vulnerability in the Linux Kernel can be exploited by manipulating the UDP retrans parameter, leading to a shift out-of-bounds issue. It is crucial to update the Linux Kernel package to version v5.12.3 or later to mitigate this vulnerability. Alternatively, you can disable UDP for NFS and switch to TCP as a workaround. If you require further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

NFS (Network File System) is a distributed file system protocol that allows a client computer to access files over a network as if they were on its local disks. It enables sharing files and directories among multiple computers in a network.

The Linux Kernel is an open-source monolithic Unix-like computer operating system kernel that powers the majority of Linux distributions. It provides the core functionality for the operating system.

fs_context is a structure in the Linux Kernel that represents the context for a file system. It contains various parameters and settings related to the file system.

UDP retrans (retransmission) is a parameter within the fs_context structure that determines the number of retransmissions for UDP (User Datagram Protocol) packets. It affects the reliability of UDP communication.

This vulnerability can lead to a shift out-of-bounds issue, which can result in a crash or potentially allow an attacker to execute arbitrary code. It can also cause a denial-of-service (DoS) condition, impacting the availability of the affected system.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback