pseries/papr-hvpipe: Fix null ptr deref in papr_hvpipe_dev_create_handle()
In the Linux kernel, the following vulnerability has been resolved: pseries/papr-hvpipe: Fix null ptr deref in papr_hvpipe_dev_create_handle() commit 6d3789d347a7 ("papr-hvpipe: convert papr_hvpipe_dev_create_handle() to FD_PREPARE()"), changed the create handle to FD_PREPARE(), but it caused kernel null-ptr-deref because after call to retain_and_null_ptr(src_info), src_info is re-used for adding it to the global list. Getting the following kernel panic in papr_hvpipe_dev_create_handle() when trying to add src_info to the list. Kernel attempted to write user page (0) - exploit attempt? (uid: 0) BUG: Kernel NULL pointer dereference on write at 0x00000000 Faulting instruction address: 0xc0000000001b44a0 Oops: Kernel access of bad area, sig: 11 [#1] ... Call Trace: papr_hvpipe_dev_ioctl+0x1f4/0x48c (unreliable) sys_ioctl+0x528/0x1064 system_call_exception+0x128/0x360 system_call_vectored_common+0x15c/0x2ec Now, the error handling with FD_PREPARE's file cleanup and __free(kfree) auto cleanup is getting too convoluted. This is mainly because we need to ensure only 1 user get the srcID handle. To simplify this, we allocate prepare the src_info in the beginning and add it to the global list under a spinlock after checking that no duplicates exist. This simplify the error handling where if the FD_ADD fails, we can simply remove the src_info from the list and consume any pending msg in hvpipe to be cleared, after src_info became visible in the global list.
CVE-2026-46118
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-46118
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": "09c15bbbed533903e600660ea09098b3b0524f48",
"lessThan": "735439394dde8462f9b50566727fbe333beaadaf",
"versionType": "git"
},
{
"status": "affected",
"version": "6d3789d347a7af5c4b0b2da3af47b8d9da607ab2",
"lessThan": "cf51bec1560f8bf115d1476f60335f9d90e110b0",
"versionType": "git"
},
{
"status": "affected",
"version": "6d3789d347a7af5c4b0b2da3af47b8d9da607ab2",
"lessThan": "1b9f7aafa44f5ce852c00509104d10fd9eb0f402",
"versionType": "git"
},
{
"status": "affected",
"version": "51a321dec76f7e39403a0574897a4409a8a700c4",
"versionType": "git"
},
{
"status": "affected",
"version": "6.18.32",
"lessThan": "6.18.33",
"versionType": "semver"
}
],
"programFiles": [
"arch/powerpc/platforms/pseries/papr-hvpipe.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.19"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "6.19",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "6.18.33",
"versionType": "semver",
"lessThanOrEqual": "6.18.*"
},
{
"status": "unaffected",
"version": "7.0.7",
"versionType": "semver",
"lessThanOrEqual": "7.0.*"
},
{
"status": "unaffected",
"version": "7.1",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"arch/powerpc/platforms/pseries/papr-hvpipe.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-46118
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #28604 · Revision 1
- Added to Heist Feed
- Publisher date