Lucene search

K
cvelistLinuxCVELIST:CVE-2021-46968
HistoryFeb 27, 2024 - 6:47 p.m.

CVE-2021-46968 s390/zcrypt: fix zcard and zqueue hot-unplug memleak

2024-02-2718:47:04
Linux
www.cve.org
linux kernel
vulnerability
s390/zcrypt
zcard
zqueue
hot-unplug
memleak
kref counter
kmemdebug kernel

7.5 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

15.7%

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

s390/zcrypt: fix zcard and zqueue hot-unplug memleak

Tests with kvm and a kmemdebug kernel showed, that on hot unplug the
zcard and zqueue structs for the unplugged card or queue are not
properly freed because of a mismatch with get/put for the embedded
kref counter.

This fix now adjusts the handling of the kref counters. With init the
kref counter starts with 1. This initial value needs to drop to zero
with the unregister of the card or queue to trigger the release and
free the object.

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/s390/crypto/zcrypt_card.c",
      "drivers/s390/crypto/zcrypt_queue.c"
    ],
    "versions": [
      {
        "version": "29c2680fd2bf",
        "lessThan": "026499a9c2e0",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "29c2680fd2bf",
        "lessThan": "055a063a18bc",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "29c2680fd2bf",
        "lessThan": "971dc8706cee",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "29c2680fd2bf",
        "lessThan": "70fac8088cfa",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/s390/crypto/zcrypt_card.c",
      "drivers/s390/crypto/zcrypt_queue.c"
    ],
    "versions": [
      {
        "version": "5.10",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.10",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.36",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.11.20",
        "lessThanOrEqual": "5.11.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.12.3",
        "lessThanOrEqual": "5.12.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.13",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

7.5 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

15.7%