In the Linux kernel, the following vulnerability has been resolved:
usb: typec: tcpm: Fix NULL pointer dereference in tcpmpdsvdm()
It is possible that typecregisterpartner() returns ERR_PTR on failure. When port->partner is an error, a NULL pointer dereference may occur as shown below.
[91222.095236][ T319] typec port0: failed to register partner (-17) ... [91225.061491][ T319] Unable to handle kernel NULL pointer dereference at virtual address 000000000000039f [91225.274642][ T319] pc : tcpmpddatarequest+0x310/0x13fc [91225.274646][ T319] lr : tcpmpddatarequest+0x298/0x13fc [91225.308067][ T319] Call trace: [91225.308070][ T319] tcpmpddatarequest+0x310/0x13fc [91225.308073][ T319] tcpmpdrxhandler+0x100/0x9e8 [91225.355900][ T319] kthreadworkerfn+0x178/0x58c [91225.355902][ T319] kthread+0x150/0x200 [91225.355905][ T319] retfromfork+0x10/0x30
Add a check for port->partner to avoid dereferencing a NULL pointer.
[
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b37a168c0137156042a0ca9626651b5a789e822b",
"digest": {
"line_hashes": [
"35573016467239848655303268471538800730",
"174122437642557915359728678336398895727",
"193108449389198265122232582232989138580"
],
"threshold": 0.9
},
"target": {
"file": "drivers/usb/typec/tcpm/tcpm.c"
},
"id": "CVE-2023-52877-09039d6c",
"deprecated": false,
"signature_type": "Line"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4987daf86c152ff882d51572d154ad12e4ff3a4b",
"digest": {
"function_hash": "49297356210018338637199318671671765506",
"length": 4069.0
},
"target": {
"function": "tcpm_pd_svdm",
"file": "drivers/usb/typec/tcpm/tcpm.c"
},
"id": "CVE-2023-52877-2a3ebb5e",
"deprecated": false,
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e5f53a68a596e04df3fde3099273435a30b6fdac",
"digest": {
"line_hashes": [
"35573016467239848655303268471538800730",
"174122437642557915359728678336398895727",
"193108449389198265122232582232989138580"
],
"threshold": 0.9
},
"target": {
"file": "drivers/usb/typec/tcpm/tcpm.c"
},
"id": "CVE-2023-52877-61b3f16d",
"deprecated": false,
"signature_type": "Line"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ee038590d808a95d16adf92818dcd4752273c08",
"digest": {
"line_hashes": [
"35573016467239848655303268471538800730",
"174122437642557915359728678336398895727",
"193108449389198265122232582232989138580"
],
"threshold": 0.9
},
"target": {
"file": "drivers/usb/typec/tcpm/tcpm.c"
},
"id": "CVE-2023-52877-71b30ce6",
"deprecated": false,
"signature_type": "Line"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b37a168c0137156042a0ca9626651b5a789e822b",
"digest": {
"function_hash": "49297356210018338637199318671671765506",
"length": 4069.0
},
"target": {
"function": "tcpm_pd_svdm",
"file": "drivers/usb/typec/tcpm/tcpm.c"
},
"id": "CVE-2023-52877-83ae39ca",
"deprecated": false,
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e7a802447c491903aa7cb45967aa2a934a4e63fc",
"digest": {
"line_hashes": [
"35573016467239848655303268471538800730",
"174122437642557915359728678336398895727",
"193108449389198265122232582232989138580"
],
"threshold": 0.9
},
"target": {
"file": "drivers/usb/typec/tcpm/tcpm.c"
},
"id": "CVE-2023-52877-8a3592f1",
"deprecated": false,
"signature_type": "Line"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e5f53a68a596e04df3fde3099273435a30b6fdac",
"digest": {
"function_hash": "234882573086114640818195768624671904604",
"length": 4126.0
},
"target": {
"function": "tcpm_pd_svdm",
"file": "drivers/usb/typec/tcpm/tcpm.c"
},
"id": "CVE-2023-52877-9791bf25",
"deprecated": false,
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9ee038590d808a95d16adf92818dcd4752273c08",
"digest": {
"function_hash": "49297356210018338637199318671671765506",
"length": 4069.0
},
"target": {
"function": "tcpm_pd_svdm",
"file": "drivers/usb/typec/tcpm/tcpm.c"
},
"id": "CVE-2023-52877-a94302c1",
"deprecated": false,
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4987daf86c152ff882d51572d154ad12e4ff3a4b",
"digest": {
"line_hashes": [
"35573016467239848655303268471538800730",
"174122437642557915359728678336398895727",
"193108449389198265122232582232989138580"
],
"threshold": 0.9
},
"target": {
"file": "drivers/usb/typec/tcpm/tcpm.c"
},
"id": "CVE-2023-52877-d33f74df",
"deprecated": false,
"signature_type": "Line"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e7a802447c491903aa7cb45967aa2a934a4e63fc",
"digest": {
"function_hash": "234882573086114640818195768624671904604",
"length": 4126.0
},
"target": {
"function": "tcpm_pd_svdm",
"file": "drivers/usb/typec/tcpm/tcpm.c"
},
"id": "CVE-2023-52877-e5ee8b0d",
"deprecated": false,
"signature_type": "Function"
}
]