{"id":"AZL-116818","summary":"CVE-2026-138980 affecting package kernel 6.6.161.1-1","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nclk: mvebu: ap-cpu-clk: Assign .num before accessing .hws\n\nCommit f316cdff8d67 (\"clk: Annotate struct clk_hw_onecell_data with\n__counted_by\") annotated the hws member of 'struct clk_hw_onecell_data'\nwith __counted_by, which informs the bounds sanitizer (UBSAN_BOUNDS)\nabout the number of elements in .hws[], so that it can warn when .hws[]\nis accessed out of bounds. As noted in that change, the __counted_by\nmember must be initialized with the number of elements before the first\narray access happens, otherwise there will be a warning from each access\nprior to the initialization because the number of elements is zero.\nThis occurs in ap_cpu_clock_probe(), which reads .hws[] to skip clusters\nthat have already been set up and writes it inside the CPU node loop,\nbut only assigns .num after the loop. With CONFIG_UBSAN_BOUNDS and a\ncompiler that implements __counted_by (GCC 15.1+ or Clang 20.1+), this\ntriggers an array-index-out-of-bounds report during probe of the AP806\nand AP807 CPU clocks, and with CONFIG_UBSAN_TRAP the first access traps.\n\nInitialize .num with nclusters, the number of elements .hws[] was\nallocated with, right after the allocation. For the in-tree AP806 and\nAP807 device trees, which list the CPU nodes in ascending order, this is\nexactly the value the old assignment produced. It is also the correct\nvalue for any other node order, since of_clk_hw_onecell_get() rejects\nindices at or beyond .num.","modified":"2026-12-01T14:17:41.026157285Z","published":"2026-11-30T14:18:00Z","upstream":["CVE-2026-138980"],"references":[{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138980"}],"affected":[{"package":{"name":"kernel","ecosystem":"Azure Linux:3","purl":"pkg:rpm/azure-linux/kernel"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"6.6.161.1-1"}]}],"database_specific":{"source":"https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-116818.json"}}],"schema_version":"1.9.2"}