In the Linux kernel, the following vulnerability has been resolved:
nfs: Fix oops in nfsnetfsinit_request() when copying to cache
When netfslib wants to copy some data that has just been read on behalf of nfs, it creates a new write request and calls nfsnetfsinitrequest() to initialise it, but with a NULL file pointer. This causes nfsfileopencontext() to oops - however, we don't actually need the nfs context as we're only going to write to the cache.
Fix this by just returning if we aren't given a file pointer and emit a warning if the request was for something other than copy-to-cache.
Further, fix nfsnetfsfree_request() so that it doesn't try to free the context if the pointer is NULL.
[
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "fs/nfs/fscache.c",
"function": "nfs_netfs_free_request"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@86ad1a58f6a9453f49e06ef957a40a8dac00a13f",
"digest": {
"length": 78.0,
"function_hash": "149624015792555002310967084961459057935"
},
"id": "CVE-2024-57927-58ddc04d"
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "fs/nfs/fscache.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@13a07cc81e2d116cece727a83746c74b87a9d417",
"digest": {
"line_hashes": [
"151039052059422756701507094003179693666",
"93687285684680949223642731496834913809",
"50551173095926656690000299964460809483",
"314746233970742359602510162519596408109",
"43784536471887418707871127871181026367",
"29159308183900946616238393507855752866",
"144388387736014460225681187803120743835",
"238097278181896340679907754326703170759"
],
"threshold": 0.9
},
"id": "CVE-2024-57927-7084e4af"
},
{
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "fs/nfs/fscache.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@86ad1a58f6a9453f49e06ef957a40a8dac00a13f",
"digest": {
"line_hashes": [
"151039052059422756701507094003179693666",
"93687285684680949223642731496834913809",
"50551173095926656690000299964460809483",
"314746233970742359602510162519596408109",
"43784536471887418707871127871181026367",
"29159308183900946616238393507855752866",
"144388387736014460225681187803120743835",
"238097278181896340679907754326703170759"
],
"threshold": 0.9
},
"id": "CVE-2024-57927-8552e8f4"
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "fs/nfs/fscache.c",
"function": "nfs_netfs_init_request"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@86ad1a58f6a9453f49e06ef957a40a8dac00a13f",
"digest": {
"length": 329.0,
"function_hash": "10216901889780335553585311804814843055"
},
"id": "CVE-2024-57927-888cb2ba"
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "fs/nfs/fscache.c",
"function": "nfs_netfs_init_request"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@13a07cc81e2d116cece727a83746c74b87a9d417",
"digest": {
"length": 329.0,
"function_hash": "10216901889780335553585311804814843055"
},
"id": "CVE-2024-57927-a3a85769"
},
{
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "fs/nfs/fscache.c",
"function": "nfs_netfs_free_request"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@13a07cc81e2d116cece727a83746c74b87a9d417",
"digest": {
"length": 78.0,
"function_hash": "149624015792555002310967084961459057935"
},
"id": "CVE-2024-57927-bdade742"
}
]