HyukjinKwon opened a new pull request #35946:
URL: https://github.com/apache/spark/pull/35946


   ### What changes were proposed in this pull request?
   
   This PR proposes to use `FileUtil.unTarUsingJava` that is a Java 
implementation for un-tar. `unTarUsingJava` is not public but it exists in all 
Hadoop versions from 2.1+, see HADOOP-9264.
   
   ### Why are the changes needed?
   
   There is a risk for arbitrary shell command injection via `Utils.unpack` 
when the filename is controlled by a malicious user. This is due to an issue in 
Hadoop's `unTar`, that is not properly escaping the filename before passing to 
a shell 
command:https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java#L904
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, it prevents a security issue that, previously, allowed users to execute 
arbitrary shall command.
   
   ### How was this patch tested?
   
   Manually tested in local, and existing test cases should cover.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to