Re:Depressing and faintly terrifying days for the C standard...
by Gibbon1 on Wednesday May 30, 2018 @03:15PM
(#17190758)
They aren't doing anything with the padding bytes. But what probably happened was they copied the array into userland memory. Which potentially allows a malicious sandboxed program to read the padding bytes that contain bits of kernal memory.
Re:Depressing and faintly terrifying days for the C standard...
by kabdib on Wednesday May 30, 2018 @01:45PM
(#17189838)
Total guess, but they could have been including them in a hash function or struct equality check (equality with memcmp, hash by just grabbing bytes, etc.).
That would not have gone well with uninitialized padding :-)
Re:Depressing and faintly terrifying days for the C standard...
by buckminster on Wednesday May 30, 2018 @01:53PM
(#17189904)
It's not uncommon for a function to use a supplied output buffer as scratch space. So the padding could have contained pretty much anything.
But what on earth were they doing with the padding bits?