prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.02k stars 5.36k forks source link

Vulnerabilities in io.netty_netty-all, org.eclipse.jetty_jetty-io, io.netty_netty jar packages #16210

Open sravyanu-kore opened 3 years ago

sravyanu-kore commented 3 years ago

Hi,

Latest version of presto is still using vulnerable jar packages of io.netty_netty-all, org.eclipse.jetty_jetty-io, io.netty_netty.

Due to this we have below mentioned risk factors:

In Eclipse Jetty versions 1.0 thru 9.4.32.v20200930, 10.0.0.alpha1 thru 10.0.0.beta2, and 11.0.0.alpha1 thru 11.0.0.beta2O, on Unix like systems, the system\'s temporary directory is shared between all users on that system. A collocated user can observe the process of creating a temporary sub directory in the shared temporary directory and race to complete the creation of the temporary subdirectory. If the attacker wins the race then they will have read and write permission to the subdirectory used to unpack web applications, including their WEB-INF/lib jar files and JSP files. If any code is ever executed out of this temporary directory, this can lead to a local privilege escalation vulnerability.

Netty is an open-source, asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients. In Netty before version 4.1.59.Final there is a vulnerability on Unix-like systems involving an insecure temp file. When netty\'s multipart decoders are used local information disclosure can occur via the local system temporary directory if temporary storing uploads on the disk is enabled. On unix-like systems, the temporary directory is shared between all user. As such, writing to this directory using APIs that do not explicitly set the file/directory permissions can lead to information disclosure. Of note, this does not impact modern MacOS Operating Systems. The method \"File.createTempFile\" on unix-like systems creates a random file, but, by default will create this file with the permissions \"-rw-r--r--\". Thus, if sensitive information is written to this file, other local users can read this information. This is the case in netty\'s \"AbstractDiskHttpData\" is vulnerable. This has been fixed in version 4.1.59.Final. As a workaround, one may specify your own \"java.io.tmpdir\" when you start the JVM or use \"DefaultHttpDataFactory.setBaseDir(...)\" to set the directory to something that is only readable by the current user.

jimsimon-wk commented 3 years ago

Related CVEs:

org.eclipse.jetty_jetty-io

org.jboss.netty_netty

io.netty_netty

jimsimon-wk commented 3 years ago

Related PR: https://github.com/prestodb/drift/pull/22

jimsimon-wk commented 2 years ago

Another CVE was opened 15 days ago for these same library: CVE-2021-37137