CVE-2026-142853: clk: tenstorrent: Assign .num before accessing .hws
In the Linux kernel, the following vulnerability has been resolved:
clk: tenstorrent: Assign .num before accessing .hws
Commit f316cdff8d67 ("clk: Annotate struct clkhwonecelldata with countedby") annotated the hws member of 'struct clkhwonecelldata' with countedby, which informs the bounds sanitizer (UBSANBOUNDS) about the number of elements in .hws[], so that it can warn when .hws[] is accessed out of bounds. As noted in that change, the countedby member must be initialized with the number of elements before the first array access happens, otherwise there will be a warning from each access prior to the initialization because the number of elements is zero. This occurs in atlantisprcmclocksregister() due to .num being assigned only after every clock has been stored in .hws[]. With CONFIGUBSANBOUNDS and a compiler that implements countedby (GCC 15.1+ or Clang 20.1+), this triggers an array-index-out-of-bounds report during probe, and with CONFIGUBSANTRAP the first store traps so the clock provider never registers.
Move the .num initialization to right after the allocation.
[fustini: drop numclks, use data->num per Gustavo]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Compensating control
In the Linux kernel's tenstorrent clock provider, initialize .num immediately after allocation and before the first access to .hws[].
Event History
Frequently Asked Questions
Which systems are likely to exhibit this issue?
Systems using the Tenstorrent Atlantis clock provider are affected when built with CONFIG_UBSAN_BOUNDS and a compiler that implements __counted_by, specifically GCC 15.1 or later or Clang 20.1 or later. The issue occurs when the provider probes.
What is the operational impact if UBSAN is configured to trap?
With CONFIG_UBSAN_TRAP enabled, the first out-of-bounds report traps during probe. As a result, the clock provider does not register.
How can administrators identify that they are affected?
During probe, CONFIG_UBSAN_BOUNDS produces an array-index-out-of-bounds report for accesses to the clock hardware array. If CONFIG_UBSAN_TRAP is enabled, the provider's failure to register is also an indicator.