{"id":"CVE-2026-98551","kind":"vulnerability","aliases":["CVE-2026-98551"],"related":[],"title":"Linux kernel perf: arm64 branch stack can leak uninitialised kernel memory","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nperf/core: Fill branch entries with a single assignment\n\nperf_clear_branch_entry_bitfields() clears the bitfields of struct\nperf_branch_entry one by one and leaves from/to alone, since callers\noverwrite those straight away. The list has to be kept in sync with the\nstruct by hand and has already fallen behind: new_type and priv were\nadded to perf_branch_entry and never added here.\n\nOnly BRBE writes those two, and neither for every record.\nbrbe_set_perf_entry_type() leaves new_type alone for a branch type it\ndoes not recognise, and priv is not set for source-only records.\narm_pmuv3.c allocates the per-CPU branch stack with kmalloc(), so such a\nrecord reaches userspace with whatever the slot held: uninitialised\nkmalloc() data on the first pass over the buffer, the previous record's\nvalues after that. Nothing under arch/x86/events/ writes either field,\nso only arm64 is affected.\n\nAssign the whole entry at each site instead. Everything not named is\nthen zero, and there is no list to keep in sync. The bitfields add up to\nexactly 64 bits, so the struct has no padding to leave undefined.\n\nperf_clear_branch_entry_bitfields() has no callers left, so remove it.\nperf_entry_from_brbe_regset() assigns an empty literal instead, since it\nfills from/to conditionally. PERF_BR_SPEC_NA is 0, so dropping the\nexplicit spec assignment changes nothing.","summary":"On arm64, the perf subsystem fills branch-stack records without clearing two fields, so some records sent to userspace hold leftover kernel heap data. An attacker with access to perf sampling could read that residual memory.","severity":"unknown","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["arm64","linux-kernel","other","perf"],"not_affected_if":["non-arm64-hardware","perf-restricted-to-root","x86-64"],"how_to_check":"- `uname -r` and compare against the kernel version that carries the upstream fix (unknown from sources)\n- Check whether the host is arm64 with BRBE hardware: `uname -m` returns `aarch64`\n- Check whether perf branch-stack sampling is allowed for unprivileged users: `cat /proc/sys/kernel/perf_event_paranoid`","fix":"- Update the Linux kernel to a release that includes the upstream commit \"perf/core: Fill branch entries with a single assignment\" (fixed version unknown from sources)\n- Restrict perf access on shared arm64 hosts until patched, for example with `sysctl -w kernel.perf_event_paranoid=3`","status":"open","published_at":"2026-10-18T16:17:07+00:00","first_seen_at":"2026-10-23T21:57:15+00:00","triaged_at":"2026-10-25T05:23:33+00:00","updated_at":"2026-10-25T05:23:33+00:00","category":"other","confidence":0.6,"triage":{"at":"2026-10-25T05:23:33Z","model":"claude-haiku-5-5","output":{"fix":"- Update the Linux kernel to a release that includes the upstream commit \"perf/core: Fill branch entries with a single assignment\" (fixed version unknown from sources)\n- Restrict perf access on shared arm64 hosts until patched, for example with `sysctl -w kernel.perf_event_paranoid=3`","reach":"local","title":"Linux kernel perf: arm64 branch stack can leak uninitialised kernel memory","impact":"low","summary":"On arm64, the perf subsystem fills branch-stack records without clearing two fields, so some records sent to userspace hold leftover kernel heap data. An attacker with access to perf sampling could read that residual memory.","category":"other","nicknames":[],"who_cares":["linux-kernel","arm64","perf"],"confidence":0.6,"needs_auth":"yes","worst_case":"Kernel heap residue readable by a local user through perf samples","analyst_note":"Find the fixed kernel version and stable backport commit from the NVD entry or kernel.org git log for the perf/core change.","how_to_check":"- `uname -r` and compare against the kernel version that carries the upstream fix (unknown from sources)\n- Check whether the host is arm64 with BRBE hardware: `uname -m` returns `aarch64`\n- Check whether perf branch-stack sampling is allowed for unprivileged users: `cat /proc/sys/kernel/perf_event_paranoid`","needs_analyst":true,"not_affected_if":["x86-64","non-arm64-hardware","perf-restricted-to-root"],"who_is_affected":"Only arm64 systems with BRBE branch recording are affected, because only the arm_pmuv3 driver writes these fields. x86 kernels are not affected. Systems where unprivileged users cannot run perf sampling have a much smaller exposure.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000705,"input_tokens":3725,"output_tokens":665,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-2026':13A,16A '-98551':14A,17A '0':296C '64':253C 'access':52B 'add':128C,135C,249C 'affect':223C 'alloc':176C 'alon':98C,155C 'alreadi':120C 'arch/x86/events':215C 'arm':174C 'arm64':4A,18B,25B,221C 'assign':78C,224C,281C,302C 'attack':50B 'away':104C 'behind':122C 'bit':254C 'bitfield':83C,86C,248C,268C 'br':292C 'branch':5A,31B,73C,81C,90C,131C,158C,181C,266C 'branch-stack':30B 'brbe':138C,147C,279C 'buffer':205C 'caller':100C,271C 'chang':303C 'clear':35B,80C,84C,265C 'condit':290C 'could':56B 'cpu':180C 'cve':12A,15A 'data':48B,198C 'drop':298C 'either':217C 'empti':283C 'entri':74C,82C,91C,132C,150C,227C,267C,277C 'everi':145C 'everyth':232C 'exact':252C 'explicit':300C 'fallen':121C 'field':37B,218C 'fill':29B,72C,288C 'first':201C 'follow':66C 'from/to':97C,289C 'hand':117C 'heap':47B 'held':195C 'hold':44B 'instead':231C,285C 'keep':244C 'kept':110C 'kernel':2A,10A,21B,46B,64C 'kmalloc':184C,197C 'leak':8A 'leav':96C,152C,262C 'left':272C 'leftov':45B 'linux':1A,20B,63C 'linux-kernel':19B 'list':106C,242C 'liter':284C 'memori':11A,60B 'na':294C 'name':234C 'neither':143C 'never':134C 'new':123C,153C 'noth':213C,304C 'one':92C,94C 'overwrit':101C 'pad':260C 'pass':202C 'per':179C 'per-cpu':178C 'perf':3A,23B,27B,54B,79C,89C,130C,149C,264C,276C,291C 'perf/core':71C 'pmuv3.c':175C 'previous':207C 'priv':126C,165C 'reach':189C 'read':57B 'recognis':163C 'record':33B,40B,146C,173C,188C,208C 'regset':280C 'remov':274C 'residu':59B 'resolv':70C 'sampl':55B 'sent':41B 'set':148C,168C 'sinc':99C,286C 'singl':77C 'site':230C 'slot':194C 'sourc':171C 'source-on':170C 'spec':293C,301C 'stack':6A,32B,182C 'straight':103C 'struct':88C,115C,257C 'subsystem':28B 'sync':112C,246C 'two':36B,141C 'type':124C,151C,154C,159C 'undefin':263C 'uninitialis':9A,196C 'userspac':43B,190C 'valu':210C 'vulner':67C 'whatev':192C 'whole':226C 'without':34B 'write':139C,216C 'zero':237C","nicknames":[],"mitigations":[],"who_affected":"Only arm64 systems with BRBE branch recording are affected, because only the arm_pmuv3 driver writes these fields. x86 kernels are not affected. Systems where unprivileged users cannot run perf sampling have a much smaller exposure.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-18T16:17:07+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-98551","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98551","severity":null,"published_at":"2026-10-18T16:17:07+00:00","modified_at":"2026-10-19T10:19:11+00:00","first_seen_at":"2026-10-23T21:57:15+00:00","fetched_at":"2026-10-23T22:28:56+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}