[PATCH v2] linux: Enforce zero fill of siginfo_t

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Tue Apr 21 13:02:15 GMT 2026



On 21/04/26 03:25, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> The glibc siginfo struct is larger than the kABI one, and the kernel
>> enforces that for an unknown si_code, all the extra bytes should be 0
>> (post_copy_siginfo_from_user).
> 
> I still think the explanation of this change is wrong (I think it's that
> designated initializers with unions do not necessary zero-initialize
> inactive members), but the code change itself is correct.
> 
> Thanks,
> Florian
> 

What about:

The glibc siginfo struct is larger than the kABI one, and the kernel
enforces that for an unknown si_code, all the extra bytes should be 0
(post_copy_siginfo_from_user).

For armhf, gcc-15 does not fully zero-filling the struct because designated 
initializers with unions do not necessary zero-initialize inactive members.

To avoid false positives, force zero-filling on the structure.

Checked on arm-linux-gnueabihf.


More information about the Libc-alpha mailing list