CVE-2022-49329: vduse: Fix NULL pointer dereference on sysfs access
In the Linux kernel, the following vulnerability has been resolved:
vduse: Fix NULL pointer dereference on sysfs access
The control device has no drvdata. So we will get a NULL pointer dereference when accessing control device's msgtimeout attribute via sysfs:
[ 132.841881][ T3644] BUG: kernel NULL pointer dereference, address: 00000000000000f8 [ 132.850619][ T3644] RIP: 0010:msgtimeoutshow (drivers/vdpa/vdpauser/vdusedev.c:1271) [ 132.869447][ T3644] devattrshow (drivers/base/core.c:2094) [ 132.870215][ T3644] sysfskfseqshow (fs/sysfs/file.c:59) [ 132.871164][ T3644] ? deviceremovebinfile (drivers/base/core.c:2088) [ 132.872082][ T3644] kernfsseqshow (fs/kernfs/file.c:164) [ 132.872838][ T3644] seqreaditer (fs/seqfile.c:230) [ 132.873578][ T3644] ? vmallocareanode (mm/vmalloc.c:3041) [ 132.874532][ T3644] kernfsfopreaditer (fs/kernfs/file.c:238) [ 132.875513][ T3644] kernelread (fs/readwrite.c:440 (discriminator 1)) [ 132.876319][ T3644] kernelread (fs/readwrite.c:459) [ 132.877129][ T3644] kernelreadfile (fs/kernelreadfile.c:94) [ 132.877978][ T3644] kernelreadfilefromfd (include/linux/file.h:45 fs/kernelreadfile.c:186) [ 132.879019][ T3644] dosysfinitmodule (kernel/module.c:4207) [ 132.879930][ T3644] ia32sysfinitmodule (kernel/module.c:4189) [ 132.880930][ T3644] doint80syscall32 (arch/x86/entry/common.c:112 arch/x86/entry/common.c:132) [ 132.881847][ T3644] entryINT80compat (arch/x86/entry/entry64compat.S:419)
To fix it, don't create the unneeded attribute for control device anymore.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-aws-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1020.24~20.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1020.25~20.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1018.24~20.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-48.54~20.04.1 - Upgrade
Upgrade
ubuntu/linux-intel-iotg-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1016.21~20.04.1 - Upgrade
Upgrade
ubuntu/linux-lowlatency-hwe-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-48.54~20.04.1 - Upgrade
Upgrade
ubuntu/linux-oracle-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1018.23~20.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-5.15to a version that resolves this vulnerability.Fixed in 5.15.0-1019.22~20.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 5.15.0-48.54 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 5.15.0-1020.24 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 5.15.0-1020.25 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 5.15.0-1024.30.1 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 5.15.0-1018.24 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 5.15.0-1016.19 - Upgrade
Upgrade
ubuntu/linux-gkeopto a version that resolves this vulnerability.Fixed in 5.15.0-1003.5 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 5.15.0-1015.17 - Upgrade
Upgrade
ubuntu/linux-intel-iotgto a version that resolves this vulnerability.Fixed in 5.15.0-1016.21 - Upgrade
Upgrade
ubuntu/linux-kvmto a version that resolves this vulnerability.Fixed in 5.15.0-1018.22 - Upgrade
Upgrade
ubuntu/linux-lowlatencyto a version that resolves this vulnerability.Fixed in 5.15.0-48.54 - Upgrade
Upgrade
ubuntu/linux-nvidiato a version that resolves this vulnerability.Fixed in 5.15.0-1007.7 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 5.15.0-1018.23 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 5.15.0-1015.17 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 5.15.0-1021.21 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.18.5-1 - Configuration
Do not create the unneeded msg_timeout sysfs attribute for the control device.
Linux kernel vduse control device msg_timeout sysfs attribute = not created
Event History
Frequently Asked Questions
What is the severity of CVE-2022-49329?
CVE-2022-49329 is categorized as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2022-49329?
To fix CVE-2022-49329, update the Linux kernel to a version that addresses the NULL pointer dereference.
What versions of the Linux kernel are affected by CVE-2022-49329?
CVE-2022-49329 affects Linux kernel versions from 5.15 up to 5.19-rc1, excluding the patched versions.
What type of vulnerability is CVE-2022-49329?
CVE-2022-49329 is a NULL pointer dereference vulnerability caused by improper handling of the msg_timeout attribute in sysfs.
Who should be concerned about CVE-2022-49329?
System administrators and users of affected Linux kernel versions should address CVE-2022-49329 to prevent potential system crashes.