]> granicus.if.org Git - linux-pam/commit
pam_timestamp: fix potential directory traversal issue (ticket #27)
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 26 Mar 2014 22:17:23 +0000 (22:17 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 26 Mar 2014 22:17:23 +0000 (22:17 +0000)
commit9dcead87e6d7f66d34e7a56d11a30daca367dffb
tree27a38640b5de24d1cd42eff5fcdd80bbc2c2b5c1
parentd332be7fa933f5424abee6c7e385f0de174603d2
pam_timestamp: fix potential directory traversal issue (ticket #27)

pam_timestamp uses values of PAM_RUSER and PAM_TTY as components of
the timestamp pathname it creates, so extra care should be taken to
avoid potential directory traversal issues.

* modules/pam_timestamp/pam_timestamp.c (check_tty): Treat
"." and ".." tty values as invalid.
(get_ruser): Treat "." and ".." ruser values, as well as any ruser
value containing '/', as invalid.

Fixes CVE-2014-2583.

Reported-by: Sebastian Krahmer <krahmer@suse.de>
modules/pam_timestamp/pam_timestamp.c