Bug 1982874 (CVE-2021-2341) - CVE-2021-2341 OpenJDK: FTP PASV command response can cause FtpClient to connect to arbitrary host (Networking, 8258432)
Summary: CVE-2021-2341 OpenJDK: FTP PASV command response can cause FtpClient to conne...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-2341
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1972397 1972399 1972400 1972401 1972402 1972406 1972407 1972408 1972409 1972410 1995015 1995016 1995017 1995502
Blocks: 1972396
TreeView+ depends on / blocked
 
Reported: 2021-07-15 21:29 UTC by Tomas Hoger
Modified: 2021-12-15 14:49 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-21 09:54:40 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:2877 0 None None None 2021-07-26 01:29:57 UTC
Red Hat Product Errata RHBA-2021:2891 0 None None None 2021-07-26 16:32:48 UTC
Red Hat Product Errata RHBA-2021:2894 0 None None None 2021-07-26 16:30:18 UTC
Red Hat Product Errata RHBA-2021:2895 0 None None None 2021-07-26 16:31:46 UTC
Red Hat Product Errata RHBA-2021:2906 0 None None None 2021-07-26 16:54:36 UTC
Red Hat Product Errata RHBA-2021:2922 0 None None None 2021-07-27 17:37:21 UTC
Red Hat Product Errata RHBA-2021:2974 0 None None None 2021-08-02 13:39:09 UTC
Red Hat Product Errata RHBA-2021:3040 0 None None None 2021-08-09 16:36:41 UTC
Red Hat Product Errata RHBA-2021:3043 0 None None None 2021-08-10 10:54:06 UTC
Red Hat Product Errata RHBA-2021:3117 0 None None None 2021-08-10 15:43:10 UTC
Red Hat Product Errata RHBA-2021:3131 0 None None None 2021-08-11 08:10:38 UTC
Red Hat Product Errata RHBA-2021:3182 0 None None None 2021-08-17 11:01:56 UTC
Red Hat Product Errata RHBA-2021:3257 0 None None None 2021-08-24 11:18:04 UTC
Red Hat Product Errata RHSA-2021:2774 0 None None None 2021-07-21 12:02:35 UTC
Red Hat Product Errata RHSA-2021:2775 0 None None None 2021-07-21 11:48:33 UTC
Red Hat Product Errata RHSA-2021:2776 0 None None None 2021-07-21 09:37:13 UTC
Red Hat Product Errata RHSA-2021:2777 0 None None None 2021-07-22 15:03:13 UTC
Red Hat Product Errata RHSA-2021:2778 0 None None None 2021-07-22 15:02:53 UTC
Red Hat Product Errata RHSA-2021:2779 0 None None None 2021-07-22 15:11:01 UTC
Red Hat Product Errata RHSA-2021:2780 0 None None None 2021-07-22 15:10:10 UTC
Red Hat Product Errata RHSA-2021:2781 0 None None None 2021-07-21 08:44:51 UTC
Red Hat Product Errata RHSA-2021:2782 0 None None None 2021-07-21 08:40:15 UTC
Red Hat Product Errata RHSA-2021:2783 0 None None None 2021-07-21 08:02:43 UTC
Red Hat Product Errata RHSA-2021:2784 0 None None None 2021-07-21 09:36:28 UTC
Red Hat Product Errata RHSA-2021:2845 0 None None None 2021-07-21 12:50:22 UTC
Red Hat Product Errata RHSA-2021:3292 0 None None None 2021-08-30 08:02:24 UTC
Red Hat Product Errata RHSA-2021:3293 0 None None None 2021-08-30 08:04:27 UTC
Red Hat Product Errata RHSA-2021:4089 0 None None None 2021-11-02 10:19:08 UTC

Description Tomas Hoger 2021-07-15 21:29:25 UTC
A flaw was found in the way the FtpClient implementation in the Networking component of OpenJDK handled responses to the FTP PASV command.  A malicious FTP server could cause a Java application using FtpClient to connect to a host and port that is not accessible from the FTP server and perform port scanning or banner extraction.

The fix for this issue prevents FtpClient from connecting to hosts different form the server used for the main FTP connection.  As this fix may break certain FTP deployments, a newly introduced system property jdk.net.ftp.trustPasvAddress can be used to make FtpClient connect to any host specified in the PASV command response.

Comment 5 Tomas Hoger 2021-07-20 18:19:50 UTC
Oracle JDK release notes include the following note related to this fix:


