|
From: | Paul Eggert |
Subject: | Re: tar extraction fails on a CIFS file system, due to a symlink |
Date: | Fri, 27 Dec 2024 11:54:47 -0800 |
User-agent: | Mozilla Thunderbird |
On 12/21/24 07:18, Bruno Haible via Bug reports for GNU Tar wrote:
Possible suggestion: Report it as a bug to the Linux kernel people?
That sounds best. If the CIFS kernel module can't support setting symlink timestamps on , it should fail with ENOTSUP rather than follow the symlink.
Symlinks seem to be a sore spot with Samba and there's been some recent symlink activity in linux/fs/smb/client (e.g., [1]) and I imagine on the server side as well, so the problem may be specific to a specific Linux kernel or CIFS server version or their combination.
Alternate suggestion: Delay utimensat() calls until the end of the 'tar' run? (Then 'tar' would have set wrong time stamps but exited with code 0.)
I don't see how that would help. If utimensat ignores AT_SYMLINK_NOFOLLOW, an attacker can craft a tarball that can set timestamps on any file the victim has access to. This would be true even if tar delayed utimensat calls.
Presumably other apps are also affected by this bug, and I imagine they can't easily work around it either.
[1]: https://github.com/torvalds/linux/commit/6a832bc8bbb22350f7ffe6ecb2d36f261bb96023
[Prev in Thread] | Current Thread | [Next in Thread] |