{"id":"CVE-2026-99159","state":"PUBLISHED","title":"ring-buffer: Fix the sub-buffer array base in rb_meta_subbuf_idx()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nring-buffer: Fix the sub-buffer array base in rb_meta_subbuf_idx()\n\nOn a persistent ring buffer, rb_meta_subbuf_idx() can return an index one\nsub-buffer too high.  rb_setup_ids_meta_page() then fills subbuf_ids[]\nshifted by one and leaves subbuf_ids[0] NULL, which __rb_map_vma()\ndereferences when userspace maps trace_pipe_raw.  rb_update_meta_reader()\nwrites two such indices into meta->buffers[], which rb_cpu_meta_valid()\nwould reject on the next boot, discarding the previous boot's trace.\n\nA CPU's sub-buffer array starts after its meta header and the nr_subbufs\nintegers that follow, aligned up to a sub-buffer.  rb_meta_subbuf_idx()\ninverts that calculation but skips only the integers, not the header, so\nits base is one sub-buffer low whenever the omitted header size crosses\nthe alignment boundary.\n\nInvert the calculation with rb_subbufs_from_meta() rather than repeating\nit.  rb_range_buffer() maps an index back to an address through the same\nhelper, so the two directions can no longer disagree.","publishedAt":"2026-10-28T10:35:12.520Z","updatedAt":"2026-10-30T12:42:25.874Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b14d032973d4e6c36e025e96ea3437de53d072d9","status":"affected","lessThan":"0c0cf2240bb5ca5704ea932ba66ee54f43173915","versionType":"git"},{"version":"b14d032973d4e6c36e025e96ea3437de53d072d9","status":"affected","lessThan":"2f1248b728b56d583ea454fedf239550c49f7b18","versionType":"git"},{"version":"b14d032973d4e6c36e025e96ea3437de53d072d9","status":"affected","lessThan":"7469b3585ef5f65840d467d2caa811a9098c84b9","versionType":"git"},{"version":"b14d032973d4e6c36e025e96ea3437de53d072d9","status":"affected","lessThan":"25132363c723afc39aace8b098f547ab4a0ea759","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/trace/ring_buffer.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.115","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.59","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.13","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/trace/ring_buffer.c"]}],"references":["https://git.kernel.org/stable/c/0c0cf2240bb5ca5704ea932ba66ee54f43173915","https://git.kernel.org/stable/c/2f1248b728b56d583ea454fedf239550c49f7b18","https://git.kernel.org/stable/c/7469b3585ef5f65840d467d2caa811a9098c84b9","https://git.kernel.org/stable/c/25132363c723afc39aace8b098f547ab4a0ea759"],"weaknesses":[],"ingestedAt":"2026-10-30T13:02:04.640Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99159.json","commit":"cb14bf1b43b0c9f05f7f40eae2246263fd430780","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99159","state":"PUBLISHED","datePublished":"2026-10-28T10:35:12.520Z","dateUpdated":"2026-10-30T12:42:25.874Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.397Z"},"containers":{"cna":{"title":"ring-buffer: Fix the sub-buffer array base in rb_meta_subbuf_idx()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nring-buffer: Fix the sub-buffer array base in rb_meta_subbuf_idx()\n\nOn a persistent ring buffer, rb_meta_subbuf_idx() can return an index one\nsub-buffer too high.  rb_setup_ids_meta_page() then fills subbuf_ids[]\nshifted by one and leaves subbuf_ids[0] NULL, which __rb_map_vma()\ndereferences when userspace maps trace_pipe_raw.  rb_update_meta_reader()\nwrites two such indices into meta->buffers[], which rb_cpu_meta_valid()\nwould reject on the next boot, discarding the previous boot's trace.\n\nA CPU's sub-buffer array starts after its meta header and the nr_subbufs\nintegers that follow, aligned up to a sub-buffer.  rb_meta_subbuf_idx()\ninverts that calculation but skips only the integers, not the header, so\nits base is one sub-buffer low whenever the omitted header size crosses\nthe alignment boundary.\n\nInvert the calculation with rb_subbufs_from_meta() rather than repeating\nit.  rb_range_buffer() maps an index back to an address through the same\nhelper, so the two directions can no longer disagree."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b14d032973d4e6c36e025e96ea3437de53d072d9","status":"affected","lessThan":"0c0cf2240bb5ca5704ea932ba66ee54f43173915","versionType":"git"},{"version":"b14d032973d4e6c36e025e96ea3437de53d072d9","status":"affected","lessThan":"2f1248b728b56d583ea454fedf239550c49f7b18","versionType":"git"},{"version":"b14d032973d4e6c36e025e96ea3437de53d072d9","status":"affected","lessThan":"7469b3585ef5f65840d467d2caa811a9098c84b9","versionType":"git"},{"version":"b14d032973d4e6c36e025e96ea3437de53d072d9","status":"affected","lessThan":"25132363c723afc39aace8b098f547ab4a0ea759","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/trace/ring_buffer.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.12","versionType":"semver"},{"version":"6.12.115","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.59","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.13","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/trace/ring_buffer.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/0c0cf2240bb5ca5704ea932ba66ee54f43173915"},{"url":"https://git.kernel.org/stable/c/2f1248b728b56d583ea454fedf239550c49f7b18"},{"url":"https://git.kernel.org/stable/c/7469b3585ef5f65840d467d2caa811a9098c84b9"},{"url":"https://git.kernel.org/stable/c/25132363c723afc39aace8b098f547ab4a0ea759"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:42:25.874Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.12.115"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.18.59"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"7.2.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}