-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
SynchronossPartHttpMessageReader should only create temp directory when needed #27092
Comments
@sdeleuze @rstoyanchev @poutsma @bclozel Please help! |
There is no reason to ping us directly after filing an issue. It will get the attention it deserves. As to your question: what you are seeing is the result of #26931, which in term was a fix for this security report. Without this change, Synchronoss creates a fixed temp directory, which has serious security implications. We cannot delete the directory at exit, because that would delete all uploaded files. In other words: no, this is not a bug. The disk space of the directory itself is negligible though, it's only if a lot of uploaded files are stored there that the directory will start to take space. And typically, your OS cleans up temporary files after a while. |
@poutsma might be a stupid question. I raised an issue on spring-cloud-gateway, I'm not sure where should I raise, docker? |
If you are not using multipart support, then these directories should be empty and only use up a several bytes each. |
Here are some commands that you could run in your host to provide the information asked by @poutsma : $ df -ih /tmp
$ cd /tmp
$ find synchronoss* -type d | wc -l
$ find synchronoss* -type d -empty | wc -l Also, could you give us more information about the /tmp file system in your docker image? |
The SynchronossPartHttpMessageReader should only create temp directory when needed, not at startup. Closes gh-27092
I have made some changes, so that the directory is now only created when parsing multipart data. This still means that you can end up with multiple temporary directories, but there should be less of them. |
@poutsma Any plan to make this changes in 5.2.x? |
Thanks for your reply. I'm sorry I can't count the The effect is significant, when the QPS grows, the CPU load will not increase much. I only adjusted a few lines of code. If necessary, I can submit a PR. |
I have made a similar change myself, see above, so a PR won't be necessary. Thank you though. Note that we have stopped using Synchronoss as default multiparty parser as of version 5.3, where we ship our own |
Good, We will add the upgrade plan to our schedule. |
The SynchronossPartHttpMessageReader should only create temp directory when needed, not at startup. Closes spring-projectsgh-27092
spring-projects/spring-framework#27092 1 . SynchronossPartHttpMessageReader should only create temp directory when needed https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22965 2. A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding. The specific exploit requires the application to run on Tomcat as a WAR deployment. If the application is deployed as a Spring Boot executable jar, i.e. the default, it is not vulnerable to the exploit. However, the nature of the vulnerability is more general, and there may be other ways to exploit it.
I upgrade springboot version to 2.3.12.RELEASE, SpringCloud: Hoxton.SR11, and met error upside. I found
SynchronossPartHttpMessageReader
defaultprivate Path fileStorageDirectory = createTempDirectory();
create temp dir, and never delete it. So my disk space if full.Why
SynchronossPartHttpMessageReader
in spring-web-5.2.15.RELEASE doing so? Is it a bug?The text was updated successfully, but these errors were encountered: