apparmor paths are broken when using ecryptfs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Release Notes for Ubuntu |
Fix Released
|
Undecided
|
Unassigned | ||
apparmor (Ubuntu) |
Fix Released
|
High
|
Jamie Strandboge | ||
Karmic |
Fix Released
|
High
|
Jamie Strandboge | ||
ecryptfs-utils (Ubuntu) |
Invalid
|
High
|
Unassigned | ||
Karmic |
Invalid
|
High
|
Unassigned |
Bug Description
Binary package hint: ecryptfs-utils
klamav 0.46-2 with clamav 0.95.
Jaunty with encrypted home directory.
After installing klamav and first running it, it creates /home/user/
Apr 11 01:11:39 utest-jj kernel: [ 959.044919] type=1503 audit(123940149
Apr 11 01:11:39 utest-jj kernel: [ 959.044937] ecryptfs_do_create: Failure to create dentry in lower fs; rc = [-13]
Apr 11 01:11:39 utest-jj kernel: [ 959.045149] ecryptfs_create: Failed to create file inlower filesystem
After stopping apparmor, the problem goes away, the database gets downloaded correctly.
Can be reproduced by correcting freshclam's apparmor profile, see the following bug:
https:/
Related branches
summary: |
- apparmor problem with encrypted home on jaunty + apparmor paths are broken when using encrypted home on jaunty |
summary: |
- apparmor paths are broken when using encrypted home on jaunty + apparmor paths are broken when using encryptfs on jaunty |
summary: |
- apparmor paths are broken when using encryptfs on jaunty + apparmor paths are broken when using ecryptfs on jaunty |
Changed in linux (Ubuntu Karmic): | |
assignee: | nobody → John Johansen (jjohansen) |
Changed in linux (Ubuntu Karmic): | |
status: | Confirmed → In Progress |
ecryptfs breaks Apparmor naming.
TEST CASE: foo/\.Private'
1. sudo apt-get install ecryptfs-utils
2. sudo adduser --encrypt-home foo
3. login as 'foo' and verify that encrypted home is correct:
$ df |grep '/home/
/home/foo/.Private 3936216 3313964 422304 89% /home/foo
4. Create the following file as /tmp/359338.sh:
#!/bin/sh
echo "Touching $HOME/test.txt"
touch $HOME/test.txt
5. chmod 755 /tmp/359338.sh d/tmp.359338. sh:
6. add the following to /etc/apparmor.
#include <tunables/global>
/tmp/359338.sh {
#include <abstractions/base>
/bin/dash rix,
/bin/touch rix,
/tmp/359338.sh r,
owner @{HOME}/test.txt rw,
}
7. reload apparmor: d/apparmor force-reload
$ sudo /etc/init.
8. run /tmp/359338.sh as non-foo user: test.txt
$ /tmp/359338.sh
Touching /home/jamie/
9. run /tmp/359338.sh as foo: foo/test. txt': Permission denied
$ /tmp/359338.sh
Touching /home/foo/test.txt
touch: cannot touch `/home/
dmesg should have something like: 3.911:114) : operation= "inode_ create" requested_ mask="a: :" denied_mask="a::" fsuid=1001 name="/ home/foo/ .Private/ ECRYPTFS_ FNEK_ENCRYPTED. FWYwjom6xTTrhkQ H6NYaDlNzbi4a- Y57kI1XsKcpAS2H NDa3p8fkshGrq- --" pid=5038 profile= "/tmp/359338. sh"
Apr 13 16:45:53 sec-jaunty-amd64 kernel: [ 523.233018] type=1503 audit(123965195
Apr 13 16:45:53 sec-jaunty-amd64 kernel: [ 523.233027] ecryptfs_do_create: Failure to create dentry in lower fs; rc = [-13]
Apr 13 16:45:53 sec-jaunty-amd64 kernel: [ 523.233045] ecryptfs_create: Failed to create file inlower filesystem