lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Tue, 31 May 2011 11:24:35 +0000
From: halfdog <me@...fdog.net>
To: coderman <coderman@...il.com>
Cc: full-disclosure@...ts.grok.org.uk
Subject: Re: File system recursion and symlinks: A
 never-ending story (and how to bring it to an end for me)

coderman wrote:
> On Mon, May 30, 2011 at 9:22 PM, Andrew Farmer <andfarm@...il.com> wrote:
>> ...
>> You'd think so, but it turns out that --safe-links only affects symlinks *within* the tree being synced.
> 
> sure. i should have pointed out the -L in there - that's the one that
> will prevent the condition you describe. --safe-links is simply
> another good practice by default.
> 
> also, don't rsync from arbitrary locations that differ from backup and
> restore. use include-files or exclude-files to control what you care
> about...
> 
> (we could go on like this, if you like. for example, extended
> attributes. your turn. ;)
> 

My manpage says -L and --safe-links is the same, but using both for testing.

# -a is -rlptgoD, only use -r (recursive) -p (preserve perms),
# -t (preserve timestamps), -g (preserve group), -o (preserve owner),
# not adding -l (copy links) and -D (preserve devices)

So test case is, should that be save?

rsync -L --safe-links -rptgo xxx/test/root /home/test

Still creates arbitrary files outside /home/test, when user test wants
it to. Creation of /etc/cron.d/xxxxbad does not work, since crond will
not accept the file when uid!=0. But adding of backdoor ls in /sbin is
ok, so root will use that because earlier in PATH. (uid=0 bash does not
care calling executables with uid!=0 if in PATH)

-- 
http://www.halfdog.net/
PGP: 156A AE98 B91F 0114 FE88  2BD8 C459 9386 feed a bee

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