Lucene search

K
vulnrichmentLinuxVULNRICHMENT:CVE-2021-47024
HistoryFeb 28, 2024 - 8:13 a.m.

CVE-2021-47024 vsock/virtio: free queued packets when closing socket

2024-02-2808:13:36
Linux
github.com
linux kernel
vsock
virtio
memory leak
socket
rx queue

6.7 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.7%

In the Linux kernel, the following vulnerability has been resolved:

vsock/virtio: free queued packets when closing socket

As reported by syzbot [1], there is a memory leak while closing the
socket. We partially solved this issue with commit ac03046ece2b
(“vsock/virtio: free packets during the socket release”), but we
forgot to drain the RX queue when the socket is definitely closed by
the scheduled work.

To avoid future issues, let’s use the new virtio_transport_remove_sock()
to drain the RX queue before removing the socket from the af_vsock lists
calling vsock_remove_sock().

[1] https://syzkaller.appspot.com/bug?extid=24452624fc4c571eedd9

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/vmw_vsock/virtio_transport_common.c"
    ],
    "versions": [
      {
        "version": "ac03046ece2b",
        "lessThan": "b605673b523f",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ac03046ece2b",
        "lessThan": "27691665145e",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ac03046ece2b",
        "lessThan": "37c38674ef2f",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "ac03046ece2b",
        "lessThan": "8432b8114957",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/vmw_vsock/virtio_transport_common.c"
    ],
    "versions": [
      {
        "version": "5.2",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.2",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.37",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.11.21",
        "lessThanOrEqual": "5.11.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.12.4",
        "lessThanOrEqual": "5.12.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.13",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

6.7 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.7%