This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2166258 - getnetconfig.c: endnetconfig() may leak some bytes with some input
Summary: getnetconfig.c: endnetconfig() may leak some bytes with some input
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libtirpc
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Zhi Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-01 10:36 UTC by Zhi Li
Modified: 2023-09-23 11:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-23 11:27:40 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-7924 0 None Migrated None 2023-09-23 11:27:37 UTC
Red Hat Issue Tracker RHELPLAN-147260 0 None None None 2023-02-01 10:38:49 UTC

Description Zhi Li 2023-02-01 10:36:47 UTC
Description of problem:

By applying libfuzzer to libtirpc, there exists some leaking input with unit tests, by checking the code, the stack var linep may be freed here, no matter ncp is NULL or not.

http://git.linux-nfs.org/?p=steved/libtirpc.git;a=blob;f=src/getnetconfig.c;h=cfd33c24523be2f327a1ac1d3b2116556f591b99;hb=HEAD#l511

[root@build]# ./fuzz_netconfig
INFO: Running with entropic power schedule (0xFF, 100).
INFO: Seed: 1938463231
INFO: Loaded 1 modules   (100 inline 8-bit counters): 100 [0x566f00, 0x566f64),
INFO: Loaded 1 PC tables (100 PCs): 100 [0x53c708,0x53cd48),
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
INFO: A corpus is not provided, starting from an empty corpus
#2 INITED cov: 67 ft: 68 corp: 1/1b exec/s: 0 rss: 34Mb
#1018 NEW    cov: 69 ft: 70 corp: 2/14b lim: 14 exec/s: 0 rss: 41Mb L: 13/13 MS: 1 InsertRepeatedBytes-
#1128 REDUCE cov: 69 ft: 70 corp: 2/13b lim: 14 exec/s: 0 rss: 42Mb L: 12/12 MS: 5 CrossOver-CrossOver-CrossOver-ChangeBinInt-CopyPart-
#1442 NEW    cov: 69 ft: 71 corp: 3/30b lim: 17 exec/s: 0 rss: 45Mb L: 17/17 MS: 4 CopyPart-CrossOver-ShuffleBytes-InsertRepeatedBytes-
#1516 REDUCE cov: 69 ft: 71 corp: 3/29b lim: 17 exec/s: 0 rss: 46Mb L: 16/16 MS: 4 CrossOver-EraseBytes-InsertRepeatedBytes-CrossOver-
#3154 REDUCE cov: 69 ft: 72 corp: 4/61b lim: 33 exec/s: 0 rss: 65Mb L: 32/32 MS: 3 EraseBytes-ChangeBit-InsertRepeatedBytes-

=================================================================
==96286==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 2000 byte(s) in 2 object(s) allocated from:
    #0 0x4e4032 in malloc (/opt/fuzzing/build/fuzz_netconfig+0x4e4032) (BuildId: bc22722f519954441dea0a1da3ad82162abb7b04)
    #1 0x7f62da891c52 in getnetconfigent /opt/libtirpc/src/getnetconfig.c:471:18

SUMMARY: AddressSanitizer: 2000 byte(s) leaked in 2 allocation(s).
INFO: to ignore leaks on libFuzzer side use -detect_leaks=0.

MS: 3 InsertByte-InsertByte-CMP- DE: "local"-; base unit: 4f872abc50800168557a27b32bc6c547a16f3177
0x6c,0x6f,0x63,0x61,0x6c,0x0,0xa,0x0,0xa,0x0,0x0,0xa,0x0,0x0,
local\000\012\000\012\000\000\012\000\000
artifact_prefix='./'; Test unit written to ./leak-9ef93f15a2aa0034c7d6b6250e536c96d112ad5b
Base64: bG9jYWwACgAKAAAKAAA=
[root@build]# cat ./leak-9ef93f15a2aa0034c7d6b6250e536c96d112ad5b
local


Version-Release number of selected component (if applicable):

libtirpc-1.3.3-1.el9.x86_64

Comment 5 RHEL Program Management 2023-09-23 11:26:30 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 6 RHEL Program Management 2023-09-23 11:27:40 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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