bin/91622: /bin/cp does not update atime of the source file
joe
freebsd-security at FreeBSD.org
Tue Jan 10 19:10:09 PST 2006
>Number: 91622
>Category: bin
>Synopsis: /bin/cp does not update atime of the source file
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Jan 11 03:10:07 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: joe
>Release: RELENG_4 20051028
>Organization:
>Environment:
RELENG_4 20051028
>Description:
[] date
Tue Jan 10 21:58:06 EST 2006
[] ls -lTu /var/run/dmesg.boot /tmp/dmesg.boot ~/.zshrc /tmp/.zshrc
ls: /tmp/.zshrc: No such file or directory
ls: /tmp/dmesg.boot: No such file or directory
-rw------- 1 user user 625 Jan 10 21:36:27 2006 /home/user/.zshrc
-rw-r--r-- 1 root wheel 15732 Jan 10 21:50:31 2006 /var/run/dmesg.boot
[] /bin/cp /var/run/dmesg.boot ~/.zshrc /tmp
[] ls -lTu /var/run/dmesg.boot /tmp/dmesg.boot ~/.zshrc /tmp/.zshrc
-rw------- 1 user user 625 Jan 10 21:36:27 2006 /home/user/.zshrc
-rw------- 1 user wheel 625 Jan 10 21:59:35 2006 /tmp/.zshrc
-rw-r--r-- 1 user wheel 15732 Jan 10 21:59:35 2006 /tmp/dmesg.boot
-rw-r--r-- 1 root wheel 15732 Jan 10 21:50:31 2006 /var/run/dmesg.boot
[] /bin/cat /var/run/dmesg.boot /tmp/dmesg.boot ~/.zshrc /tmp/.zshrc > /dev/null
[] ls -lTu /var/run/dmesg.boot /tmp/dmesg.boot ~/.zshrc /tmp/.zshrc
-rw------- 1 user user 625 Jan 10 22:00:57 2006 /home/user/.zshrc
-rw------- 1 user wheel 625 Jan 10 22:00:57 2006 /tmp/.zshrc
-rw-r--r-- 1 user wheel 15732 Jan 10 22:00:57 2006 /tmp/dmesg.boot
-rw-r--r-- 1 root wheel 15732 Jan 10 22:00:57 2006 /var/run/dmesg.boot
this occurs regardless of whether or not the user has
rwx permissions on the source file. does not apply of
course if the source filesystem is mounted read-only.
they are read-write here.
since the source file is indeed being read, the atime should be updated.
>How-To-Repeat:
repeat the above commands, examine the output.
>Fix:
unknown, either /bin/cp or more likely syscalls.
thanks.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list