# CVE-2024-38621: media: stk1160: fix bounds checking in stk1160\_copy\_video()

- Priority: **Routine**
- Reason: Not severe (CVSS 7.1, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-06-21 · Modified: 2026-10-15
- Aliases: UBUNTU-CVE-2024-38621, DEBIAN-CVE-2024-38621
- Record: https://cvemate.com/vulnerability/CVE-2024-38621 · JSON: https://cvemate.com/vulnerability/CVE-2024-38621/json

## Description

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

media: stk1160: fix bounds checking in stk1160_copy_video()

The subtract in this condition is reversed.  The ->length is the length
of the buffer.  The ->bytesused is how many bytes we have copied thus
far.  When the condition is reversed that means the result of the
subtraction is always negative but since it's unsigned then the result
is a very high positive value.  That means the overflow check is never
true.

Additionally, the ->bytesused doesn't actually work for this purpose
because we're not writing to "buf->mem + buf->bytesused".  Instead, the
math to calculate the destination where we are writing is a bit
involved.  You calculate the number of full lines already written,
multiply by two, skip a line if necessary so that we start on an odd
numbered line, and add the offset into the line.

To fix this buffer overflow, just take the actual destination where we
are writing, if the offset is already out of bounds print an error and
return.  Otherwise, write up to buf->length bytes.
```

## Signals

- CVSS: 7.1 high (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
- EPSS: 0.276%, percentile 21.39%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 132)

- debian linux (Debian): \< 6.1.94-1 \| \< 6.9.7-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 4.4.0-260.294 \| \< 4.15.0-230.242 \| \< 5.4.0-192.212 \| \< 5.15.0-121.131 \| \< 6.8.0-44.44
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 4.4.0-1137.143 \| \< 4.4.0-1175.190 \| \< 4.15.0-1174.187 \| \< 5.4.0-1130.140 \| \< 5.15.0-1069.75 \| \< 6.8.0-1015.16
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1069.75~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1130.140~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1015.16~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 4.15.0-2112.118 \| All versions (No fix recorded) \| \< 5.4.0-1130.140+fips1 \| \< 5.15.0-1069.75+fips1
- ubuntu linux-aws-hwe (Ubuntu): \< 4.15.0-1174.187~16.04.1
- ubuntu linux-azure (Ubuntu): \< 4.15.0-1182.197~14.04.1 \| \< 4.15.0-1182.197~16.04.1 \| All versions (No fix recorded) \| \< 5.4.0-1135.142 \| \< 5.15.0-1072.81 \| \< 6.8.0-1014.16
- ubuntu linux-azure-4.15 (Ubuntu): \< 4.15.0-1182.197
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 36)

- <https://git.kernel.org/stable/c/f6a392266276730bea893b55d12940e32a25f56a>
- <https://git.kernel.org/stable/c/ecf4ddc3aee8ade504c4d36b7b4053ce6093e200>
- <https://git.kernel.org/stable/c/a16775828aaed1c54ff4e6fe83e8e4d5c6a50cb7>
- <https://git.kernel.org/stable/c/7532bcec0797adfa08791301c3bcae14141db3bd>
- <https://git.kernel.org/stable/c/b504518a397059e1d55c521ba0ea2b545a6c4b52>
- <https://git.kernel.org/stable/c/d410017a7181cb55e4a5c810b32b75e4416c6808>
- <https://git.kernel.org/stable/c/a08492832cc4cacc24e0612f483c86ca899b9261>
- <https://git.kernel.org/stable/c/faa4364bef2ec0060de381ff028d1d836600a381>
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html>
- <https://ubuntu.com/security/CVE-2024-38621>
- <https://www.cve.org/CVERecord?id=CVE-2024-38621>
- <https://git.kernel.org/linus/faa4364bef2ec0060de381ff028d1d836600a381>
- <https://ubuntu.com/security/notices/USN-6951-1>
- <https://ubuntu.com/security/notices/USN-6953-1>
- <https://ubuntu.com/security/notices/USN-6951-2>
- <https://ubuntu.com/security/notices/USN-6951-3>
- <https://ubuntu.com/security/notices/USN-6951-4>
- <https://ubuntu.com/security/notices/USN-6979-1>
- <https://ubuntu.com/security/notices/USN-6999-1>
- <https://ubuntu.com/security/notices/USN-7004-1>

---

Data as of 2026-12-05T06:21:42.507Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
