afs: Fix the locking used by afs_get_link()
In the Linux kernel, the following vulnerability has been resolved: afs: Fix the locking used by afs_get_link() The afs filesystem in the kernel doesn't do locking correctly for symbolic links. There are a number of problems: (1) It doesn't do any locking around afs_read_single() to prevent races between multiple ->get_link() calls, thereby allowing the possibility of leaks. (2) It doesn't use RCU barriering when accessing the buffer pointers during RCU pathwalk. (3) It can race with another thread updating the contents of the symlink if a third party updated it on the server. Fix this by the following means: (0) Move symlink handling into its own file as this makes it more complicated. (1) Take the validate_lock around afs_read_single() to prevent races between multiple ->get_link() calls. (2) Keep a separate copy of the symlink contents with an rcu_head. This is always going to be a lot smaller than a page, so it can be kmalloc'd and save quite a bit of memory. It also needs a refcount for non-RCU pathwalk. (3) Split the symlink read and write-to-cache routines in afs from those for directories. (4) Discard the I/O buffer as soon as the write-to-cache completes as this is a full page (plus a folio_queue). (5) If there's no cache, discard the I/O buffer immediately after reading and copying if there is no cache.
CVE-2026-64057
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-64057
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "eae9e78951bb02a7b94a9adef6e981413d13c564",
"lessThan": "93531bca46707c6c28c4f4eb26c101fa36ccb8cb",
"versionType": "git"
},
{
"status": "affected",
"version": "eae9e78951bb02a7b94a9adef6e981413d13c564",
"lessThan": "77ea917cbed62882a33114b1e23ededb977e4287",
"versionType": "git"
},
{
"status": "affected",
"version": "eae9e78951bb02a7b94a9adef6e981413d13c564",
"lessThan": "c0410adf3da6db46f3513411fcf95e63c2f1d1ad",
"versionType": "git"
}
],
"programFiles": [
"fs/afs/Makefile",
"fs/afs/dir.c",
"fs/afs/fsclient.c",
"fs/afs/inode.c",
"fs/afs/internal.h",
"fs/afs/symlink.c",
"fs/afs/validation.c",
"fs/afs/yfsclient.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "6.14"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "6.14",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "6.18.57",
"versionType": "semver",
"lessThanOrEqual": "6.18.*"
},
{
"status": "unaffected",
"version": "7.0.11",
"versionType": "semver",
"lessThanOrEqual": "7.0.*"
},
{
"status": "unaffected",
"version": "7.1",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"fs/afs/Makefile",
"fs/afs/dir.c",
"fs/afs/fsclient.c",
"fs/afs/inode.c",
"fs/afs/internal.h",
"fs/afs/symlink.c",
"fs/afs/validation.c",
"fs/afs/yfsclient.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-64057
Source reference:
/cveMetadata/cveId
Publisher severity
high
Source reference: /containers/cna/metrics
- Event
- #28619 · Revision 1
- Added to Heist Feed
- Publisher date