summaryrefslogtreecommitdiffstats
path: root/test/fuzz/fuzz-journald-audit/crash
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2018-11-16 23:32:31 +0100
committerEvgeny Vereshchagin <evvers@ya.ru>2018-11-17 11:25:19 +0100
commit1dab14aba749b9c5ab8176c5730107b70834240b (patch)
tree2b0ad3716c496f486756c48388c20badc6f9baf8 /test/fuzz/fuzz-journald-audit/crash
parenttests: add a fuzzer for process_audit_string (diff)
downloadsystemd-1dab14aba749b9c5ab8176c5730107b70834240b.tar.xz
systemd-1dab14aba749b9c5ab8176c5730107b70834240b.zip
journald: check whether sscanf has changed the value corresponding to %n
It's possible for sscanf to receive strings containing all three fields and not matching the template at the same time. When this happens the value of k doesn't change, which basically means that process_audit_string tries to access memory randomly. Sometimes it works and sometimes it doesn't :-) See also https://bugzilla.redhat.com/show_bug.cgi?id=1059314.
Diffstat (limited to 'test/fuzz/fuzz-journald-audit/crash')
-rw-r--r--test/fuzz/fuzz-journald-audit/crash1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/fuzz/fuzz-journald-audit/crash b/test/fuzz/fuzz-journald-audit/crash
new file mode 100644
index 0000000000..91bd85ca6e
--- /dev/null
+++ b/test/fuzz/fuzz-journald-audit/crash
@@ -0,0 +1 @@
+audit(1542398162.211:744) pid=7376 uid=1000 auid=1000 ses=6 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="vagrant" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'