]> git.ipfire.org Git - thirdparty/util-linux.git/commit
setproctitle: fix out of boundary access
authorTobias Stoeckmann <tobias@stoeckmann.org>
Mon, 25 Sep 2017 19:55:34 +0000 (21:55 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 26 Sep 2017 10:04:41 +0000 (12:04 +0200)
commitc7f87da2ba6b1e0bfcd3a41737483100010778d4
tree3ceed6ce3a6e5ea7485ea871e2bd5f96dbfec985
parentf17bda66bd440fe8375f5fd13e2efa6bd3a0c942
setproctitle: fix out of boundary access

A program using setproctitle can trigger an out of boundary access
if an attacker was able to clear the environment before execution.

The check in setproctitle prevents overflows, but does not take into
account that the whole length of the arguments could be 1, which is
possible by supplying such a program name to execlp(3) or using a
symbolic link, e.g. argv[0] = "l", argv[1] = NULL.

Only login uses setproctitle, which is not affected by this
problem due to initializing the environment right before the call.
lib/setproctitle.c