Page MenuHomeFreeBSD

Zero uninitialized part of struct ptrace_lwpinfo.
ClosedPublic

Authored by kib on Oct 26 2017, 2:29 PM.
Tags
None
Referenced Files
F115127756: D12796.id34961.diff
Sun, Apr 20, 5:46 PM
Unknown Object (File)
Sat, Apr 19, 3:04 AM
Unknown Object (File)
Sun, Apr 13, 9:01 PM
Unknown Object (File)
Tue, Apr 8, 7:14 AM
Unknown Object (File)
Feb 6 2025, 6:40 AM
Unknown Object (File)
Jan 26 2025, 1:01 PM
Unknown Object (File)
Jan 18 2025, 8:54 AM
Unknown Object (File)
Dec 25 2024, 9:26 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.