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

  safesetid: check size of policy writes

  syzbot attempts to write a buffer with a large size to a sysfs entry
  with writes handled by handle_policy_update(), triggering a…
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  safesetid: check size of policy writes

  syzbot attempts to write a buffer with a large size to a sysfs entry
  with writes handled by handle_policy_update(), triggering a…
severity: medium
cvss: 5.5
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'
vendor: linux
product: linux_kernel
affected:
  - 'linux_kernel >= 5.1, < 5.10.235'
  - 'linux_kernel >= 5.11, < 5.15.179'
  - 'linux_kernel >= 5.16, < 6.1.129'
  - 'linux_kernel >= 6.2, < 6.6.78'
  - 'linux_kernel >= 6.7, < 6.12.14'
  - 'linux_kernel >= 6.13, < 6.13.3'
patched:
  - linux_kernel 6.13.3
published: '2025-02-27'
updated: '2026-07-14'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2024-58016'
references:
  - url: 'https://git.kernel.org/stable/c/36b385d0f2b4c0bf41d491e19075ecd990d2bf94'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/96fae5bd1589731592d30b3953a90a77ef3928a6'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/976284b94f2021df09829e37a367e19b84d9e5f3'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/a0dec65f88c8d9290dfa1d2ca1e897abe54c5881'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/c71d35676d46090c891b6419f253fb92a1a9f4eb'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/ecf6a4a558097920447a6fb84dfdb279e2ac749a'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/f09ff307c7299392f1c88f763299e24bc99811c7'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-019113.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-265688.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
tags:
  - nvd
  - cve.org
epss: 0.00207
epssPercentile: 0.09649
ingestedAt: '2026-07-14T13:36:55.580Z'
---

## Overview

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

safesetid: check size of policy writes

syzbot attempts to write a buffer with a large size to a sysfs entry
with writes handled by handle_policy_update(), triggering a warning
in kmalloc.

Check the size specified for write buffers before allocating.

[PM: subject tweak]

## Affected

- `linux_kernel >= 5.1, < 5.10.235`
- `linux_kernel >= 5.11, < 5.15.179`
- `linux_kernel >= 5.16, < 6.1.129`
- `linux_kernel >= 6.2, < 6.6.78`
- `linux_kernel >= 6.7, < 6.12.14`
- `linux_kernel >= 6.13, < 6.13.3`

## Remediation

Upgrade past the affected range:

- `linux_kernel 6.13.3`
