journald: do not store the iovec entry for process commandline on stack
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 5 Dec 2018 17:38:39 +0000 (18:38 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 9 Jan 2019 22:41:53 +0000 (23:41 +0100)
commit084eeb865ca63887098e0945fb4e93c852b91b0f
treedc84170f2702cdc70ea93206a58d4a0454f4953b
parentbc2762a309132a34db1797d8b5792d5747a94484
journald: do not store the iovec entry for process commandline on stack

This fixes a crash where we would read the commandline, whose length is under
control of the sending program, and then crash when trying to create a stack
allocation for it.

CVE-2018-16864
https://bugzilla.redhat.com/show_bug.cgi?id=1653855

The message actually doesn't get written to disk, because
journal_file_append_entry() returns -E2BIG.
src/basic/io-util.c
src/basic/io-util.h
src/coredump/coredump.c
src/journal/journald-server.c