Cloudanix VulnDB

CVE-2024-38621

None

CVSS

—

EPSS

0.3%

Published

Jun 21, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A Linux video driver contained a calculation error that could let specially crafted video input overwrite memory and potentially allow an attacker to run code on the system.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Privilege Gain
Component
OS kernel
Class
Buffer Overflow
Remediation
Patch
Effort
Medium
Patch risk
Low

What it actually does

Reversed subtraction in unsigned bounds check combined with incorrect tracking of write position in stk1160_copy_video allows writing past buf->length when calculating destination offset from full lines and line parity.

Why it matters to the business

Kernel memory corruption on systems using stk1160 video capture hardware may cause crashes, data corruption, or attacker-controlled code execution; older unpatched kernels remain exposed despite low exploit likelihood.

How an attack unfolds

An attacker supplies crafted video frames to an stk1160 device; the driver performs video copy operations whose reversed length check always evaluates false, permitting writes beyond the allocated buffer at the computed line-and-offset destination.

How to fix it

Upgrade the Linux kernel to the commit f6a392266276730bea893b55d12940e32a25f56a or any later stable tree containing the corrected destination-offset bounds check before writing data.

How to confirm the fix worked

Inspect the stk1160 driver source for the patch that computes the actual write offset, compares it directly against buf->length, and returns early with an error when out of bounds.

Typical attack path

  1. Attach or emulate an stk1160-compatible video source
  2. Initiate video capture that invokes stk1160_copy_video
  3. Supply frames that cause the destination offset to exceed buf->length
  4. Leverage resulting memory corruption for privilege escalation or persistence

How to detect it

Review kernel logs for stk1160 error messages about out-of-bounds offsets, unexpected oops or panic traces during video copy, and any media device initialization anomalies around the time of suspected exploitation.

What your security team should do

  • Apply the referenced kernel commit across all distributions using stk1160 hardware
  • Disable the stk1160 driver module if the device is not required
  • Include media subsystem buffer operations in kernel fuzzing and memory-safety testing

The record

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 packages

