---
id: CVE-2024-35962
title: |-
  In the Linux kernel, the following vulnerability has been resolved:

  netfilter: complete validation of user input

  In my recent commit, I missed that do_replace() handlers
  use copy_from_sockptr() (which I fixed), followed
  by unsafe copy_…
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  netfilter: complete validation of user input

  In my recent commit, I missed that do_replace() handlers
  use copy_from_sockptr() (which I fixed), followed
  by unsafe copy_…
severity: high
cvss: 7.1
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H'
vendor: linux
product: linux_kernel
affected:
  - 'linux_kernel >= 5.15.154, < 5.15.156'
  - 'linux_kernel >= 6.1.85, < 6.1.87'
  - 'linux_kernel >= 6.6.26, < 6.6.28'
  - 'linux_kernel >= 6.8.5, < 6.8.7'
  - linux_kernel = 5.10.215
  - linux_kernel = 6.9
  - debian_linux = 10.0
patched:
  - linux_kernel 6.8.7
published: '2024-05-20'
updated: '2026-10-15'
sourceUpdated: '2026-10-15T01:18:13.690'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2024-35962'
references:
  - url: 'https://git.kernel.org/stable/c/562b7245131f6e9f1d280c8b5a8750f03edfc05c'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/65acf6e0501ac8880a4f73980d01b5d27648b956'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/89242d9584c342cb83311b598d9e6b82572eadf8'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/97dab36e57c64106e1c8ebd66cbf0d2d1e52d6b7'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/c760089aa98289b4b88a7ff5a62dd92845adf223'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/cf4bc359b76144a3dd55d7c09464ef4c5f2b2b05'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/562b7245131f6e9f1d280c8b5a8750f03edfc05c'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/65acf6e0501ac8880a4f73980d01b5d27648b956'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/89242d9584c342cb83311b598d9e6b82572eadf8'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/97dab36e57c64106e1c8ebd66cbf0d2d1e52d6b7'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/c760089aa98289b4b88a7ff5a62dd92845adf223'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/cf4bc359b76144a3dd55d7c09464ef4c5f2b2b05'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-265688.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-613116.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
tags:
  - nvd
  - cve.org
epss: 0.0024
epssPercentile: 0.14966
ingestedAt: '2026-10-15T03:30:12.692Z'
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2024-09-10T15:40:32.586631Z'
---

## Overview

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

netfilter: complete validation of user input

In my recent commit, I missed that do_replace() handlers
use copy_from_sockptr() (which I fixed), followed
by unsafe copy_from_sockptr_offset() calls.

In all functions, we can perform the @optlen validation
before even calling xt_alloc_table_info() with the following
check:

if ((u64)optlen < (u64)tmp.size + sizeof(tmp))
        return -EINVAL;

## Affected

- `linux_kernel >= 5.15.154, < 5.15.156`
- `linux_kernel >= 6.1.85, < 6.1.87`
- `linux_kernel >= 6.6.26, < 6.6.28`
- `linux_kernel >= 6.8.5, < 6.8.7`
- `linux_kernel = 5.10.215`
- `linux_kernel = 6.9`
- `debian_linux = 10.0`

## Remediation

Upgrade past the affected range:

- `linux_kernel 6.8.7`
