{
  "cveId": "CVE-2022-49771",
  "url": "https://patchblox.com/security/cve/CVE-2022-49771",
  "summary": "CVE-2022-49771 is fixed in linux on 1 platform, first by DEBIAN-CVE-2022-49771, released May 1, 2025. It is not reported as exploited. Patch Radar priority: Routine.",
  "title": "linux: In the Linux kernel, the following vulnerability has been resolved:  dm ioctl: fix misbehavior if list_versions races...",
  "description": "In the Linux kernel, the following vulnerability has been resolved:  dm ioctl: fix misbehavior if list_versions races with module loading  __list_versions will first estimate the required space using the \u0022dm_target_iterate(list_version_get_needed, \u0026needed)\u0022 call and then will fill the space using the \u0022dm_target_iterate(list_version_get_info, \u0026iter_info)\u0022 call. Each of these calls locks the targets using the \u0022down_read(\u0026_lock)\u0022 and \u0022up_read(\u0026_lock)\u0022 calls, however between the first and second \u0022dm_target_iterate\u0022 there is no lock held and the target modules can be loaded at this point, so the second \u0022dm_target_iterate\u0022 call may need more space than what was the first \u0022dm_target_iterate\u0022 returned.  The code tries to handle this overflow (see the beginning of list_version_get_info), however this handling is incorrect.  The code sets \u0022param-\u003Edata_size = param-\u003Edata_start \u002B needed\u0022 and \u0022iter_info.end = (char *)vers\u002Blen\u0022 - \u0022needed\u0022 is the size returned by the first dm_target_iterate call; \u0022len\u0022 is the size of the buffer allocated by userspace.  \u0022len\u0022 may be greater than \u0022needed\u0022; in this case, the code will write up to \u0022len\u0022 bytes into the buffer, however param-\u003Edata_size is set to \u0022needed\u0022, so it may write data past the param-\u003Edata_size value. The ioctl interface copies only up to param-\u003Edata_size into userspace, thus part of the result will be truncated.  Fix this bug by setting \u0022iter_info.end = (char *)vers \u002B needed;\u0022 - this guarantees that the second \u0022dm_target_iterate\u0022 call will write only up to the \u0022needed\u0022 buffer and it will exit with \u0022DM_BUFFER_FULL_FLAG\u0022 if it overflows the \u0022needed\u0022 space - in this case, userspace will allocate a larger buffer and retry.  Note that there is also a bug in list_version_get_needed - we need to add \u0022strlen(tt-\u003Ename) \u002B 1\u0022 to the needed size, not \u0022strlen(tt-\u003Ename)\u0022.",
  "published": "2025-05-01T15:16:00Z",
  "severity": "medium",
  "cvss": 4.7,
  "cvssVector": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
  "epss": 0.00159,
  "epssPercentile": 0.05066,
  "priority": "Routine",
  "priorityTier": 4,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "fixes": [
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 12.15 (bookworm)",
      "fixedVersion": "6.0.10-1",
      "fix": "DEBIAN-CVE-2022-49771",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2022-49771",
      "released": "2025-05-01T15:16:00Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 13.5 (trixie)",
      "fixedVersion": "6.0.10-1",
      "fix": "DEBIAN-CVE-2022-49771",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2022-49771",
      "released": "2025-05-01T15:16:00Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 14",
      "fixedVersion": "6.0.10-1",
      "fix": "DEBIAN-CVE-2022-49771",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2022-49771",
      "released": "2025-05-01T15:16:00Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-08T13:06:02Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}