Skip to content
Heist/ feed
Back to feed
MediumFix available

can: af_can: fix NULL pointer dereference in can_rx_register()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: can: af_can: fix NULL pointer dereference in can_rx_register() It causes NULL pointer dereference when testing as following: (a) use syscall(__NR_socket, 0x10ul, 3ul, 0) to create netlink socket. (b) use syscall(__NR_sendmsg, ...) to create bond link device and vxcan link device, and bind vxcan device to bond device (can also use ifenslave command to bind vxcan device to bond device). (c) use syscall(__NR_socket, 0x1dul, 3ul, 1) to create CAN socket. (d) use syscall(__NR_bind, ...) to bind the bond device to CAN socket. The bond device invokes the can-raw protocol registration interface to receive CAN packets. However, ml_priv is not allocated to the dev, dev_rcv_lists is assigned to NULL in can_rx_register(). In this case, it will occur the NULL pointer dereference issue. The following is the stack information: BUG: kernel NULL pointer dereference, address: 0000000000000008 PGD 122a4067 P4D 122a4067 PUD 1223c067 PMD 0 Oops: 0000 [#1] PREEMPT SMP RIP: 0010:can_rx_register+0x12d/0x1e0 Call Trace: raw_enable_filters+0x8d/0x120 raw_enable_allfilters+0x3b/0x130 raw_bind+0x118/0x4f0 __sys_bind+0x163/0x1a0 __x64_sys_bind+0x1e/0x30 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.155, 5.15.79, 5.4.225, 6.0.9
CVEs
CVE-2022-49863
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 10:36 UTC · Revision 1

Source evidence

can: af_can: fix NULL pointer dereference in can_rx_register()

core-osv · Original source

Published 1 May 2025, 14:10 UTC

In the Linux kernel, the following vulnerability has been resolved: can: af_can: fix NULL pointer dereference in can_rx_register() It causes NULL pointer dereference when testing as following: (a) use syscall(__NR_socket, 0x10ul, 3ul, 0) to create netlink socket. (b) use syscall(__NR_sendmsg, ...) to create bond link device and vxcan link device, and bind vxcan device to bond device (can also use ifenslave command to bind vxcan device to bond device). (c) use syscall(__NR_socket, 0x1dul, 3ul, 1) to create CAN socket. (d) use syscall(__NR_bind, ...) to bind the bond device to CAN socket. The bond device invokes the can-raw protocol registration interface to receive CAN packets. However, ml_priv is not allocated to the dev, dev_rcv_lists is assigned to NULL in can_rx_register(). In this case, it will occur the NULL pointer dereference issue. The following is the stack information: BUG: kernel NULL pointer dereference, address: 0000000000000008 PGD 122a4067 P4D 122a4067 PUD 1223c067 PMD 0 Oops: 0000 [#1] PREEMPT SMP RIP: 0010:can_rx_register+0x12d/0x1e0 Call Trace: raw_enable_filters+0x8d/0x120 raw_enable_allfilters+0x3b/0x130 raw_bind+0x118/0x4f0 __sys_bind+0x163/0x1a0 __x64_sys_bind+0x1e/0x30 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd

osv:CVE-2022-49863

Kernel

Fixed versions: 5.4.225, 5.10.155, 5.15.79, 6.0.9

Complete source record
{
  "id": "4b9977d23de374d83e47375576990d2e692092952f5dd78f9b7613fdad1bceca",
  "url": "https://osv.dev/vulnerability/CVE-2022-49863",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "can: af_can: fix NULL pointer dereference in can_rx_register()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: can: af_can: fix NULL pointer dereference in can_rx_register() It causes NULL pointer dereference when testing as following: (a) use syscall(__NR_socket, 0x10ul, 3ul, 0) to create netlink socket. (b) use syscall(__NR_sendmsg, ...) to create bond link device and vxcan link device, and bind vxcan device to bond device (can also use ifenslave command to bind vxcan device to bond device). (c) use syscall(__NR_socket, 0x1dul, 3ul, 1) to create CAN socket. (d) use syscall(__NR_bind, ...) to bind the bond device to CAN socket. The bond device invokes the can-raw protocol registration interface to receive CAN packets. However, ml_priv is not allocated to the dev, dev_rcv_lists is assigned to NULL in can_rx_register(). In this case, it will occur the NULL pointer dereference issue. The following is the stack information: BUG: kernel NULL pointer dereference, address: 0000000000000008 PGD 122a4067 P4D 122a4067 PUD 1223c067 PMD 0 Oops: 0000 [#1] PREEMPT SMP RIP: 0010:can_rx_register+0x12d/0x1e0 Call Trace: raw_enable_filters+0x8d/0x120 raw_enable_allfilters+0x3b/0x130 raw_bind+0x118/0x4f0 __sys_bind+0x163/0x1a0 __x64_sys_bind+0x1e/0x30 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd",
    "evidence": "osv:CVE-2022-49863",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.4.225",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.155",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.79",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.0.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "CVE-2022-49863",
      "aliases": [
        "CVE-2022-49863"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "4ac1feff6ea6495cbfd336f4438a6c6d140544a6"
                },
                {
                  "fixed": "afab4655750fcb3fca359bc7d7214e3d634cdf9c"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "1a5751d58b14195f763b8c1d9ef33fb8a93e95e7"
                },
                {
                  "fixed": "d68fa77ee3d03bad6fe84e89759ddf7005f9e9c6"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "4e096a18867a5a989b510f6999d9c6b6622e8f7b"
                },
                {
                  "fixed": "261178a1c2623077d62e374a75c195e6c99a6f05"
                },
                {
                  "fixed": "a8055677b054bc2bb78beb1080fdc2dc5158c2fe"
                },
                {
                  "fixed": "8aa59e355949442c408408c2d836e561794c40a1"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.4.110"
                },
                {
                  "fixed": "5.4.225"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.10.28"
                },
                {
                  "fixed": "5.10.155"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.11.12"
                },
                {
                  "fixed": "5.12"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "96340078d50a54f6a1252c62596bc44321c8bff9"
                }
              ]
            }
          ],
          "versions": [
            "v5.4.224",
            "v5.4.223",
            "v5.4.222",
            "v5.4.221",
            "v5.4.220",
            "v5.4.219",
            "v5.4.218",
            "v5.4.217",
            "v5.4.216",
            "v5.4.215",
            "v5.4.214",
            "v5.4.213",
            "v5.4.212",
            "v5.4.211",
            "v5.4.210",
            "v5.4.209",
            "v5.4.208",
            "v5.4.207",
            "v5.4.206",
            "v5.4.205",
            "v5.4.204",
            "v5.4.203",
            "v5.4.202",
            "v5.4.201",
            "v5.4.200",
            "v5.4.199",
            "v5.4.198",
            "v5.4.197",
            "v5.4.196",
            "v5.4.195",
            "v5.4.194",
            "v5.4.193",
            "v5.4.192",
            "v5.4.191",
            "v5.4.190",
            "v5.4.189",
            "v5.4.188",
            "v5.4.187",
            "v5.4.186",
            "v5.4.185",
            "v5.4.184",
            "v5.4.183",
            "v5.4.182",
            "v5.4.181",
            "v5.4.180",
            "v5.4.179",
            "v5.4.178",
            "v5.4.177",
            "v5.4.176",
            "v5.4.175",
            "v5.4.174",
            "v5.4.173",
            "v5.4.172",
            "v5.4.171",
            "v5.4.170",
            "v5.4.169",
            "v5.4.168",
            "v5.4.167",
            "v5.4.166",
            "v5.4.165",
            "v5.4.164",
            "v5.4.163",
            "v5.4.162",
            "v5.4.161",
            "v5.4.160",
            "v5.4.159",
            "v5.4.158",
            "v5.4.157",
            "v5.4.156",
            "v5.4.155",
            "v5.4.154",
            "v5.4.153",
            "v5.4.152",
            "v5.4.151",
            "v5.4.150",
            "v5.4.149",
            "v5.4.148",
            "v5.4.147",
            "v5.4.146",
            "v5.4.145",
            "v5.4.144",
            "v5.4.143",
            "v5.4.142",
            "v5.4.141",
            "v5.4.140",
            "v5.4.139",
            "v5.4.138",
            "v5.4.137",
            "v5.4.136",
            "v5.4.135",
            "v5.4.134",
            "v5.4.133",
            "v5.4.132",
            "v5.4.131",
            "v5.4.130",
            "v5.4.129",
            "v5.4.128",
            "v5.4.127",
            "v5.4.126",
            "v5.4.125",
            "v5.4.124",
            "v5.4.123",
            "v5.4.122",
            "v5.4.121",
            "v5.4.120",
            "v5.4.119",
            "v5.4.118",
            "v5.4.117",
            "v5.4.116",
            "v5.4.115",
            "v5.4.114",
            "v5.4.113",
            "v5.4.112",
            "v5.4.111",
            "v5.4.110",
            "v5.10.154",
            "v5.10.153",
            "v5.10.152",
            "v5.10.151",
            "v5.10.150",
            "v5.10.149",
            "v5.10.148",
            "v5.10.147",
            "v5.10.146",
            "v5.10.145",
            "v5.10.144",
            "v5.10.143",
            "v5.10.142",
            "v5.10.141",
            "v5.10.140",
            "v5.10.139",
            "v5.10.138",
            "v5.10.137",
            "v5.10.136",
            "v5.10.135",
            "v5.10.134",
            "v5.10.133",
            "v5.10.132",
            "v5.10.131",
            "v5.10.130",
            "v5.10.129",
            "v5.10.128",
            "v5.10.127",
            "v5.10.126",
            "v5.10.125",
            "v5.10.124",
            "v5.10.123",
            "v5.10.122",
            "v5.10.121",
            "v5.10.120",
            "v5.10.119",
            "v5.10.118",
            "v5.10.117",
            "v5.10.116",
            "v5.10.115",
            "v5.10.114",
            "v5.10.113",
            "v5.10.112",
            "v5.10.111",
            "v5.10.110",
            "v5.10.109",
            "v5.10.108",
            "v5.10.107",
            "v5.10.106",
            "v5.10.105",
            "v5.10.104",
            "v5.10.103",
            "v5.10.102",
            "v5.10.101",
            "v5.10.100",
            "v5.10.99",
            "v5.10.98",
            "v5.10.97",
            "v5.10.96",
            "v5.10.95",
            "v5.10.94",
            "v5.10.93",
            "v5.10.92",
            "v5.10.91",
            "v5.10.90",
            "v5.10.89",
            "v5.10.88",
            "v5.10.87",
            "v5.10.86",
            "v5.10.85",
            "v5.10.84",
            "v5.10.83",
            "v5.10.82",
            "v5.10.81",
            "v5.10.80",
            "v5.10.79",
            "v5.10.78",
            "v5.10.77",
            "v5.10.76",
            "v5.10.75",
            "v5.10.74",
            "v5.10.73",
            "v5.10.72",
            "v5.10.71",
            "v5.10.70",
            "v5.10.69",
            "v5.10.68",
            "v5.10.67",
            "v5.10.66",
            "v5.10.65",
            "v5.10.64",
            "v5.10.63",
            "v5.10.62",
            "v5.10.61",
            "v5.10.60",
            "v5.10.59",
            "v5.10.58",
            "v5.10.57",
            "v5.10.56",
            "v5.10.55",
            "v5.10.54",
            "v5.10.53",
            "v5.10.52",
            "v5.10.51",
            "v5.10.50",
            "v5.10.49",
            "v5.10.48",
            "v5.10.47",
            "v5.10.46",
            "v5.10.45",
            "v5.10.44",
            "v5.10.43",
            "v5.10.42",
            "v5.10.41",
            "v5.10.40",
            "v5.10.39",
            "v5.10.38",
            "v5.10.37",
            "v5.10.36",
            "v5.10.35",
            "v5.10.34",
            "v5.10.33",
            "v5.10.32",
            "v5.10.31",
            "v5.10.30",
            "v5.10.29",
            "v5.10.28",
            "v5.11.22",
            "v5.11.21",
            "v5.11.20",
            "v5.11.19",
            "v5.11.18",
            "v5.11.17",
            "v5.11.16",
            "v5.11.15",
            "v5.11.14",
            "v5.11.13",
            "v5.11.12"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49863.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5.4.225"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.155"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.79"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.12.0"
                },
                {
                  "fixed": "6.0.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49863.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:28.300290997Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/261178a1c2623077d62e374a75c195e6c99a6f05",
        "https://git.kernel.org/stable/c/8aa59e355949442c408408c2d836e561794c40a1",
        "https://git.kernel.org/stable/c/a8055677b054bc2bb78beb1080fdc2dc5158c2fe",
        "https://git.kernel.org/stable/c/afab4655750fcb3fca359bc7d7214e3d634cdf9c",
        "https://git.kernel.org/stable/c/d68fa77ee3d03bad6fe84e89759ddf7005f9e9c6",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49863.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-49863",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49863.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-49863",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 494583,
  "published_at": "2025-05-01T14:10:16.403+00:00"
}