{"id":"CVE-2026-98639","kind":"vulnerability","aliases":["CVE-2026-98639"],"related":[],"title":"Linux kernel RISC-V KVM: nested TLB flush ranges can be wrong","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: riscv: Fix NACL hfence entry update order\n\nThe SBI v3.0 specification (section 15.1.2) requires a nested HFENCE\nentry to be populated as follows:\n1) find an unused entry with Config.Pending == 0\n2) update the Page_Number and Page_Count words\n3) update the Config word with Config.Pending set\n\n__kvm_riscv_nacl_hfence() writes the Config word first, so the SBI\nimplementation (or NACL hardware) can observe a pending entry with\npnum/pcount values left over from the previous use of that entry,\nresulting in incorrect TLB flush ranges.\n\nWrite pnum and pcount first and the Config word last. Since the\nconsumer is an external agent on coherent shared memory, use\nWRITE_ONCE() to stop the compiler from reordering the stores and\nsmp_wmb() to make the parameter words globally visible before the\nPending bit is set.","summary":"On RISC-V hosts running KVM, the kernel wrote the nested HFENCE entry's config word before its page number and count words, so the SBI implementation or hardware could act on stale range values from an earlier use of that entry. The fix writes the parameter words first, then the config word, with memory barriers.","severity":"unknown","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["kvm","linux-kernel","riscv","runtime","self-hosted"],"not_affected_if":["no-kvm","non-riscv-hardware"],"how_to_check":null,"fix":null,"status":"open","published_at":"2026-10-18T16:17:17+00:00","first_seen_at":"2026-10-23T21:57:16+00:00","triaged_at":"2026-10-25T05:20:56+00:00","updated_at":"2026-10-25T05:20:56+00:00","category":"runtime","confidence":0.6,"triage":{"at":"2026-10-25T05:20:56Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"local","title":"Linux kernel RISC-V KVM: nested TLB flush ranges can be wrong","impact":"medium","summary":"On RISC-V hosts running KVM, the kernel wrote the nested HFENCE entry's config word before its page number and count words, so the SBI implementation or hardware could act on stale range values from an earlier use of that entry. The fix writes the parameter words first, then the config word, with memory barriers.","category":"runtime","nicknames":[],"who_cares":["linux-kernel","riscv","kvm","self-hosted"],"confidence":0.6,"needs_auth":"unknown","worst_case":"Incorrect TLB flush ranges in a virtualized guest, possibly leaking stale mappings","analyst_note":"Check the kernel stable backports and the affected version range on the NVD entry; the sources give no severity, versions or exploitation detail.","how_to_check":"unknown","needs_analyst":true,"not_affected_if":["non-riscv-hardware","no-kvm"],"who_is_affected":"Only hosts running the Linux kernel on RISC-V with KVM virtualization and the nested acceleration (NACL) SBI extension in use. Standard x86 or ARM hosts, and RISC-V machines not running KVM guests, are not affected.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000598,"input_tokens":3542,"output_tokens":488,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-2026':15A,18A '-98639':16A,19A '0':127C '1':120C '15.1.2':109C '2':128C '3':137C 'act':60B 'agent':200C 'barrier':85B 'bit':229C 'coher':202C 'compil':211C 'config':44B,81B,140C,151C,191C 'config.pending':126C,143C 'consum':196C 'could':59B 'count':51B,135C 'cve':14A,17A 'earlier':67B 'entri':42B,71B,101C,114C,124C,165C,177C 'extern':199C 'find':121C 'first':78B,153C,188C 'fix':73B,98C 'flush':9A,182C 'follow':91C,119C 'global':224C 'hardwar':58B,160C 'hfenc':41B,100C,113C,148C 'host':28B,33B 'implement':56B,157C 'incorrect':180C 'kernel':2A,23B,37B,89C 'kvm':6A,20B,35B,96C,145C 'last':193C 'left':169C 'linux':1A,22B,88C 'linux-kernel':21B 'make':220C 'memori':84B,204C 'nacl':99C,147C,159C 'nest':7A,40B,112C 'number':49B,132C 'observ':162C 'order':103C 'page':48B,131C,134C 'paramet':76B,222C 'pcount':187C 'pend':164C,228C 'pnum':185C 'pnum/pcount':167C 'popul':117C 'previous':173C 'rang':10A,63B,183C 'reorder':213C 'requir':110C 'resolv':95C 'result':178C 'risc':4A,31B 'risc-v':3A,30B 'riscv':24B,97C,146C 'run':34B 'runtim':25B 'sbi':55B,105C,156C 'section':108C 'self':27B 'self-host':26B 'set':144C,231C 'share':203C 'sinc':194C 'smp':217C 'specif':107C 'stale':62B 'stop':209C 'store':215C 'tlb':8A,181C 'unus':123C 'updat':102C,129C,138C 'use':68B,174C,205C 'v':5A,32B 'v3.0':106C 'valu':64B,168C 'visibl':225C 'vulner':92C 'wmb':218C 'word':45B,52B,77B,82B,136C,141C,152C,192C,223C 'write':74B,149C,184C,206C 'wrong':13A 'wrote':38B","nicknames":[],"mitigations":[],"who_affected":"Only hosts running the Linux kernel on RISC-V with KVM virtualization and the nested acceleration (NACL) SBI extension in use. Standard x86 or ARM hosts, and RISC-V machines not running KVM guests, are not affected.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-18T16:17:17+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-98639","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98639","severity":null,"published_at":"2026-10-18T16:17:17+00:00","modified_at":"2026-10-19T10:19:28+00:00","first_seen_at":"2026-10-23T21:57:16+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"}