---
id: CVE-2025-40057
title: 'ptp: Add a upper bound on max_vclocks'
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  ptp: Add a upper bound on max_vclocks

  syzbot reported WARNING in max_vclocks_store.

  This occurs when the argument max is too large for kcalloc to handle.

  Extend the …
severity: none
vendor: Linux
product: Linux
affected:
  - >-
    Linux >= 73f37068d540eba5f93ba3a0019bf479d35ebd76 <
    da513f2ad1b1b1cf1880ccc2603ce1f1f818eb2e
  - >-
    Linux >= 73f37068d540eba5f93ba3a0019bf479d35ebd76 <
    8dd446056336faa2283d62cefc2f576536845edc
  - >-
    Linux >= 73f37068d540eba5f93ba3a0019bf479d35ebd76 <
    35ce5f163889dbce88eda1df661b357a09bbed87
  - >-
    Linux >= 73f37068d540eba5f93ba3a0019bf479d35ebd76 <
    e9f35294e18da82162004a2f35976e7031aaf7f9
  - Linux 5.14
published: '2025-10-28'
updated: '2026-10-21'
sourceUpdated: '2026-10-21T12:37:43.214Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2025-40057'
references:
  - url: 'https://git.kernel.org/stable/c/da513f2ad1b1b1cf1880ccc2603ce1f1f818eb2e'
  - url: 'https://git.kernel.org/stable/c/8dd446056336faa2283d62cefc2f576536845edc'
  - url: 'https://git.kernel.org/stable/c/35ce5f163889dbce88eda1df661b357a09bbed87'
  - url: 'https://git.kernel.org/stable/c/e9f35294e18da82162004a2f35976e7031aaf7f9'
tags:
  - cve.org
epss: 0.00249
epssPercentile: 0.16111
ingestedAt: '2026-10-21T12:48:53.684Z'
---

## Overview

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

ptp: Add a upper bound on max_vclocks

syzbot reported WARNING in max_vclocks_store.

This occurs when the argument max is too large for kcalloc to handle.

Extend the guard to guard against values that are too large for
kcalloc

## Affected

- `Linux >= 73f37068d540eba5f93ba3a0019bf479d35ebd76 < da513f2ad1b1b1cf1880ccc2603ce1f1f818eb2e`
- `Linux >= 73f37068d540eba5f93ba3a0019bf479d35ebd76 < 8dd446056336faa2283d62cefc2f576536845edc`
- `Linux >= 73f37068d540eba5f93ba3a0019bf479d35ebd76 < 35ce5f163889dbce88eda1df661b357a09bbed87`
- `Linux >= 73f37068d540eba5f93ba3a0019bf479d35ebd76 < e9f35294e18da82162004a2f35976e7031aaf7f9`
- `Linux 5.14`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
