Comment 4 for bug 400443

Revision history for this message
Colin Ian King (colin-king) wrote :

SRU Justification:

mmap() on a directory should return ENODEV, but on ecryptfs mmap() on Lucid returns
a mmap'd address which causes a SIGBUS when accessed.

Fix: Apply the backported patch, open a directory on an ecryptfs filesystem
and mmap with mmap(NULL, 4096, PROT_READ, MAP_PRIVATE, fd, 0). With the fix
this returns ENODEV, without it mmap returns a mmap'd region which causes a SIGBUS
when accessed.

The attached C test program exercises this bug and works correctly with the fix.