Trouble with ACLs and unzip
Posted: Fri Feb 18, 2005 6:53 pm
Hi,
I think, I've found a bug or incompatibility in the ACL subsystem of grsecurity
(grsecurity-2.1.1-2.4.29-200501231159 as well a grsecurity-2.1.1-2.6.10-as2-200501242254).
Please try the following steps:
1. Enable the ACLs.
2. Create a ZIP file in a directory where you have read/write permission (e.g. /tmp):
touch acl_test.txt
zip acl_test.zip acl_test.txt
3. Unpack acl_test.zip with unzip (Info-ZIP UnZip 5.51):
rm acl_test.txt
unzip acl_test.zip
The unzip command failed on my machine with the message
error: cannot create acl_test.txt
and
grsec: (default:D:/) denied create of /tmp/acl_test.txt for writing by /usr/bin/unzip[unzip:23108] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:4279] uid/euid:0/0 gid/egid:0/0
was logged.
4. Disable the ACLs and repeat step 3. Everything works as expected now.
To be sure that there is something wrong in grsecurity and it is not a bug in my policy file, I've tried it with the policy.sample which is bundled with gradm-2.1.1.
The described behaviour can be reproduced with that policy, too.
If the object flags of /tmp are set to rwcdlx, the problem occurs also.
By the way: Using tar instead of zip/unzip still works fine.
-vs
I think, I've found a bug or incompatibility in the ACL subsystem of grsecurity
(grsecurity-2.1.1-2.4.29-200501231159 as well a grsecurity-2.1.1-2.6.10-as2-200501242254).
Please try the following steps:
1. Enable the ACLs.
2. Create a ZIP file in a directory where you have read/write permission (e.g. /tmp):
touch acl_test.txt
zip acl_test.zip acl_test.txt
3. Unpack acl_test.zip with unzip (Info-ZIP UnZip 5.51):
rm acl_test.txt
unzip acl_test.zip
The unzip command failed on my machine with the message
error: cannot create acl_test.txt
and
grsec: (default:D:/) denied create of /tmp/acl_test.txt for writing by /usr/bin/unzip[unzip:23108] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:4279] uid/euid:0/0 gid/egid:0/0
was logged.
4. Disable the ACLs and repeat step 3. Everything works as expected now.
To be sure that there is something wrong in grsecurity and it is not a bug in my policy file, I've tried it with the policy.sample which is bundled with gradm-2.1.1.
The described behaviour can be reproduced with that policy, too.
If the object flags of /tmp are set to rwcdlx, the problem occurs also.
By the way: Using tar instead of zip/unzip still works fine.
-vs