Lucene search

K
cve416baaa9-dc9f-4396-8d5f-8c081fb06d67CVE-2021-47047
HistoryFeb 28, 2024 - 9:15 a.m.

CVE-2021-47047

2024-02-2809:15:40
416baaa9-dc9f-4396-8d5f-8c081fb06d67
web.nvd.nist.gov
728
linux
kernel
spi
zynqmp
gqspi
vulnerability
security
update
dma
memory management
cve-2021-47047

6.4 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.7%

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

spi: spi-zynqmp-gqspi: return -ENOMEM if dma_map_single fails

The spi controller supports 44-bit address space on AXI in DMA mode,
so set dma_addr_t width to 44-bit to avoid using a swiotlb mapping.
In addition, if dma_map_single fails, it should return immediately
instead of continuing doing the DMA operation which bases on invalid
address.

This fixes the following crash which occurs in reading a big block
from flash:

[ 123.633577] zynqmp-qspi ff0f0000.spi: swiotlb buffer is full (sz: 4194304 bytes), total 32768 (slots), used 0 (slots)
[ 123.644230] zynqmp-qspi ff0f0000.spi: ERR:rxdma:memory not mapped
[ 123.784625] Unable to handle kernel paging request at virtual address 00000000003fffc0
[ 123.792536] Mem abort info:
[ 123.795313] ESR = 0x96000145
[ 123.798351] EC = 0x25: DABT (current EL), IL = 32 bits
[ 123.803655] SET = 0, FnV = 0
[ 123.806693] EA = 0, S1PTW = 0
[ 123.809818] Data abort info:
[ 123.812683] ISV = 0, ISS = 0x00000145
[ 123.816503] CM = 1, WnR = 1
[ 123.819455] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000805047000
[ 123.825887] [00000000003fffc0] pgd=0000000803b45003, p4d=0000000803b45003, pud=0000000000000000
[ 123.834586] Internal error: Oops: 96000145 [#1] PREEMPT SMP

Affected configurations

Vulners
Node
linuxlinux_kernelRange5.105.10.37
OR
linuxlinux_kernelRange5.11.05.11.21
OR
linuxlinux_kernelRange5.12.05.12.4
OR
linuxlinux_kernelRange5.13.0
VendorProductVersionCPE
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "drivers/spi/spi-zynqmp-gqspi.c"
    ],
    "versions": [
      {
        "version": "1c26372e5aa9",
        "lessThan": "5980a3b9c933",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1c26372e5aa9",
        "lessThan": "c26c026eb496",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1c26372e5aa9",
        "lessThan": "bad5a23cf2b4",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "1c26372e5aa9",
        "lessThan": "126bdb606fd2",
        "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/spi/spi-zynqmp-gqspi.c"
    ],
    "versions": [
      {
        "version": "5.10",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.10",
        "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.4 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.7%