CVE-2022-50774 (GCVE-0-2022-50774)
Vulnerability from cvelistv5
Published
2025-12-24 13:06
Modified
2025-12-24 13:06
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: crypto: qat - fix DMA transfer direction When CONFIG_DMA_API_DEBUG is selected, while running the crypto self test on the QAT crypto algorithms, the function add_dma_entry() reports a warning similar to the one below, saying that overlapping mappings are not supported. This occurs in tests where the input and the output scatter list point to the same buffers (i.e. two different scatter lists which point to the same chunks of memory). The logic that implements the mapping uses the flag DMA_BIDIRECTIONAL for both the input and the output scatter lists which leads to overlapped write mappings. These are not supported by the DMA layer. Fix by specifying the correct DMA transfer directions when mapping buffers. For in-place operations where the input scatter list matches the output scatter list, buffers are mapped once with DMA_BIDIRECTIONAL, otherwise input buffers are mapped using the flag DMA_TO_DEVICE and output buffers are mapped with DMA_FROM_DEVICE. Overlapping a read mapping with a write mapping is a valid case in dma-coherent devices like QAT. The function that frees and unmaps the buffers, qat_alg_free_bufl() has been changed accordingly to the changes to the mapping function. DMA-API: 4xxx 0000:06:00.0: cacheline tracking EEXIST, overlapping mappings aren't supported WARNING: CPU: 53 PID: 4362 at kernel/dma/debug.c:570 add_dma_entry+0x1e9/0x270 ... Call Trace: dma_map_page_attrs+0x82/0x2d0 ? preempt_count_add+0x6a/0xa0 qat_alg_sgl_to_bufl+0x45b/0x990 [intel_qat] qat_alg_aead_dec+0x71/0x250 [intel_qat] crypto_aead_decrypt+0x3d/0x70 test_aead_vec_cfg+0x649/0x810 ? number+0x310/0x3a0 ? vsnprintf+0x2a3/0x550 ? scnprintf+0x42/0x70 ? valid_sg_divisions.constprop.0+0x86/0xa0 ? test_aead_vec+0xdf/0x120 test_aead_vec+0xdf/0x120 alg_test_aead+0x185/0x400 alg_test+0x3d8/0x500 ? crypto_acomp_scomp_free_ctx+0x30/0x30 ? __schedule+0x32a/0x12a0 ? ttwu_queue_wakelist+0xbf/0x110 ? _raw_spin_unlock_irqrestore+0x23/0x40 ? try_to_wake_up+0x83/0x570 ? _raw_spin_unlock_irqrestore+0x23/0x40 ? __set_cpus_allowed_ptr_locked+0xea/0x1b0 ? crypto_acomp_scomp_free_ctx+0x30/0x30 cryptomgr_test+0x27/0x50 kthread+0xe6/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30
Impacted products
Vendor Product Version
Linux Linux Version: d370cec3219490656d72f5ae6e5df32c113c5a44
Version: d370cec3219490656d72f5ae6e5df32c113c5a44
Version: d370cec3219490656d72f5ae6e5df32c113c5a44
Version: d370cec3219490656d72f5ae6e5df32c113c5a44
Version: d370cec3219490656d72f5ae6e5df32c113c5a44
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/crypto/qat/qat_common/qat_algs.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "426d5bc089e7731e36b514d1beca19e777a2d653",
              "status": "affected",
              "version": "d370cec3219490656d72f5ae6e5df32c113c5a44",
              "versionType": "git"
            },
            {
              "lessThan": "1f1ab76e251521bd2fa5244473efcf663792745d",
              "status": "affected",
              "version": "d370cec3219490656d72f5ae6e5df32c113c5a44",
              "versionType": "git"
            },
            {
              "lessThan": "429348d4f675e9eb418d0829064c4d7d06bd66a3",
              "status": "affected",
              "version": "d370cec3219490656d72f5ae6e5df32c113c5a44",
              "versionType": "git"
            },
            {
              "lessThan": "c4c9d9edf4848aed89516b23b88950b194beff6a",
              "status": "affected",
              "version": "d370cec3219490656d72f5ae6e5df32c113c5a44",
              "versionType": "git"
            },
            {
              "lessThan": "cf5bb835b7c8a5fee7f26455099cca7feb57f5e9",
              "status": "affected",
              "version": "d370cec3219490656d72f5ae6e5df32c113c5a44",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/crypto/qat/qat_common/qat_algs.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.17"
            },
            {
              "lessThan": "3.17",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.150",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.75",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.19.*",
              "status": "unaffected",
              "version": "5.19.17",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.150",
                  "versionStartIncluding": "3.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.75",
                  "versionStartIncluding": "3.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19.17",
                  "versionStartIncluding": "3.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.3",
                  "versionStartIncluding": "3.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1",
                  "versionStartIncluding": "3.17",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: qat - fix DMA transfer direction\n\nWhen CONFIG_DMA_API_DEBUG is selected, while running the crypto self\ntest on the QAT crypto algorithms, the function add_dma_entry() reports\na warning similar to the one below, saying that overlapping mappings\nare not supported. This occurs in tests where the input and the output\nscatter list point to the same buffers (i.e. two different scatter lists\nwhich point to the same chunks of memory).\n\nThe logic that implements the mapping uses the flag DMA_BIDIRECTIONAL\nfor both the input and the output scatter lists which leads to\noverlapped write mappings. These are not supported by the DMA layer.\n\nFix by specifying the correct DMA transfer directions when mapping\nbuffers. For in-place operations where the input scatter list\nmatches the output scatter list, buffers are mapped once with\nDMA_BIDIRECTIONAL, otherwise input buffers are mapped using the flag\nDMA_TO_DEVICE and output buffers are mapped with DMA_FROM_DEVICE.\nOverlapping a read mapping with a write mapping is a valid case in\ndma-coherent devices like QAT.\nThe function that frees and unmaps the buffers, qat_alg_free_bufl()\nhas been changed accordingly to the changes to the mapping function.\n\n   DMA-API: 4xxx 0000:06:00.0: cacheline tracking EEXIST, overlapping mappings aren\u0027t supported\n   WARNING: CPU: 53 PID: 4362 at kernel/dma/debug.c:570 add_dma_entry+0x1e9/0x270\n   ...\n   Call Trace:\n   dma_map_page_attrs+0x82/0x2d0\n   ? preempt_count_add+0x6a/0xa0\n   qat_alg_sgl_to_bufl+0x45b/0x990 [intel_qat]\n   qat_alg_aead_dec+0x71/0x250 [intel_qat]\n   crypto_aead_decrypt+0x3d/0x70\n   test_aead_vec_cfg+0x649/0x810\n   ? number+0x310/0x3a0\n   ? vsnprintf+0x2a3/0x550\n   ? scnprintf+0x42/0x70\n   ? valid_sg_divisions.constprop.0+0x86/0xa0\n   ? test_aead_vec+0xdf/0x120\n   test_aead_vec+0xdf/0x120\n   alg_test_aead+0x185/0x400\n   alg_test+0x3d8/0x500\n   ? crypto_acomp_scomp_free_ctx+0x30/0x30\n   ? __schedule+0x32a/0x12a0\n   ? ttwu_queue_wakelist+0xbf/0x110\n   ? _raw_spin_unlock_irqrestore+0x23/0x40\n   ? try_to_wake_up+0x83/0x570\n   ? _raw_spin_unlock_irqrestore+0x23/0x40\n   ? __set_cpus_allowed_ptr_locked+0xea/0x1b0\n   ? crypto_acomp_scomp_free_ctx+0x30/0x30\n   cryptomgr_test+0x27/0x50\n   kthread+0xe6/0x110\n   ? kthread_complete_and_exit+0x20/0x20\n   ret_from_fork+0x1f/0x30"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-12-24T13:06:04.391Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/426d5bc089e7731e36b514d1beca19e777a2d653"
        },
        {
          "url": "https://git.kernel.org/stable/c/1f1ab76e251521bd2fa5244473efcf663792745d"
        },
        {
          "url": "https://git.kernel.org/stable/c/429348d4f675e9eb418d0829064c4d7d06bd66a3"
        },
        {
          "url": "https://git.kernel.org/stable/c/c4c9d9edf4848aed89516b23b88950b194beff6a"
        },
        {
          "url": "https://git.kernel.org/stable/c/cf5bb835b7c8a5fee7f26455099cca7feb57f5e9"
        }
      ],
      "title": "crypto: qat - fix DMA transfer direction",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50774",
    "datePublished": "2025-12-24T13:06:04.391Z",
    "dateReserved": "2025-12-24T13:02:21.547Z",
    "dateUpdated": "2025-12-24T13:06:04.391Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50774\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-24T13:16:04.230\",\"lastModified\":\"2025-12-24T13:16:04.230\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncrypto: qat - fix DMA transfer direction\\n\\nWhen CONFIG_DMA_API_DEBUG is selected, while running the crypto self\\ntest on the QAT crypto algorithms, the function add_dma_entry() reports\\na warning similar to the one below, saying that overlapping mappings\\nare not supported. This occurs in tests where the input and the output\\nscatter list point to the same buffers (i.e. two different scatter lists\\nwhich point to the same chunks of memory).\\n\\nThe logic that implements the mapping uses the flag DMA_BIDIRECTIONAL\\nfor both the input and the output scatter lists which leads to\\noverlapped write mappings. These are not supported by the DMA layer.\\n\\nFix by specifying the correct DMA transfer directions when mapping\\nbuffers. For in-place operations where the input scatter list\\nmatches the output scatter list, buffers are mapped once with\\nDMA_BIDIRECTIONAL, otherwise input buffers are mapped using the flag\\nDMA_TO_DEVICE and output buffers are mapped with DMA_FROM_DEVICE.\\nOverlapping a read mapping with a write mapping is a valid case in\\ndma-coherent devices like QAT.\\nThe function that frees and unmaps the buffers, qat_alg_free_bufl()\\nhas been changed accordingly to the changes to the mapping function.\\n\\n   DMA-API: 4xxx 0000:06:00.0: cacheline tracking EEXIST, overlapping mappings aren\u0027t supported\\n   WARNING: CPU: 53 PID: 4362 at kernel/dma/debug.c:570 add_dma_entry+0x1e9/0x270\\n   ...\\n   Call Trace:\\n   dma_map_page_attrs+0x82/0x2d0\\n   ? preempt_count_add+0x6a/0xa0\\n   qat_alg_sgl_to_bufl+0x45b/0x990 [intel_qat]\\n   qat_alg_aead_dec+0x71/0x250 [intel_qat]\\n   crypto_aead_decrypt+0x3d/0x70\\n   test_aead_vec_cfg+0x649/0x810\\n   ? number+0x310/0x3a0\\n   ? vsnprintf+0x2a3/0x550\\n   ? scnprintf+0x42/0x70\\n   ? valid_sg_divisions.constprop.0+0x86/0xa0\\n   ? test_aead_vec+0xdf/0x120\\n   test_aead_vec+0xdf/0x120\\n   alg_test_aead+0x185/0x400\\n   alg_test+0x3d8/0x500\\n   ? crypto_acomp_scomp_free_ctx+0x30/0x30\\n   ? __schedule+0x32a/0x12a0\\n   ? ttwu_queue_wakelist+0xbf/0x110\\n   ? _raw_spin_unlock_irqrestore+0x23/0x40\\n   ? try_to_wake_up+0x83/0x570\\n   ? _raw_spin_unlock_irqrestore+0x23/0x40\\n   ? __set_cpus_allowed_ptr_locked+0xea/0x1b0\\n   ? crypto_acomp_scomp_free_ctx+0x30/0x30\\n   cryptomgr_test+0x27/0x50\\n   kthread+0xe6/0x110\\n   ? kthread_complete_and_exit+0x20/0x20\\n   ret_from_fork+0x1f/0x30\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1f1ab76e251521bd2fa5244473efcf663792745d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/426d5bc089e7731e36b514d1beca19e777a2d653\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/429348d4f675e9eb418d0829064c4d7d06bd66a3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c4c9d9edf4848aed89516b23b88950b194beff6a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/cf5bb835b7c8a5fee7f26455099cca7feb57f5e9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…