rrsync: support fd pins in user namespaces - #1048
Conversation
619165d to
cc56351
Compare
cc56351 to
6a52827
Compare
|
@samueloph please test |
|
@tridge @steadytao I confirm this solves the problem on Debian |
|
@steadytao Great job on this fix! I did notice one small edge case during testing, if we change the test to use |
|
Thanks... /dev/fd reaches a different kernel magic-link path. I would keep this change limited to the user-namespace /proc/self ownership exception rather than broaden the confined path traversal here. |
|
Just realised that #1054 would probably cover it anyways |
|
Yes it would, should be good to merge this. |
|
Actually I don't think this is covered in #1054 because I didn't modify any permission changes but we could fix that on the same PR if you would like. |
|
Ah, yeah, I just assumed from 1053's scope. Nonetheless, I don't fully see why we need to broaden the confinement exception to /dev/fd/N seeing as those pins are never generated? |
|
Im not with broadening as what you saying. The issue is Bash process substitution uses /dev/fd. If the same case happened using Bash substitution it will mostly fail with ELOOP. Some other cases we may be missing (which might be ok) but I think if we will already make exceptions to broaden the checks more we would add /dev/fd & /proc/self/ only as they are the most common. What do you think? |
|
Ah yeah true, didn't think of those cases. Will broaden a bit. Thank you, Omar. |
Fixes #1044
Summary
/proc/selfcomponent of a recognised rrsync fd pin when procfs reports its owner as the overflow UID inside a user namespace/proc/self/fd/Nlog path