Page MenuHomeFreeBSD

Zero uninitialized part of struct ptrace_lwpinfo.
ClosedPublic

Authored by kib on Oct 26 2017, 2:29 PM.
Tags
None
Referenced Files
F87039216: D12796.id34355.diff
Fri, Jun 28, 3:27 PM
Unknown Object (File)
Sun, Jun 16, 12:30 PM
Unknown Object (File)
Sun, Jun 16, 11:34 AM
Unknown Object (File)
May 27 2024, 3:45 PM
Unknown Object (File)
May 24 2024, 1:39 AM
Unknown Object (File)
May 24 2024, 1:39 AM
Unknown Object (File)
May 24 2024, 1:39 AM
Unknown Object (File)
May 23 2024, 5:05 PM
Subscribers

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/kern/sys_process.c
1370

I would be inclined to zero the whole struct. In my case I saw garbage leak in 'pl_child_pid' for a non-fork event. We should probably zero the entire pl32 before copying across as well in case there is padding (perhaps in fields added in the future)?

kib marked an inline comment as done.

Zero the whole struct ptrace_lwpinfo and ptrace_lwpinfo32.

This revision is now accepted and ready to land.Nov 8 2017, 10:10 PM
This revision was automatically updated to reflect the committed changes.