Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the static initializer of TempFileManager, which runs the first time an aar or mar carrying lib/.jar is deployed (Utils.getURLsForAllJars via Utils.createTempFile), deletes every axis2-tmp- entry in java.io.tmpdir that has no .lck file, and both its filter and recursiveDelete use File.isDirectory, which follows symbolic links. a local user who creates /tmp/axis2-tmp-x pointing at a directory the axis2 account can write (the services repository, the webapp) gets that directory emptied by the server on its next such deployment (CWE-59). ConfigurationContext.deleteTempFiles, run from terminate() over the artifacts dir that falls back to the shared java.io.tmpdir/_axis2, has the same problem for a link placed inside it. all three checks now use Files.isDirectory with NOFOLLOW_LINKS, so a link is removed or skipped rather than descended into, and stale temp dirs are still cleaned up. TempFileManagerTest and ConfigurationContextTempCleanupTest fail before the change (the link target is emptied) and pass after, and the kernel module verify run is green.