{"id":"CVE-2026-98775","kind":"vulnerability","aliases":["CVE-2026-98775"],"related":[],"title":"Linux kernel: nitro enclaves use-after-free when slot allocation fails","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnitro_enclaves: fix use-after-free on SLOT_ALLOC failure\n\nWhen ne_create_vm_ioctl() fails the SLOT_ALLOC request after\nanon_inode_getfile() has succeeded, the error path calls\nfput(enclave_file) and then frees ne_enclave.\n\nIn normal userspace context, fput() defers the final __fput() via\ntask_work. ne_enclave_release() therefore runs after ne_enclave has\nalready been freed and dereferences ne_enclave->slot_uid, causing a\nuse-after-free: KASAN: slab-use-after-free in ne_enclave_release.\n\nThe enclave has no slot allocated and is not yet linked into the\nenclaves list on this error path, so ne_enclave_release() is expected\nto return early when slot_uid is zero. However, reading slot_uid\nalready accesses the freed object.\n\nClear enclave_file->private_data before fput() on the error path.\nne_enclave_release() then returns immediately when private_data is\nNULL, leaving the ioctl error path as the sole owner of ne_enclave.\nThis is safe because the file has not been fd_install()'d yet.\n\nTested on an AWS EC2 m5.2xlarge with CONFIG_KASAN=y. Without the\npatch, the reproducer triggers a KASAN slab-use-after-free on every\nSLOT_ALLOC failure. With the patch, no KASAN report is produced and\nthe SLOT_ALLOC error is still returned. Normal enclave creation and\nteardown are unaffected.","summary":"A flaw in the Linux kernel's nitro_enclaves driver frees an enclave object and then reads it again when slot allocation fails during VM creation. The sources do not say what an attacker can gain beyond a memory-safety crash and use-after-free.","severity":"unknown","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["aws-ec2","infrastructure","linux-kernel","nitro-enclaves"],"not_affected_if":["nitro-enclaves-driver-not-loaded"],"how_to_check":"- Run `uname -r` and compare against the fixed kernel releases in the upstream commit.\n- Check whether the nitro_enclaves driver is loaded with `lsmod | grep nitro_enclaves`.\n- Unknown whether the sources list specific affected version ranges.","fix":"- Update the Linux kernel to a release containing the nitro_enclaves fix (version unknown from the sources).\n- Until patched, unknown whether unloading the nitro_enclaves module is a viable workaround.","status":"open","published_at":"2026-10-18T16:17:31+00:00","first_seen_at":"2026-10-23T21:57:16+00:00","triaged_at":"2026-10-25T05:15:28+00:00","updated_at":"2026-10-25T05:15:28+00:00","category":"infrastructure","confidence":0.5,"triage":{"at":"2026-10-25T05:15:28Z","model":"claude-haiku-5-5","output":{"fix":"- Update the Linux kernel to a release containing the nitro_enclaves fix (version unknown from the sources).\n- Until patched, unknown whether unloading the nitro_enclaves module is a viable workaround.","reach":"local","title":"Linux kernel: nitro enclaves use-after-free when slot allocation fails","impact":"medium","summary":"A flaw in the Linux kernel's nitro_enclaves driver frees an enclave object and then reads it again when slot allocation fails during VM creation. The sources do not say what an attacker can gain beyond a memory-safety crash and use-after-free.","category":"infrastructure","nicknames":[],"who_cares":["linux-kernel","aws-ec2","nitro-enclaves"],"confidence":0.5,"needs_auth":"unknown","worst_case":"local code could corrupt kernel memory via use-after-free","analyst_note":"Check the upstream kernel commit and NVD entry for affected kernel version ranges and the fixed release, and confirm whether the driver is exploitable beyond a crash.","how_to_check":"- Run `uname -r` and compare against the fixed kernel releases in the upstream commit.\n- Check whether the nitro_enclaves driver is loaded with `lsmod | grep nitro_enclaves`.\n- Unknown whether the sources list specific affected version ranges.","needs_analyst":true,"not_affected_if":["nitro-enclaves-driver-not-loaded"],"who_is_affected":"Only systems running the Linux kernel nitro_enclaves driver, which is used on AWS EC2 Nitro Enclaves hosts, are in scope. Hosts without this driver loaded can likely skip it, but the sources do not confirm that.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.00069,"input_tokens":3753,"output_tokens":630,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-2026':14A,17A '-98775':15A,18A 'access':209C 'alloc':11A,50B,95C,105C,176C,286C,299C 'alreadi':146C,208C 'anon':108C 'attack':62B 'aw':20B,263C 'aws-ec2':19B 'beyond':65B 'call':116C 'caus':155C 'clear':213C 'config':267C 'context':128C 'crash':70B 'creat':99C 'creation':54B,306C 'cve':13A,16A 'd':258C 'data':217C,232C 'defer':130C 'derefer':150C 'driver':38B 'earli':198C 'ec2':21B,264C 'enclav':4A,28B,37B,41B,87C,118C,124C,138C,144C,152C,169C,172C,184C,192C,214C,225C,246C,305C 'error':114C,188C,222C,238C,300C 'everi':284C 'expect':195C 'fail':12A,51B,102C 'failur':96C,287C 'fd':256C 'file':119C,215C,252C 'final':132C 'fix':88C 'flaw':30B 'follow':81C 'fput':117C,129C,133C,219C 'free':8A,39B,75B,92C,122C,160C,166C,282C 'freed':148C,211C 'gain':64B 'getfil':110C 'howev':204C 'immedi':229C 'infrastructur':22B 'inod':109C 'instal':257C 'ioctl':101C,237C 'kasan':161C,268C,277C,292C 'kernel':2A,25B,34B,79C 'leav':235C 'link':181C 'linux':1A,24B,33B,78C 'linux-kernel':23B 'list':185C 'm5.2xlarge':265C 'memori':68B 'memory-safeti':67B 'ne':98C,123C,137C,143C,151C,168C,191C,224C,245C 'nitro':3A,27B,36B,86C 'nitro-enclav':26B 'normal':126C,304C 'null':234C 'object':42B,212C 'owner':243C 'patch':272C,290C 'path':115C,189C,223C,239C 'privat':216C,231C 'produc':295C 'read':45B,205C 'releas':139C,170C,193C,226C 'report':293C 'reproduc':274C 'request':106C 'resolv':85C 'return':197C,228C,303C 'run':141C 'safe':249C 'safeti':69B 'say':59B 'slab':163C,279C 'slab-use-after-fre':162C,278C 'slot':10A,49B,94C,104C,153C,175C,200C,206C,285C,298C 'sole':242C 'sourc':56B 'still':302C 'succeed':112C 'task':135C 'teardown':308C 'test':260C 'therefor':140C 'trigger':275C 'uid':154C,201C,207C 'unaffect':310C 'use':6A,73B,90C,158C,164C,280C 'use-after-fre':5A,72B,89C,157C 'userspac':127C 'via':134C 'vm':53B,100C 'vulner':82C 'without':270C 'work':136C 'y':269C 'yet':180C,259C 'zero':203C","nicknames":[],"mitigations":[],"who_affected":"Only systems running the Linux kernel nitro_enclaves driver, which is used on AWS EC2 Nitro Enclaves hosts, are in scope. Hosts without this driver loaded can likely skip it, but the sources do not confirm that.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-18T16:17:31+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-98775","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98775","severity":null,"published_at":"2026-10-18T16:17:31+00:00","modified_at":"2026-10-21T13:21:45+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"}