public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug bpf/24946] New: printing hex sequences causes crash
@ 2019-08-28 21:30 sapatel at redhat dot com
  2019-08-30 20:20 ` [Bug bpf/24946] " sapatel at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sapatel at redhat dot com @ 2019-08-28 21:30 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=24946

            Bug ID: 24946
           Summary: printing hex sequences causes crash
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: bpf
          Assignee: systemtap at sourceware dot org
          Reporter: sapatel at redhat dot com
  Target Milestone: ---

The use of hex sequences is causing stapbpf to crash and produce a segmentation
fault. For example, the following script exhibits such behaviour:

stap --bpf -e 'probe oneshot { print("\x40") }'

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug bpf/24946] printing hex sequences causes crash
  2019-08-28 21:30 [Bug bpf/24946] New: printing hex sequences causes crash sapatel at redhat dot com
@ 2019-08-30 20:20 ` sapatel at redhat dot com
  2019-09-03 20:08 ` sapatel at redhat dot com
  2019-09-03 20:10 ` sapatel at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: sapatel at redhat dot com @ 2019-08-30 20:20 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=24946

--- Comment #1 from Sagar Patel <sapatel at redhat dot com> ---
The translation in stapbpf causes the iterator to reach the end of the string
after building the hex number, and then loop increments the iterator again and
misses the stopping condition. This causes the loop to go out of range and
eventually run into a segmentation fault.

Additionally, the building of the hex number doesn't account for digits '8' and
'9', and as mentioned in PR24947 there is no check for valid hex sequences.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug bpf/24946] printing hex sequences causes crash
  2019-08-28 21:30 [Bug bpf/24946] New: printing hex sequences causes crash sapatel at redhat dot com
  2019-08-30 20:20 ` [Bug bpf/24946] " sapatel at redhat dot com
@ 2019-09-03 20:08 ` sapatel at redhat dot com
  2019-09-03 20:10 ` sapatel at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: sapatel at redhat dot com @ 2019-09-03 20:08 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=24946

Sagar Patel <sapatel at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Sagar Patel <sapatel at redhat dot com> ---
Fixed in commit 728bbc1ac. 

This is a temporary patch, and will be reverted after PR13371 is fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug bpf/24946] printing hex sequences causes crash
  2019-08-28 21:30 [Bug bpf/24946] New: printing hex sequences causes crash sapatel at redhat dot com
  2019-08-30 20:20 ` [Bug bpf/24946] " sapatel at redhat dot com
  2019-09-03 20:08 ` sapatel at redhat dot com
@ 2019-09-03 20:10 ` sapatel at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: sapatel at redhat dot com @ 2019-09-03 20:10 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=24946

--- Comment #3 from Sagar Patel <sapatel at redhat dot com> ---
(In reply to Sagar Patel from comment #2)
> Fixed in commit 728bbc1ac. 
> 
> This is a temporary patch, and will be reverted after PR13371 is fixed.

The portion of the patch dealing with this PR will not be reverted, only the
portion dealing with PR24947 will be reverted.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-03 20:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 21:30 [Bug bpf/24946] New: printing hex sequences causes crash sapatel at redhat dot com
2019-08-30 20:20 ` [Bug bpf/24946] " sapatel at redhat dot com
2019-09-03 20:08 ` sapatel at redhat dot com
2019-09-03 20:10 ` sapatel at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).