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 2028146 - [RHEL 7] assertion when using 'xx' arguments to strace [rhel 7.9.z]
Summary: [RHEL 7] assertion when using 'xx' arguments to strace [rhel 7.9.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: strace
Version: 7.9
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Eugene Syromiatnikov
QA Contact: Jesus Checa
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-01 15:20 UTC by Paulo Andrade
Modified: 2024-01-19 04:25 UTC (History)
5 users (show)

Fixed In Version: strace-4.24-7.el7_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2028157 2028158 2028163 2028166 (view as bug list)
Environment:
Last Closed: 2023-08-29 09:29:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-104470 0 None None None 2021-12-01 15:28:27 UTC
Red Hat Product Errata RHBA-2023:4820 0 None None None 2023-08-29 09:29:23 UTC

Description Paulo Andrade 2021-12-01 15:20:17 UTC
Backtrace:

...
(gdb) bt
#0  die () at strace.c:313
#1  0x000000000040d883 in error_msg_and_die (fmt=fmt@entry=0x4640e8 "%s: got unexpected return value %d for snprintf(buf, %zu, %s)") at error_prints.c:74
#2  0x000000000042152a in xsnprintf_ (str=0x6f9a20 <res.6552> "if_nametoindex(\"\\x62\\x6c\\x69\\x6e\\x6", size=36, func=0x484ede <__func__.6555> "get_ifname", argstr=0x484eb0 "(\"if_nametoindex(\" \"%s\" \")\"), name_quoted_buf", 
    format=0x484e9b "if_nametoindex(%s)", format=0x484e9b "if_nametoindex(%s)", argstr=0x484eb0 "(\"if_nametoindex(\" \"%s\" \")\"), name_quoted_buf", func=0x484ede <__func__.6555> "get_ifname", size=36, 
    str=0x6f9a20 <res.6552> "if_nametoindex(\"\\x62\\x6c\\x69\\x6e\\x6") at xstring.h:36
#3  0x0000000000421596 in get_ifname (ifindex=6) at print_ifindex.c:31
#4  print_ifindex (ifindex=6) at print_ifindex.c:44
#5  0x0000000000427a7d in decode_ndmsg (tcp=0x712370, nlmsghdr=<optimized out>, family=<optimized out>, addr=140215372832688, len=60) at rtnl_neigh.c:86
#6  0x000000000041c5c8 in decode_netlink_route (tcp=tcp@entry=0x712370, nlmsghdr=nlmsghdr@entry=0x7fffffffe0b0, addr=addr@entry=140215372832688, len=len@entry=60) at netlink_route.c:120
...

  The problem in frame #3:

(gdb) f 3
#3  0x0000000000421596 in get_ifname (ifindex=6) at print_ifindex.c:31
31			xsprintf(res, INI_PFX "%s" INI_SFX, name_quoted_buf);
(gdb) info local
name_buf = "blink1\000\000\000\000\000\000\000\000\000"
name_quoted_buf = "\"\\x62\\x6c\\x69\\x6e\\x"
res = "if_nametoindex(\"\\x62\\x6c\\x69\\x6e\\x6"
res = "if_nametoindex(\"\\x62\\x6c\\x69\\x6e\\x6"
__func__ = "get_ifname"

  The fix could be to check the 'xflag' global variable and not print in hex
the name, but since all strings are printed in hex, the most likely fix should
be to rework the code in print_ifindex.c. This appears to be buggy:

# define IFNAME_QUOTED_SZ (sizeof(IFNAMSIZ) * 4 + 3)

as it most likely should mean:

# define IFNAME_QUOTED_SZ (IFNAMSIZ * 4 + 3)

because, otherwise it should result in:

sizeof(IFNAMSIZ) that is the same as sizeof(16) and return 4 (as literal
16 should default to type int). So, the code likely did already prepare for
printing in hex, but due to a mistake, used sizeof.

Comment 3 Eugene Syromiatnikov 2021-12-02 21:48:57 UTC
Thank you for the bug report.  The issue is fixed upstream in strace commit v5.15~1[1].

[1] https://gitlab.com/strace/strace/-/commit/e27b0677

Comment 13 errata-xmlrpc 2023-08-29 09:29:21 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 (strace bug fix 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-2023:4820

Comment 14 Red Hat Bugzilla 2024-01-19 04:25:05 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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