Post #2050048
2026-05-02 07:23 UTC
"It places page cache pages in a writable scatterlist, separated from the legitimate write region by nothing more than an offset boundary. The design assumes every AEAD algorithm will confine its writes to the intended destination, but nothing in the API enforces this, and nothing documents it as a requirement.
Unfortunately, one AEAD algorithm breaks this silent invariant."
"No other standard AEAD algorithm in the kernel [uses memory that doesn't belong to it as a scratch pad]. GCM, CCM, and regular authenc all confine their writes to the legitimate output area. authencesn alone writes past the boundary."
I'm actually amazed that there's only one bug here. Somehow almost everyone just managed to do the right thing, despite no mechanism enforcing it and no documentation describing it. That's just amazing. It's a testament to the skill of those developers, despite an incredibly bad design.
https://xint.io/blog/copy-fail-linux-distributions
#copyfail
Replies (1)
-
@Hex@kolektiva.social 2026-05-02 07:37
"Nobody connected the 2017 in-place optimization to authencesn's scratch writes or to the splice path's use of page cache pages. Each change was reasonable in isolation. The vulnerability exists at the intersection of all three, and has been silently exploitable for nearly a decade." Basically, a 6 year old bit of code that was not vulnerable when written became vulnerable after multiple API changes. So this is really a tech debt problem.