Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
1) Possible static overrun
=> lsusb-t-t.c:446:
macro SYSFS_STR() which does from
`SYSFS_STR(d_name, bus, maxchild)`
something like
`read_sysfs_file_string(de_name, "speed", bus->speed, MY_SYSFS_FILENAME_LEN)`
and on the basis of MY_SYSFS_FILENAME_LEN, there is done unsafe read in
read_sysfs_file_string() on line 236 -- variable buf (bus->spped) has only
size of 6 bytes (MY_SYSFS_FILENAME_LEN has value 255).
2) Possible static overrun
=> lsusb-t.c:394 .. the same as above
3) Static overrun in dump_audiocontrol_interface()
=> lsusb.c:1466: walking through array chconfig (of size only 12 items) by
for loop with stop-value '26'.
4) Using uninitialized value as index to buffer 'buf'
=> lsusb.c:1474
how to find error:
a) 1040: declared 'k' (uninitialized)
b) 1064: protocol == USB_AUDIO_CLASS_2
c) 1068: buf[2] == 0x09 so sub_type is assigned to 0x08
d) 1418: case 0x08:
e) 1451: case USB_AUDIO_CLASS_2:
f) 1474: printf("... ", buf[15+j+k], ..)
These problems were newly found in RHEL 6.2 by coverity difference scan on RHEL packages 6.1 → 6.2.
Created attachment 529816[details]
Patch for issues found by coverity
Here is a patch which I have submitted to upstream. It was created against their current git, so it maybe needs few small shifts against 003 version.
Basically we just need backport these patches from upstream:
05c92e6 Buffer overun
4c02560 Wrong shifting of bmMPEGFeatures byte
c04e55c Possible resource leak
e8a312a Using uninitialized value as index
c706f0d Reading 26 item in array with size 12.
f79916b Possible buffer overflow when using SYSFS_STR
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, 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://rhn.redhat.com/errata/RHBA-2016-0805.html
1) Possible static overrun => lsusb-t-t.c:446: macro SYSFS_STR() which does from `SYSFS_STR(d_name, bus, maxchild)` something like `read_sysfs_file_string(de_name, "speed", bus->speed, MY_SYSFS_FILENAME_LEN)` and on the basis of MY_SYSFS_FILENAME_LEN, there is done unsafe read in read_sysfs_file_string() on line 236 -- variable buf (bus->spped) has only size of 6 bytes (MY_SYSFS_FILENAME_LEN has value 255). 2) Possible static overrun => lsusb-t.c:394 .. the same as above 3) Static overrun in dump_audiocontrol_interface() => lsusb.c:1466: walking through array chconfig (of size only 12 items) by for loop with stop-value '26'. 4) Using uninitialized value as index to buffer 'buf' => lsusb.c:1474 how to find error: a) 1040: declared 'k' (uninitialized) b) 1064: protocol == USB_AUDIO_CLASS_2 c) 1068: buf[2] == 0x09 so sub_type is assigned to 0x08 d) 1418: case 0x08: e) 1451: case USB_AUDIO_CLASS_2: f) 1474: printf("... ", buf[15+j+k], ..) These problems were newly found in RHEL 6.2 by coverity difference scan on RHEL packages 6.1 → 6.2.