lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 1 Jul 2022 12:13:53 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Pawel Laszczak <pawell@...ence.com>,
        Felipe Balbi <felipe.balbi@...ux.intel.com>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: [BUG] str not used in cdns3 trace events

Hi,

I'm doing updates to add __vstring (dynamically created strings in trace
events) and came across the trace events in:

  drivers/usb/cdns3/trace.h

Where there is several cases of this:

+DECLARE_EVENT_CLASS(cdns3_log_usb_irq,
+       TP_PROTO(struct cdns3_device *priv_dev, u32 usb_ists),
+       TP_ARGS(priv_dev, usb_ists),
+       TP_STRUCT__entry(
+               __field(enum usb_device_speed, speed)
+               __field(u32, usb_ists)
+               __dynamic_array(char, str, CDNS3_MSG_MAX)
+       ),
+       TP_fast_assign(
+               __entry->speed = cdns3_get_speed(priv_dev);
+               __entry->usb_ists = usb_ists;
+       ),
+       TP_printk("%s", cdns3_decode_usb_irq(__get_str(str), __entry->speed,
+                                            __entry->usb_ists))
+);

I see you create a dynamic array for "str" and even reference it in the
print with __get_str(str). But it is never assigned in TP_fast_assign().

This looks to be a bug to me. Can you explain this please?

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