containers / containers/fuse-overlayfs

Content of deleted directory still visible

Open
#324 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
691
Forks
109
Avg merge
5d 7h
Merged PRs (30d)
2

Description

ArchLinux, x86_64, kernel 5.14.7, latest git version of fuse-overlayfs

```sh
mkdir -p {overlay,mount,upper,lower/v/A}
fuse-overlayfs -o "lowerdir=lower,upperdir=upper,workdir=overlay" "mount"

rm -rf "mount/v/"
mkdir -p "mount/v/"
ls -alF "mount/v/"
stat mount/v/A
```

The last `stat` is supposed to error since `mount/v` should be empty, as verified by the `ls` yet running the script above prints something like,

```
total 0
drwxr-xr-x 2 yuyichao yuyichao 40 Sep 28 07:24 ./
drwxr-xr-x 3 yuyichao yuyichao 2 Sep 28 07:24 ../
File: mount/v/A
Size: 0 Blocks: 0 IO Block: 4096 directory
Device: 0,73 Inode: 46969979 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 1000/yuyichao) Gid: ( 1000/yuyichao)
Access: 2021-09-28 07:24:46.247284663 -0400
Modify: 2021-09-28 07:24:46.243951278 -0400
Change: 2021-09-28 07:24:46.243951278 -0400
Birth: -
```

which shows that the `ls` indeed see an empty directory but `stat` can still see something in it.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the shell reproduction on ArchLinux with the reported kernel and latest fuse-overlayfs, then compare the empty `ls -alF mount/v/` result with `stat mount/v/A`. The fix is complete when the recreated directory no longer exposes `lower/v/A` and the final `stat` errors as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.