Repository navigation
Conversation
|
The sender/source is still not confined well. Only enforced under files-from. Confine-root is the same as a daemon tree and source should be also confined. Will push tomorrow. |
e23d0a4 to
6187ec4
Compare
…finement tests Reported-by: <karimabisaad@gmail.com>
|
Description Updated. |
|
This would belong solely in 4.0, not 3.5. But it is still nowhere ready. This makes some very broad changes without a proper confinement contract or BSD behaviour. And pseudo-path policy should be altered separately. |
|
I suggest moving this to a Design discussion. |
|
Merging one confinement fix without the other breaks CI, which is why the pseudo-path changes are included in this PR. I don't think this is a design to discuss, this aligns --confine-root with its documented requirement to match daemon behavior. Previously, --confine-root was only enforced on operator-peer paths (--backup-dir , --temp-dir, --partial-dir, alt-dest , etc) without updating change_dir(), and --files-from enforced root confinement on the source while standard source and destination paths did not, which is inconsistent. Furthermore, the change_dir() update is strictly scoped to --confine-root and leaves all other code paths untouched, though I am still investigating the root cause of the BSD failure. We could leave it for 4.0.0 if you want but I do not suggest that because there will be already some changes on the confinement and symlinks if a release is cut before. Tell me what do you think ? |
|
The CI failure that requires both changes needs to be identified properly and the dependency justified. Splitting changes should be done where coupling is not strictly required. The pseudo-path policy should be reviewed separately. The broader confinement behaviour needs a Design discussion and the BSD regression needs resolving. This should be brought under 4.0 nonetheless. |
|
I still don’t see this as extending at all since we are matching daemon source/destination and files-from source confinement behavior which is what root confinement should be. We should have discussed this before on the files-from patching ( if you don’t want source/dest confinement) at least so we can have a consistent design, and we shouldn’t be also documenting that trusted-symlink confinement is same as daemon if we wont confine source/destination. Pseudo-path policy currently accept daemon log-file and refuse log-file under root confinement which remains inconsistent too. Anyways its your call to make i’ll leave it to u! |
Enforce --confine-root on source and destination paths and update confinement tests
Note: None of these cases constitute an untrusted-symlink vulnerability on their own, as they rely on a pre-existing root/operator-owned ("trusted") symlink inside the tree. Rather, they fix incomplete confinement checks where --confine-root allowed a trusted in-tree symlink or relative traversal to redirect a transfer outside the confined root.
Reported-by: karimabisaad@gmail.com