]> git.ipfire.org Git - thirdparty/util-linux.git/commit
last: fix wtmp user name buffer overflow [asan]
authorSami Kerola <kerolasa@iki.fi>
Sun, 13 Jan 2019 19:48:59 +0000 (19:48 +0000)
committerKarel Zak <kzak@redhat.com>
Tue, 2 Apr 2019 10:12:28 +0000 (12:12 +0200)
commitaa14d687ac401f9c313190793d657218c0d0405a
tree53093c32999aa230a759c1f039ce9a1cef589dfa
parent3e3b276c87b9bbf6017d4f4fd738877ffaeff610
last: fix wtmp user name buffer overflow [asan]

Ensure utmp user name field is null terminated.  Without that getpwnam() can
buffer overflow, when wtmp file is malformed.

Addresses: https://github.com/karelzak/util-linux/issues/715
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login-utils/last.c