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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.35% (percentile 21, 2026-11-28)
- **CWE:** CWE-787
- **Published:** 2024-06-21T10:18:14.955Z
- **Modified:** 2026-10-15T01:18:32.100Z

## Who should check

- Anyone running Linux \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< f6a392266276730bea893b55d12940e32a25f56a; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< ecf4ddc3aee8ade504c4d36b7b4053ce6093e200; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< a16775828aaed1c54ff4e6fe83e8e4d5c6a50cb7; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< 7532bcec0797adfa08791301c3bcae14141db3bd; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< b504518a397059e1d55c521ba0ea2b545a6c4b52; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< d410017a7181cb55e4a5c810b32b75e4416c6808; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< a08492832cc4cacc24e0612f483c86ca899b9261; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< faa4364bef2ec0060de381ff028d1d836600a381
- Anyone running Linux 3.7

## Description

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.

## Affected and fixed versions

- Linux: \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< f6a392266276730bea893b55d12940e32a25f56a; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< ecf4ddc3aee8ade504c4d36b7b4053ce6093e200; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< a16775828aaed1c54ff4e6fe83e8e4d5c6a50cb7; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< 7532bcec0797adfa08791301c3bcae14141db3bd; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< b504518a397059e1d55c521ba0ea2b545a6c4b52; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< d410017a7181cb55e4a5c810b32b75e4416c6808; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< a08492832cc4cacc24e0612f483c86ca899b9261; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< faa4364bef2ec0060de381ff028d1d836600a381 (cvelist)
- Linux: 3.7 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-38621. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-38621.md
Affected: Linux >= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, < f6a392266276730bea893b55d12940e32a25f56a; >= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, < ecf4ddc3aee8ade504c4d36b7b4053ce6093e200; >= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, < a16775828aaed1c54ff4e6fe83e8e4d5c6a50cb7; >= 9cb2173e6ea8f2948bd1367…
Fixed in: Linux 7532bcec0797adfa08791301c3bcae14141db3bd

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-38621 being exploited?

There is no confirmed exploitation: CVE-2024-38621 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.35% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2024-38621?

High: CVSS 7.1 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-38621?

Linux \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< f6a392266276730bea893b55d12940e32a25f56a; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< ecf4ddc3aee8ade504c4d36b7b4053ce6093e200; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< a16775828aaed1c54ff4e6fe83e8e4d5c6a50cb7; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< 7532bcec0797adfa08791301c3bcae14141db3bd; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< b504518a397059e1d55c521ba0ea2b545a6c4b52; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< d410017a7181cb55e4a5c810b32b75e4416c6808; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< a08492832cc4cacc24e0612f483c86ca899b9261; \>= 9cb2173e6ea8f2948bd1367c93083a2500fcf08f, \< faa4364bef2ec0060de381ff028d1d836600a381; Linux 3.7.

### Is there a fix for CVE-2024-38621?

Yes. Fixed in Linux 7532bcec0797adfa08791301c3bcae14141db3bd. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-38621?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/f6a392266276730bea893b55d12940e32a25f56a>
- patch: <https://git.kernel.org/stable/c/ecf4ddc3aee8ade504c4d36b7b4053ce6093e200>
- patch: <https://git.kernel.org/stable/c/a16775828aaed1c54ff4e6fe83e8e4d5c6a50cb7>
- patch: <https://git.kernel.org/stable/c/7532bcec0797adfa08791301c3bcae14141db3bd>
- patch: <https://git.kernel.org/stable/c/b504518a397059e1d55c521ba0ea2b545a6c4b52>
- patch: <https://git.kernel.org/stable/c/d410017a7181cb55e4a5c810b32b75e4416c6808>
- patch: <https://git.kernel.org/stable/c/a08492832cc4cacc24e0612f483c86ca899b9261>
- patch: <https://git.kernel.org/stable/c/faa4364bef2ec0060de381ff028d1d836600a381>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-398330.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-38621>

HTML: <https://flawdb.com/CVE-2024-38621> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-38621>
