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 2098463 - lshw makes DNS queries
Summary: lshw makes DNS queries
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: lshw
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: ltao
QA Contact: Jeff Bastian
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-19 17:21 UTC by Stewart Smith
Modified: 2022-11-15 13:19 UTC (History)
5 users (show)

Fixed In Version: lshw-B.02.19.2-9.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 11:22:17 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 RHELPLAN-125666 0 None None None 2022-06-19 17:44:06 UTC
Red Hat Product Errata RHBA-2022:8382 0 None None None 2022-11-15 11:22:19 UTC

Description Stewart Smith 2022-06-19 17:21:53 UTC
Description of problem:
lshw will make an external DNS query on `lshw -version` to check what the latest upstream version is.

Version-Release number of selected component (if applicable):
lshw-B.02.19.2-7

How reproducible:
100%

Steps to Reproduce:
1. `ltrace -l libresolv.so* lshw -version` will show the lookup.

Actual results:
A call to `__res_querydomain`.

Expected results:
No DNS query!

Additional info:
Fedora PR https://src.fedoraproject.org/rpms/lshw/pull-request/1
(C9s one coming after filing this bug)

Comment 1 Stewart Smith 2022-06-19 17:23:07 UTC
Centos Stream merge request: https://gitlab.com/redhat/centos-stream/rpms/lshw/-/merge_requests/3

Comment 2 Stewart Smith 2022-06-19 20:06:26 UTC
Upstream PR: https://github.com/lyonel/lshw/pull/86

Comment 3 ltao 2022-07-18 01:22:52 UTC
Hi Jeff,

Could you please set qa_ack flags for this bz?

Thanks,
Tao Liu

Comment 4 Jeff Bastian 2022-07-18 20:59:29 UTC
qa_ack+ and ITM are set

Comment 5 Jeff Bastian 2022-07-21 22:35:09 UTC
The suggested ltrace reproducer in comment 0 does not work for me:

[root@localhost ~]# ltrace -l libresolv.so* lshw -version
B.02.19.2
the latest version is B.02.18
+++ exited (status 0) +++

In fact, lshw is not even linked to libresolv.so:

[root@ampere-mtsnow-altramax-02 ~]# ldd /usr/sbin/lshw
	linux-vdso.so.1 (0x0000ffff9d1c0000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x0000ffff9ce89000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000ffff9ce58000)
	libc.so.6 => /lib64/libc.so.6 (0x0000ffff9ccaa000)
	/lib/ld-linux-aarch64.so.1 (0x0000ffff9d183000)
	libm.so.6 => /lib64/libm.so.6 (0x0000ffff9cc09000)



However, I was able to view the DNS lookup with Wireshark in another terminal:

### terminal 1
[root@localhost ~]# tshark port 53
Running as user "root" and group "root". This could be dangerous.
Capturing on 'eno1'


### terminal 2

[root@localhost ~]# rpm -q lshw
lshw-B.02.19.2-7.el9.aarch64

[root@localhost ~]# lshw -version
B.02.19.2
the latest version is B.02.18


### meanwhile, back in terminal 1

    1 0.000000000   10.8.1.199 → 10.11.5.19   DNS 73 Standard query 0x39a4 TXT lshw.ezix.org
    2 0.000691844   10.11.5.19 → 10.8.1.199   DNS 93 Standard query response 0x39a4 TXT lshw.ezix.org TXT


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Repeating the test with the updated lshw version:

### terminal 1
[root@localhost ~]# tshark port 53
Running as user "root" and group "root". This could be dangerous.
Capturing on 'eno1'


### terminal 2

[root@localhost ~]# rpm -q lshw
lshw-B.02.19.2-9.el9.aarch64

[root@localhost ~]# lshw -version
B.02.19.2


### meanwhile, back in terminal 1

# (no output from tshark) - success!

Comment 10 errata-xmlrpc 2022-11-15 11:22:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (lshw bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8382


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