Article 6EPSF A GCC -fstack-protector vulnerability on arm64

A GCC -fstack-protector vulnerability on arm64

by
corbet
from LWN.net on (#6EPSF)
The GCC stack-protector feature detects stack-based buffer overruns byputting a canary value on the stack and noticing if that value is changed.Itturns out, though, that dynamically allocated local variables (such asvariable-length arrays and space obtained with alloca()) areplaced beyond the canary, so overflows of those variables will not bedetected. As a result, arm64 binaries built with vulnerable versions ofGCC are not as protected as they should be and need to be rebuilt.

Dynamic allocations are just as susceptible to overflows as otherlocals. In fact, they're arguably more susceptible because they'realmost always arrays, whereas fixed locals are often integers,pointers, or other types to which variable-length data is neverwritten. GCC's own heuristics for when to use a stack guard reflectthis.

Kees Cook, meanwhile, has pointed out thatthe kernel no longer uses variable-length arrays, so kernel builds shouldnot be affected by this vulnerability.

External Content
Source RSS or Atom Feed
Feed Location http://lwn.net/headlines/rss
Feed Title LWN.net
Feed Link https://lwn.net/
Reply 0 comments