Skip to content
Commit 8c5dbf2a authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

signal: Introduce clear_siginfo



Unfortunately struct siginfo has holes both in the common part of the
structure, in the union members, and in the lack of padding of the
union members.  The result of those wholes is that the C standard does
not guarantee those bits will be initialized.  As struct siginfo is
for communication between the kernel and userspace that is a problem.

Add the helper function clear_siginfo that is guaranteed to clear all of
the bits in struct siginfo so when the structure is copied there is no danger
of copying old kernel data and causing a leak of information from kernel
space to userspace.

Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 8c36fdf5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment