News for hackers. Stuff that matters.
Re:A Provenance-aware Memory Object Model for C [pdf] by astrange on Saturday June 19, 2021 @09:12AM (#27560172)
If it helps, anything that introduces UB for optimizations (like forbidding assuming that 'int y,x;' implies an order in memory) is also good for security.

Mainly because it lets you use systems with type-safe pointers (some acronyms are PAC, BTI, CHERI) - the regular "concrete semantics" aka "whatever current pointers let you get away with" has a lot of issues! But also because compiling with extra security is not popular if it causes performance regressions.

Re:A Provenance-aware Memory Object Model for C [pdf] by temac on Saturday June 19, 2021 @10:16AM (#27560615)
> anything that introduces UB for optimizations (like forbidding assuming that 'int y,x;' implies an order in memory) is also good for security.

[...]

> But also because compiling with extra security is not popular if it causes performance regressions.

Yes. So while UB could theoretically be (in some cases) good for security, in practice it is absolutely not, because no tooling exists to introduce runtime checks light enough to be used in production. So UBs can and do reveal and/or amplify latent bugs, or even introduce new ones if new UB are introduced in new specifications.

Re:A Provenance-aware Memory Object Model for C [pdf] by astrange on Saturday June 19, 2021 @10:30AM (#27560709)
PAC/BTI are definitely used in production, UBSan is fast enough to ship in production if you want, and there's more tools being used that I can't talk about here.