core-libs/java.net
➜ URL FTP Protocol Handler: IPv4 Address Validation in Passive Mode

Client-side FTP support in the Java platform is available through the FTP URL stream protocol handler, henceforth referred to as the FTP Client.

The following system property has been added for validation of server addresses in FTP passive mode.

jdk.net.ftp.trustPasvAddress.

In this release, the FTP Client has been enhanced to reject an address sent by a server, in response to a PASV command from the FTP Client, when that address differs from the address which the FTP Client initially connected.

To revert to the prior behavior, the jdk.net.ftp.trustPasvAddress system property can be set to true. The affect of setting this property is that the FTP Client accepts and uses the address value returned in reply to a PASV command

JDK-8258432 (not public)


https://www.oracle.com/java/technologies/javase/11-0-12-relnotes.html
https://www.oracle.com/java/technologies/javase/8u301-relnotes.html
https://www.oracle.com/java/technologies/javase/7-support-relnotes.html#R170_311

Comment 6 Tomas Hoger 2021-07-20 20:43:14 UTC
Public now via Oracle CPU July 2021:

https://www.oracle.com/security-alerts/cpujul2021.html#AppendixJAVA

Fixed in Oracle Java SE 16.0.2, 11.0.12, 8u301, and 7u311.

Comment 7 errata-xmlrpc 2021-07-21 08:02:44 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

Via RHSA-2021:2783 https://access.redhat.com/errata/RHSA-2021:2783

Comment 8 errata-xmlrpc 2021-07-21 08:40:12 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2021:2782 https://access.redhat.com/errata/RHSA-2021:2782

Comment 9 errata-xmlrpc 2021-07-21 08:44:50 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:2781 https://access.redhat.com/errata/RHSA-2021:2781

Comment 10 errata-xmlrpc 2021-07-21 09:36:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2021:2784 https://access.redhat.com/errata/RHSA-2021:2784

Comment 11 errata-xmlrpc 2021-07-21 09:37:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:2776 https://access.redhat.com/errata/RHSA-2021:2776

Comment 12 Product Security DevOps Team 2021-07-21 09:54:40 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-2341

Comment 14 errata-xmlrpc 2021-07-21 11:48:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

Via RHSA-2021:2775 https://access.redhat.com/errata/RHSA-2021:2775

Comment 15 errata-xmlrpc 2021-07-21 12:02:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2021:2774 https://access.redhat.com/errata/RHSA-2021:2774

Comment 16 errata-xmlrpc 2021-07-21 12:50:21 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2021:2845 https://access.redhat.com/errata/RHSA-2021:2845

Comment 17 errata-xmlrpc 2021-07-22 15:02:50 UTC
This issue has been addressed in the following products:

  Red Hat Build of OpenJDK

Via RHSA-2021:2778 https://access.redhat.com/errata/RHSA-2021:2778

Comment 18 errata-xmlrpc 2021-07-22 15:03:08 UTC
This issue has been addressed in the following products:

  Red Hat Build of OpenJDK

Via RHSA-2021:2777 https://access.redhat.com/errata/RHSA-2021:2777

Comment 19 errata-xmlrpc 2021-07-22 15:10:08 UTC
This issue has been addressed in the following products:

  Red Hat Build of OpenJDK

Via RHSA-2021:2780 https://access.redhat.com/errata/RHSA-2021:2780

Comment 20 errata-xmlrpc 2021-07-22 15:10:52 UTC
This issue has been addressed in the following products:

  Red Hat Build of OpenJDK

Via RHSA-2021:2779 https://access.redhat.com/errata/RHSA-2021:2779

Comment 21 Tomas Hoger 2021-08-05 12:40:36 UTC
OpenJDK-11 upstream commit:
http://hg.openjdk.java.net/jdk-updates/jdk11u/rev/ca23657dc7da

OpenJDK-8 upstream commit:
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/2464c9fe4c11

Comment 22 errata-xmlrpc 2021-08-30 08:02:22 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7 Supplementary

Via RHSA-2021:3292 https://access.redhat.com/errata/RHSA-2021:3292

Comment 23 errata-xmlrpc 2021-08-30 08:04:25 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7 Supplementary

Via RHSA-2021:3293 https://access.redhat.com/errata/RHSA-2021:3293

Comment 24 errata-xmlrpc 2021-11-02 10:19:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:4089 https://access.redhat.com/errata/RHSA-2021:4089


Note You need to log in before you can comment on or make changes to this bug.