]> git.ipfire.org Git - thirdparty/systemd.git/commit
journald: when processing a native message, bail more quickly on overbig messages
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 5 Dec 2018 21:50:39 +0000 (22:50 +0100)
committerLukáš Nykrýn <lnykryn@redhat.com>
Mon, 11 Feb 2019 09:51:14 +0000 (10:51 +0100)
commited028441cc2ef0ffb9771d7266d40f18910f0ae1
tree493b8a6739bc447c75a9f2b646134bf73857a335
parent9f53d3cded6cf7eccb40c810dfb8fd6e101c7a3b
journald: when processing a native message, bail more quickly on overbig messages

We'd first parse all or most of the message, and only then consider if it
is not too large. Also, when encountering a single field over the limit,
we'd still process the preceding part of the message. Let's be stricter,
and check size limits early, and let's refuse the whole message if it fails
any of the size limits.

(cherry-picked from commit 964ef920ea6735d39f856b05fd8ef451a09a6a1d)

Related: #1664977
src/journal/journald-native.c