[PATCH v2] linux: Enforce zero fill of siginfo_t

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Tue Jan 20 14:18:26 GMT 2026



On 20/01/26 11:01, Andreas Schwab wrote:
> On Jan 20 2026, Adhemerval Zanella Netto wrote:
> 
>> On 20/01/26 10:26, Andreas Schwab wrote:
>>> On Jan 20 2026, Adhemerval Zanella wrote:
>>>
>>>> +    siginfo_t info;
>>>> +    /* 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.  */
>>>
>>> Why does the kernel even look at anything beyond the struct size?  That
>>> looks like a kernel bug.
>>>
>>
>> kernel/signal.c
>>
>> 3508 static int post_copy_siginfo_from_user(kernel_siginfo_t *info,
>> 3509                                        const siginfo_t __user *from)
>> 3510 {
> 
> This is all about the kABI struct, the glibc struct plays no role here.

The syscall fails with EBIG because on some target (armhf) kernel seems non-zero
values passed by userland. From previous discussion it seems be to a gcc issue,
although I have not tracked it yet.


More information about the Libc-alpha mailing list