ladybird/Kernel/Syscalls
Brian Gianforcaro 737a11389c Kernel: Fix info leak from sockaddr_un in socket syscalls
In `sys$accept4()` and `get_sock_or_peer_name()` we were not
initializing the padding of the `sockaddr_un` struct, leading to
an kernel information leak if the
caller looked back at it's contents.

Before Fix:

    37.766 Clipboard(11:11): accept4 Bytes:
    2f746d702f706f7274616c2f636c6970626f61726440eac130e7fbc1e8abbfc
    19c10ffc18440eac15485bcc130e7fbc1549feaca6c9deaca549feaca1bb0bc
    03efdf62c0e056eac1b402d7acd010ffc14602000001b0bc030100000050bf0
    5c24602000001e7fbc1b402d7ac6bdc

After Fix:

    0.603 Clipboard(11:11): accept4 Bytes:
    2f746d702f706f7274616c2f636c6970626f617264000000000000000000000
    000000000000000000000000000000000000000000000000000000000000000
    000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000
2021-12-29 03:41:32 -08:00
..
access.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
alarm.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
anon_create.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
beep.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
chdir.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
chmod.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
chown.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
clock.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
debug.cpp Kernel+UE+LibC: Remove unused dbgputch syscall 2021-11-24 22:56:39 +01:00
disown.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
dup2.cpp Kernel: Access OpenFileDescriptions::max_open() statically in Syscalls 2021-12-18 10:31:18 -08:00
emuctl.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
execve.cpp Kernel: Propagate overflow errors from Memory::page_round_up 2021-12-28 23:08:50 +01:00
exit.cpp Kernel: Fix a few typos 2021-10-01 00:51:49 +01:00
fcntl.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
fork.cpp Kernel: Inherit alternative signal stack on fork(2) 2021-12-12 08:34:19 +02:00
fsync.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
ftruncate.cpp Kernel: Make sys${ftruncate,pread} take off_t as const pointer 2021-12-18 11:30:10 +01:00
futex.cpp Kernel: Fix futex syscall return values 2021-11-24 19:44:57 +01:00
get_dir_entries.cpp Kernel: Make UserOrKernelBuffer::for_user_buffer() return ErrorOr<T> 2021-11-21 20:22:48 +01:00
get_stack_bounds.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
getrandom.cpp Kernel: Make UserOrKernelBuffer::for_user_buffer() return ErrorOr<T> 2021-11-21 20:22:48 +01:00
getuid.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
hostname.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
inode_watcher.cpp Kernel: Add implicit auto qualifiers in Syscalls 2021-12-18 10:31:18 -08:00
ioctl.cpp Kernel: Use copy_typed_from_user() in more places :^) 2021-12-18 11:30:10 +01:00
keymap.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
kill.cpp Kernel: Port Process to ListedRefCounted 2021-12-29 12:04:15 +01:00
link.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
lseek.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
mkdir.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
mknod.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
mmap.cpp Kernel: Propagate overflow errors from Memory::page_round_up 2021-12-28 23:08:50 +01:00
mount.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
open.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
perf_event.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
pipe.cpp Kernel: Access OpenFileDescriptions::max_open() statically in Syscalls 2021-12-18 10:31:18 -08:00
pledge.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
poll.cpp Kernel: Access OpenFileDescriptions::max_open() statically in Syscalls 2021-12-18 10:31:18 -08:00
prctl.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
process.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
profiling.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
ptrace.cpp Kernel: Add implicit auto qualifiers in Syscalls 2021-12-18 10:31:18 -08:00
purge.cpp AK: Make Vector::try_* functions return ErrorOr<void> 2021-11-10 21:58:58 +01:00
read.cpp Kernel: Make sys${ftruncate,pread} take off_t as const pointer 2021-12-18 11:30:10 +01:00
readlink.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
realpath.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
rename.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
rmdir.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
sched.cpp Kernel: Use copy_typed_from_user() in more places :^) 2021-12-18 11:30:10 +01:00
sendfd.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
setpgid.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
setuid.cpp Kernel: Return EINVAL when specifying -1 for setuid and similar syscalls 2021-12-20 11:32:16 +01:00
sigaction.cpp Kernel: Remove a redundant check in Process::remap_range_as_stack 2021-12-18 10:31:18 -08:00
socket.cpp Kernel: Fix info leak from sockaddr_un in socket syscalls 2021-12-29 03:41:32 -08:00
stat.cpp Kernel: Make File::stat() & friends return Error<struct stat> 2021-12-18 11:30:10 +01:00
statvfs.cpp Kernel: Add implicit auto qualifiers in Syscalls 2021-12-18 10:31:18 -08:00
sync.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
sysconf.cpp Kernel: Return the actual number of CPU cores that we have 2021-12-29 03:17:41 -08:00
thread.cpp Kernel: Remove the KString::try_create(String::formatted(...)) pattern 2021-12-28 01:55:22 -08:00
times.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
ttyname.cpp Kernel: Add implicit auto qualifiers in Syscalls 2021-12-18 10:31:18 -08:00
umask.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
uname.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
unlink.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
unveil.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
utime.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
waitid.cpp Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T> 2021-11-08 01:10:53 +01:00
write.cpp Kernel: Remove else after return in Process::do_write 2021-12-18 10:31:18 -08:00