Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[25.0 backport] daemon: overlay2: remove world writable permission from the lower file #47513

Merged
merged 1 commit into from
Mar 6, 2024

Commits on Mar 6, 2024

  1. daemon: overlay2: remove world writable permission from the lower file

    In de2447c, the creation of the 'lower' file was changed from using
    os.Create to using ioutils.AtomicWriteFile, which ignores the system's
    umask. This means that even though the requested permission in the
    source code was always 0666, it was 0644 on systems with default
    umask of 0022 prior to de2447c, so the move to AtomicFile potentially
    increased the file's permissions.
    
    This is not a security issue because the parent directory does not
    allow writes into the file, but it can confuse security scanners on
    Linux-based systems into giving false positives.
    
    Signed-off-by: Jaroslav Jindrak <dzejrou@gmail.com>
    (cherry picked from commit cadb124)
    Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
    Dzejrou authored and vvoland committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    d0d85f6 View commit details
    Browse the repository at this point in the history