Ecosystem Package Introduced Fixed
Debian:10 linux 0 4.19.316-1
Debian:11 linux 0 5.10.221-1
Debian:12 linux 0 6.1.94-1
Debian:13 linux 0 6.9.7-1
Debian:14 linux 0 6.9.7-1
Linux Kernel 3.7.0 4.19.316
Mageia:9 dwarves 0 1.27-1.mga9
Mageia:9 kernel 0 6.6.37-1.mga9
Mageia:9 kernel-linus 0 6.6.37-1.mga9
Mageia:9 kmod-virtualbox 0 7.0.18-50.mga9
Mageia:9 kmod-xtables-addons 0 3.24-59.mga9
SUSE:Linux Enterprise High Availability Extension 12 SP5 kernel-default 0 4.12.14-122.222.1
SUSE:Linux Enterprise High Availability Extension 15 SP5 kernel-default 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise High Availability Extension 15 SP6 kernel-default 0 6.4.0-150600.23.14.2
SUSE:Linux Enterprise Live Patching 12 SP5 kernel-default 0 4.12.14-122.222.1
SUSE:Linux Enterprise Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_58 0 1-8.3.1
SUSE:Linux Enterprise Live Patching 15 SP5 kernel-default 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise Live Patching 15 SP5 kernel-livepatch-SLE15-SP5-RT_Update_17 0 1-150500.11.3.1
SUSE:Linux Enterprise Live Patching 15 SP5 kernel-livepatch-SLE15-SP5_Update_17 0 1-150500.11.3.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-default 0 6.4.0-150600.23.14.2
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6-RT_Update_1 0 1-150600.1.5.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_2 0 1-150600.13.3.2
SUSE:Linux Enterprise Micro 5.5 kernel-default 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise Micro 5.5 kernel-default-base 0 5.14.21-150500.55.73.1.150500.6.33.8
SUSE:Linux Enterprise Micro 5.5 kernel-rt 0 5.14.21-150500.13.61.1
SUSE:Linux Enterprise Micro 5.5 kernel-source-rt 0 5.14.21-150500.13.61.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-64kb 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-default 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-default-base 0 5.14.21-150500.55.73.1.150500.6.33.8
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-source 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 kernel-zfcpdump 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-64kb 0 6.4.0-150600.23.14.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-default 0 6.4.0-150600.23.14.2
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-default-base 0 6.4.0-150600.23.14.2.150600.12.4.3
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-source 0 6.4.0-150600.23.14.2
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-zfcpdump 0 6.4.0-150600.23.14.2
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-docs 0 5.14.21-150500.55.73.2
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-obs-build 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-source 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise Module for Development Tools 15 SP5 kernel-syms 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-docs 0 6.4.0-150600.23.14.2
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-obs-build 0 6.4.0-150600.23.14.2
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-source 0 6.4.0-150600.23.14.2
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-syms 0 6.4.0-150600.23.14.2
SUSE:Linux Enterprise Module for Legacy 15 SP5 kernel-default 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise Module for Legacy 15 SP6 kernel-default 0 6.4.0-150600.23.14.2
SUSE:Linux Enterprise Module for Public Cloud 15 SP5 kernel-azure 0 5.14.21-150500.33.60.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP5 kernel-source-azure 0 5.14.21-150500.33.60.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP5 kernel-syms-azure 0 5.14.21-150500.33.60.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-azure 0 6.4.0-150600.8.8.2
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-source-azure 0 6.4.0-150600.8.8.2
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-syms-azure 0 6.4.0-150600.8.8.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-rt 0 4.12.14-10.191.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-rt_debug 0 4.12.14-10.191.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-source-rt 0 4.12.14-10.191.1
SUSE:Linux Enterprise Real Time 12 SP5 kernel-syms-rt 0 4.12.14-10.191.1
SUSE:Linux Enterprise Server 12 SP5 kernel-azure 0 4.12.14-16.191.1
SUSE:Linux Enterprise Server 12 SP5 kernel-default 0 4.12.14-122.222.1
SUSE:Linux Enterprise Server 12 SP5 kernel-source 0 4.12.14-122.222.1
SUSE:Linux Enterprise Server 12 SP5 kernel-source-azure 0 4.12.14-16.191.1
SUSE:Linux Enterprise Server 12 SP5 kernel-syms 0 4.12.14-122.222.1
SUSE:Linux Enterprise Server 12 SP5 kernel-syms-azure 0 4.12.14-16.191.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-azure 0 4.12.14-16.191.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-default 0 4.12.14-122.222.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-source 0 4.12.14-122.222.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-source-azure 0 4.12.14-16.191.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-syms 0 4.12.14-122.222.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 kernel-syms-azure 0 4.12.14-16.191.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 kernel-docs 0 4.12.14-122.222.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 kernel-obs-build 0 4.12.14-122.222.1
SUSE:Linux Enterprise Workstation Extension 12 SP5 kernel-default 0 4.12.14-122.222.1
SUSE:Linux Enterprise Workstation Extension 15 SP5 kernel-default 0 5.14.21-150500.55.73.1
SUSE:Linux Enterprise Workstation Extension 15 SP6 kernel-default 0 6.4.0-150600.23.14.2
SUSE:Real Time Module 15 SP5 kernel-rt 0 5.14.21-150500.13.61.1
SUSE:Real Time Module 15 SP5 kernel-rt_debug 0 5.14.21-150500.13.61.1
SUSE:Real Time Module 15 SP5 kernel-source-rt 0 5.14.21-150500.13.61.1
SUSE:Real Time Module 15 SP5 kernel-syms-rt 0 5.14.21-150500.13.61.1
SUSE:Real Time Module 15 SP6 kernel-rt 0 6.4.0-150600.10.5.1
SUSE:Real Time Module 15 SP6 kernel-rt_debug 0 6.4.0-150600.10.5.1
SUSE:Real Time Module 15 SP6 kernel-source-rt 0 6.4.0-150600.10.5.1
SUSE:Real Time Module 15 SP6 kernel-syms-rt 0 6.4.0-150600.10.5.1
Ubuntu:16.04:LTS linux-hwe-edge 0 No fix
Ubuntu:18.04:LTS linux-aws-5.0 0 No fix
Ubuntu:18.04:LTS linux-aws-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure 0 No fix
Ubuntu:18.04:LTS linux-azure-5.3 0 No fix
Ubuntu:18.04:LTS linux-azure-edge 0 No fix
Ubuntu:18.04:LTS linux-gcp 0 No fix
Ubuntu:18.04:LTS linux-gcp-5.3 0 No fix
Ubuntu:18.04:LTS linux-gke-4.15 0 No fix
Ubuntu:18.04:LTS linux-gke-5.4 0 No fix
Ubuntu:18.04:LTS linux-gkeop-5.4 0 No fix
Ubuntu:18.04:LTS linux-hwe 0 No fix
Ubuntu:18.04:LTS linux-hwe-edge 0 No fix
Ubuntu:18.04:LTS linux-oem 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.0 0 No fix
Ubuntu:18.04:LTS linux-oracle-5.3 0 No fix
Ubuntu:20.04:LTS linux 0 No fix
Ubuntu:20.04:LTS linux 0 5.4.0-192.212
Ubuntu:20.04:LTS linux-aws 0 No fix
Ubuntu:20.04:LTS linux-aws 0 5.4.0-1130.140
Ubuntu:20.04:LTS linux-aws-5.11 0 No fix
Ubuntu:20.04:LTS linux-aws-5.13 0 No fix
Ubuntu:20.04:LTS linux-aws-5.15 0 No fix
Ubuntu:20.04:LTS linux-aws-5.15 0 5.15.0-1069.75~20.04.1
Ubuntu:20.04:LTS linux-aws-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure 0 No fix
Ubuntu:20.04:LTS linux-azure 0 5.4.0-1135.142
Ubuntu:20.04:LTS linux-azure-5.11 0 No fix
Ubuntu:20.04:LTS linux-azure-5.13 0 No fix
Ubuntu:20.04:LTS linux-azure-5.15 0 No fix
Ubuntu:20.04:LTS linux-azure-5.15 0 5.15.0-1072.81~20.04.1
Ubuntu:20.04:LTS linux-azure-5.8 0 No fix
Ubuntu:20.04:LTS linux-azure-fde 0 No fix
Ubuntu:20.04:LTS linux-azure-fde-5.15 0 No fix
Ubuntu:20.04:LTS linux-azure-fde-5.15 0 5.15.0-1072.81~20.04.1.1
Ubuntu:20.04:LTS linux-bluefield 0 No fix
Ubuntu:20.04:LTS linux-bluefield 0 5.4.0-1090.97
Ubuntu:20.04:LTS linux-gcp 0 No fix
Ubuntu:20.04:LTS linux-gcp 0 5.4.0-1134.143
Ubuntu:20.04:LTS linux-gcp-5.11 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.13 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.15 0 No fix
Ubuntu:20.04:LTS linux-gcp-5.15 0 5.15.0-1068.76~20.04.1
Ubuntu:20.04:LTS linux-gcp-5.8 0 No fix
Ubuntu:20.04:LTS linux-gke 0 No fix
Ubuntu:20.04:LTS linux-gke-5.15 0 No fix
Ubuntu:20.04:LTS linux-gkeop 0 No fix
Ubuntu:20.04:LTS linux-gkeop 0 5.4.0-1097.101
Ubuntu:20.04:LTS linux-gkeop-5.15 0 No fix
Ubuntu:20.04:LTS linux-gkeop-5.15 0 5.15.0-1052.59~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.11 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.13 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.15 0 No fix
Ubuntu:20.04:LTS linux-hwe-5.15 0 5.15.0-121.131~20.04.1
Ubuntu:20.04:LTS linux-hwe-5.8 0 No fix
Ubuntu:20.04:LTS linux-ibm 0 No fix
Ubuntu:20.04:LTS linux-ibm 0 5.4.0-1077.82
Ubuntu:20.04:LTS linux-ibm-5.15 0 No fix
Ubuntu:20.04:LTS linux-ibm-5.15 0 5.15.0-1062.65~20.04.1
Ubuntu:20.04:LTS linux-intel-5.13 0 No fix
Ubuntu:20.04:LTS linux-intel-iotg-5.15 0 No fix
Ubuntu:20.04:LTS linux-intel-iotg-5.15 0 5.15.0-1064.70~20.04.1
Ubuntu:20.04:LTS linux-iot 0 No fix
Ubuntu:20.04:LTS linux-iot 0 5.4.0-1042.43
Ubuntu:20.04:LTS linux-kvm 0 No fix
Ubuntu:20.04:LTS linux-kvm 0 5.4.0-1118.125
Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15 0 No fix
Ubuntu:20.04:LTS linux-lowlatency-hwe-5.15 0 5.15.0-121.131~20.04.1
Ubuntu:20.04:LTS linux-nvidia-tegra-5.15 0 5.15.0-1030.30~20.04.1
Ubuntu:20.04:LTS linux-oem-5.10 0 No fix
Ubuntu:20.04:LTS linux-oem-5.13 0 No fix
Ubuntu:20.04:LTS linux-oem-5.14 0 No fix
Ubuntu:20.04:LTS linux-oem-5.6 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 No fix
Ubuntu:20.04:LTS linux-oracle 0 5.4.0-1129.138
Ubuntu:20.04:LTS linux-oracle-5.11 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.13 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.15 0 No fix
Ubuntu:20.04:LTS linux-oracle-5.15 0 5.15.0-1067.73~20.04.1
Ubuntu:20.04:LTS linux-oracle-5.8 0 No fix
Ubuntu:20.04:LTS linux-raspi 0 No fix
Ubuntu:20.04:LTS linux-raspi 0 5.4.0-1114.126
Ubuntu:20.04:LTS linux-raspi2 0 No fix
Ubuntu:20.04:LTS linux-riscv 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.11 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.15 0 No fix
Ubuntu:20.04:LTS linux-riscv-5.15 0 5.15.0-1065.69~20.04.1
Ubuntu:20.04:LTS linux-riscv-5.8 0 No fix
Ubuntu:20.04:LTS linux-xilinx-zynqmp 0 No fix
Ubuntu:20.04:LTS linux-xilinx-zynqmp 0 5.4.0-1049.53
Ubuntu:22.04:LTS linux 0 No fix
Ubuntu:22.04:LTS linux 0 5.15.0-121.131
Ubuntu:22.04:LTS linux-allwinner-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws 0 No fix
Ubuntu:22.04:LTS linux-aws 0 5.15.0-1069.75
Ubuntu:22.04:LTS linux-aws-5.19 0 No fix
Ubuntu:22.04:LTS linux-aws-6.2 0 No fix
Ubuntu:22.04:LTS linux-aws-6.5 0 No fix
Ubuntu:22.04:LTS linux-aws-6.8 0 6.8.0-1015.16~22.04.1
Ubuntu:22.04:LTS linux-azure 0 No fix
Ubuntu:22.04:LTS linux-azure 0 5.15.0-1072.81
Ubuntu:22.04:LTS linux-azure-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-6.2 0 No fix
Ubuntu:22.04:LTS linux-azure-6.5 0 No fix
Ubuntu:22.04:LTS linux-azure-6.8 0 6.8.0-1014.16~22.04.1
Ubuntu:22.04:LTS linux-azure-fde 0 No fix
Ubuntu:22.04:LTS linux-azure-fde 0 5.15.0-1072.81.1
Ubuntu:22.04:LTS linux-azure-fde-5.19 0 No fix
Ubuntu:22.04:LTS linux-azure-fde-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp 0 No fix
Ubuntu:22.04:LTS linux-gcp 0 5.15.0-1068.76
Ubuntu:22.04:LTS linux-gcp-5.19 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.2 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.5 0 No fix
Ubuntu:22.04:LTS linux-gcp-6.8 0 6.8.0-1014.16~22.04.1
Ubuntu:22.04:LTS linux-gke 0 No fix
Ubuntu:22.04:LTS linux-gke 0 5.15.0-1066.72
Ubuntu:22.04:LTS linux-gkeop 0 No fix
Ubuntu:22.04:LTS linux-gkeop 0 5.15.0-1052.59

Related vulnerabilities