Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 724344 (CVE-2020-9484)

Summary: <www-servers/tomcat-{7.0.104,8.5.55}: Remote Code Execution via session persistence (CVE-2020-9484)
Product: Gentoo Security Reporter: Sam James <sam>
Component: VulnerabilitiesAssignee: Gentoo Security <security>
Status: RESOLVED FIXED    
Severity: major CC: fordfrog, java
Priority: Normal Flags: nattka: sanity-check+
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://www.openwall.com/lists/oss-security/2020/05/20/4
Whiteboard: B1 [glsa+ cve cleanup]
Package list:
=www-servers/tomcat-7.0.104 amd64 =dev-java/tomcat-servlet-api-7.0.104 amd64 ppc64 x86 =www-servers/tomcat-8.5.55 amd64 =dev-java/tomcat-servlet-api-8.5.55 amd64 ppc64 x86
Runtime testing required: ---

Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-20 15:28:28 UTC
Description:
If:
a) an attacker is able to control the contents and name of a file on the
  server; and
b) the server is configured to use the PersistenceManager with a
  FileStore; and
c) the PersistenceManager is configured with
  sessionAttributeValueClassNameFilter="null" (the default unless a
  SecurityManager is used) or a sufficiently lax filter to allow the
  attacker provided object to be deserialized; and
d) the attacker knows the relative file path from the storage location
  used by FileStore to the file the attacker has control over;
then, using a specifically crafted request, the attacker will be able to
trigger remote code execution via deserialization of the file under
their control. Note that all of conditions a) to d) must be true for the
attack to succeed.

Mitigation:
- Upgrade to Apache Tomcat 10.0.0-M5 or later
- Upgrade to Apache Tomcat 9.0.35 or later
- Upgrade to Apache Tomcat 8.5.55 or later
- Upgrade to Apache Tomcat 7.0.104 or later
Alternatively, users may configure the PersistenceManager with an
appropriate value for sessionAttributeValueClassNameFilter to ensure
that only application provided attributes are serialized and deserialized.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-20 15:29:57 UTC
@maintainer(s), please advise if ready for stabilisation, or call yourself
Comment 2 NATTkA bot gentoo-dev 2020-05-20 15:32:33 UTC
Sanity check failed:

> www-servers/tomcat-7.0.104
>   depend amd64 stable profile default/linux/amd64/17.0 (28 total)
>     ~dev-java/tomcat-servlet-api-7.0.104:3.0
>   depend amd64 dev profile default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+ (2 total)
>     ~dev-java/tomcat-servlet-api-7.0.104:3.0
>   rdepend amd64 stable profile default/linux/amd64/17.0 (28 total)
>     ~dev-java/tomcat-servlet-api-7.0.104:3.0
>   rdepend amd64 dev profile default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+ (2 total)
>     ~dev-java/tomcat-servlet-api-7.0.104:3.0
> www-servers/tomcat-8.5.55
>   depend amd64 stable profile default/linux/amd64/17.0 (28 total)
>     ~dev-java/tomcat-servlet-api-8.5.55:3.1
>   depend amd64 dev profile default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+ (2 total)
>     ~dev-java/tomcat-servlet-api-8.5.55:3.1
>   rdepend amd64 stable profile default/linux/amd64/17.0 (28 total)
>     ~dev-java/tomcat-servlet-api-8.5.55:3.1
>   rdepend amd64 dev profile default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+ (2 total)
>     ~dev-java/tomcat-servlet-api-8.5.55:3.1
Comment 3 Miroslav Šulc gentoo-dev 2020-05-20 18:01:35 UTC
please stabilize
Comment 4 Larry the Git Cow gentoo-dev 2020-05-20 18:08:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ee1ed4c847701b5095b39a29de158554ff74571

commit 3ee1ed4c847701b5095b39a29de158554ff74571
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2020-05-20 18:08:08 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2020-05-20 18:08:08 +0000

    www-servers/tomcat: removed vulnerable version 9.0.34
    
    Bug: https://bugs.gentoo.org/724344
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 www-servers/tomcat/Manifest             |   1 -
 www-servers/tomcat/tomcat-9.0.34.ebuild | 181 --------------------------------
 2 files changed, 182 deletions(-)
Comment 5 Agostino Sarubbo gentoo-dev 2020-05-21 09:03:46 UTC
amd64 stable.

Maintainer(s), please cleanup.
Security, please add it to the existing request, or file a new one.
Comment 6 Larry the Git Cow gentoo-dev 2020-05-21 10:24:30 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc31a9948285a982d825c7c8c17151f347d8bea9

commit cc31a9948285a982d825c7c8c17151f347d8bea9
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2020-05-21 10:22:59 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2020-05-21 10:22:59 +0000

    www-servers/tomcat: removed vulnerable versions 7.0.103 and 8.5.54
    
    Bug: https://bugs.gentoo.org/724344
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 www-servers/tomcat/Manifest              |   2 -
 www-servers/tomcat/tomcat-7.0.103.ebuild | 146 ----------------------------
 www-servers/tomcat/tomcat-8.5.54.ebuild  | 158 -------------------------------
 3 files changed, 306 deletions(-)
Comment 7 GLSAMaker/CVETool Bot gentoo-dev 2020-06-15 15:56:17 UTC
This issue was resolved and addressed in
 GLSA 202006-21 at https://security.gentoo.org/glsa/202006-21
by GLSA coordinator Aaron Bauman (b-man).