Bug 1710620 (CVE-2019-5436) - CVE-2019-5436 curl: TFTP receive heap buffer overflow in tftp_receive_packet() function
Summary: CVE-2019-5436 curl: TFTP receive heap buffer overflow in tftp_receive_packet(...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2019-5436
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1711839 1711840 1711841 1712840 1829562
Blocks: 1710621
TreeView+ depends on / blocked
 
Reported: 2019-05-15 21:07 UTC by Pedro Sampaio
Modified: 2023-09-07 20:02 UTC (History)
23 users (show)

Fixed In Version: curl 7.65.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 22:34:12 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:1020 0 None None None 2020-03-31 19:12:07 UTC
Red Hat Product Errata RHSA-2020:1792 0 None None None 2020-04-28 15:53:07 UTC
Red Hat Product Errata RHSA-2020:2505 0 None None None 2020-06-10 17:05:57 UTC

Description Pedro Sampaio 2019-05-15 21:07:45 UTC
libcurl contains a heap buffer overflow in the function (`tftp_receive_packet()`) that recevives data from a TFTP server. It calls `recvfrom()` with the default size for the buffer rather than with the size that was used to allocate it. Thus, the content that might overwrite the heap memory is entirely controlled by the server.

Upstream patch:

https://curl.haxx.se/0001-tftp-use-the-current-blksize-for-recvfrom.patch

References:

https://curl.haxx.se/docs/CVE-2019-5436.html

Comment 2 Huzaifa S. Sidhpurwala 2019-05-20 05:57:46 UTC
libcurl contains a heap buffer overflow in the function (`tftp_receive_packet()`) that recevives data from a TFTP server. It calls `recvfrom()` with the default size for the buffer rather than with the size that was used to allocate it. Thus, the content that might overwrite the heap
memory is entirely controlled by the server.

The flaw exists if the user selects to use a "blksize" of 504 or smaller (default is 512). The smaller size that is used, the larger the possible
overflow becomes.

Users chosing a smaller size than default should be rare as the primary use case for changing the size is to make it larger.

It is rare for users to use TFTP across the Internet. It is most commonly used within local networks.

Comment 4 Huzaifa S. Sidhpurwala 2019-05-20 08:41:32 UTC
Acknowledgments:

Name: the Curl project
Upstream: l00p3r

Comment 6 Dhananjay Arunesh 2019-05-22 11:01:21 UTC
Created curl tracking bugs for this issue:

Affects: fedora-all [bug 1712840]

Comment 8 errata-xmlrpc 2020-03-31 19:12:05 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2020:1020 https://access.redhat.com/errata/RHSA-2020:1020

Comment 9 Product Security DevOps Team 2020-03-31 22:34:12 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-2019-5436

Comment 10 errata-xmlrpc 2020-04-28 15:53:05 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:1792 https://access.redhat.com/errata/RHSA-2020:1792

Comment 13 Huzaifa S. Sidhpurwala 2020-05-04 03:05:56 UTC
External References:

https://curl.haxx.se/docs/CVE-2019-5436.html

Comment 14 Huzaifa S. Sidhpurwala 2020-05-04 03:09:59 UTC
Statement:

This flaw exists if the user selects to use a "blksize" of 504 or smaller (default is 512). The smaller size that is used, the larger the possible overflow becomes.
Users choosing a smaller size than default should be rare as the primary use case for changing the size is to make it larger. It is rare for users to use TFTP across the Internet. It is most commonly used within local networks.

Comment 15 errata-xmlrpc 2020-06-10 17:05:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.7 Extended Update Support

Via RHSA-2020:2505 https://access.redhat.com/errata/RHSA-2020:2505


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