# CVE-2026-98396: powerpc: Do not restore KUAP in arch\_exit\_to\_user\_mode\_prepare()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.20% (percentile 5, 2026-11-26)
- **Published:** 2026-10-14T13:25:58.490Z
- **Modified:** 2026-10-19T10:18:44.197Z

## Who should check

- Anyone running Linux \>= 02565a782c1ee7e8ada38ad24a698e01d6ea9ff8, \< c8e80c19c3b9c8db83a14fab00445a6064992442; \>= 02565a782c1ee7e8ada38ad24a698e01d6ea9ff8, \< c2549d749539487239475fbc8c614a1f9244d655
- Anyone running Linux 7.2

## Description

In the Linux kernel, the following vulnerability has been resolved:

powerpc: Do not restore KUAP in arch\_exit\_to\_user\_mode\_prepare()

KUAP means kernel cannot touch user memory unless it explicitly is
enabled. In the kernel it should stay AMR\_KUAP\_BLOCKED. While returning
to userspace just before RFI, kernel should restore the user AMR value
back.

Looks like GENERIC\_ENTRY might be treating arch\_exit\_to\_user\_mode\_prepare()
as the last architecture step before returning to userspace.
commit bee25f97ad24 ("powerpc: Enable GENERIC\_ENTRY feature")
therefore called kuap\_user\_restore() from that hook. But on PowerPC that
is too early. After irqentry\_exit() / syscall\_exit\_to\_user\_mode() we
still run platform specific exit routines.

e.g. code snippets showing both exception handling and system call
handling as the callers of function arch\_exit\_to\_user\_mode\_prepare()
which does kuap\_user\_restore(). The below path shows that calling
kuap\_user\_restore() is too early when called from
arch\_exit\_to\_user\_mode\_prepare().

Exception handling in exceptions-64s.S
=======================================

bl	CFUNC(do\_page\_fault)
	  ..DEFINE\_INTERRUPT\_HANDLER\_ASYNC(do\_page\_fault)
	      arch\_interrupt\_async\_enter\_prepare(regs);
	      state = irqentry\_enter(regs);
	      instrumentation\_begin();
	      irq\_enter\_rcu();
	      handler(regs);
	      nap\_adjust\_return(regs);
	      irq\_exit\_rcu();
	      instrumentation\_end();
	      arch\_interrupt\_async\_exit\_prepare(regs);
	      irqentry\_exit(regs, state); 		   \<\<\< too early
	        irqentry\_exit\_to\_user\_mode()
		  \_\_exit\_to\_user\_mode\_prepare(regs, EXIT\_TO\_USER\_MODE\_WORK\_IRQ);
		    arch\_exit\_to\_user\_mode\_prepare(regs, ti\_work);  \<\<\< too early
b	interrupt\_return\_srr
		.. bl	CFUNC(interrupt\_exit\_user\_prepare) \<\<\< already calls kuap\_user\_restore

prep\_irq\_for\_enabled\_exit() retry can run kernel code with IRQs on. So
only when that routine is fully finished is when the user KUAP should be
fully restored which interrupt\_exit\_user\_prepare() already takes care of
before returning.

Similarly for system call handling in interrupt\_64.S
======================================================

	bl	CFUNC(system\_call\_exception)

.Lsyscall\_exit:
	addi	r4,r1,STACK\_INT\_FRAME\_REGS
	li	r5,0 /\* !scv \*/
	bl	CFUNC(syscall\_exit\_prepare)
		  .. kuap\_assert\_locked();
		     syscall\_exit\_to\_user\_mode(regs); \<\<\< too early
		       syscall\_exit\_to\_user\_mode\_prepare(regs);  \<\<\< too early
 		     kuap\_user\_restore(regs);         \<\<\< already calls

syscall\_exit\_prepare(), which can enable IRQs, replay a pending
interrupt, and only then rfi. Those functions already restore KUAP
immediately before rfi.

Note that if we restore the user AMR too early like in the current code
as shown from the code snippets above, then we get the following warning
when CONFIG\_PPC\_KUAP\_DEBUG is enabled:
  WARNING: arch/powerpc/include/asm/book3s/64/kup.h:293 at interrupt\_exit\_user\_prepare+0x1a0/0x1c0
  Hardware name: IBM pSeries (emulated by qemu) POWER10 (architected)
  TRAP: 0700
  LR: c00000000000d8d4 CTR: c0000000021fe500
  MSR: \<SF,EE,ME,IR,DR,RI,LE\>  CR: 44000804  XER: 20040000
  interrupt\_exit\_user\_prepare+0x1a0/0x1c0
  interrupt\_return\_srr\_user+0x8/0x12c

## Affected and fixed versions

- Linux: \>= 02565a782c1ee7e8ada38ad24a698e01d6ea9ff8, \< c8e80c19c3b9c8db83a14fab00445a6064992442; \>= 02565a782c1ee7e8ada38ad24a698e01d6ea9ff8, \< c2549d749539487239475fbc8c614a1f9244d655 (cvelist)
- Linux: 7.2 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-98396. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-98396.md
Affected: Linux >= 02565a782c1ee7e8ada38ad24a698e01d6ea9ff8, < c8e80c19c3b9c8db83a14fab00445a6064992442; >= 02565a782c1ee7e8ada38ad24a698e01d6ea9ff8, < c2549d749539487239475fbc8c614a1f9244d655; Linux 7.2
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-98396 being exploited?

There is no confirmed exploitation: CVE-2026-98396 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.20% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-98396?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-98396?

Linux \>= 02565a782c1ee7e8ada38ad24a698e01d6ea9ff8, \< c8e80c19c3b9c8db83a14fab00445a6064992442; \>= 02565a782c1ee7e8ada38ad24a698e01d6ea9ff8, \< c2549d749539487239475fbc8c614a1f9244d655; Linux 7.2.

### Is there a fix for CVE-2026-98396?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-98396?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/c8e80c19c3b9c8db83a14fab00445a6064992442>
- other: <https://git.kernel.org/stable/c/c2549d749539487239475fbc8c614a1f9244d655>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-98396>

HTML: <https://flawdb.com/CVE-2026-98396> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-98396>
