public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/10258] New: procfs probes should not put strings on kernel stack
@ 2009-06-10 15:17 fche at redhat dot com
  2009-07-02 20:42 ` [Bug translator/10258] " dsmith at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: fche at redhat dot com @ 2009-06-10 15:17 UTC (permalink / raw)
  To: systemtap

The implementation of _st_procfs_{read,write} use a string_t
temporary on the ordinary stack (strdata).  It must not do
that, since MAXSTRINGLEN could be large enough to overflow the
kernel stack, which may or may not be suspected/detected at compile
time.

Rather, such stuff needs to go into the context directly.

stap -DMAXSTRINGLEN=16384 -e ' { probe procfs("foo").write { log($value) }'

-- 
           Summary: procfs probes should not put strings on kernel stack
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: fche at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10258

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

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

* [Bug translator/10258] procfs probes should not put strings on kernel stack
  2009-06-10 15:17 [Bug translator/10258] New: procfs probes should not put strings on kernel stack fche at redhat dot com
@ 2009-07-02 20:42 ` dsmith at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: dsmith at redhat dot com @ 2009-07-02 20:42 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From dsmith at redhat dot com  2009-07-02 20:41 -------
Fixed in commit 8e0049e.  Now procfs probes (read or write) do not put strings
on the kernel stack.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |dsmith at redhat dot com
                   |redhat dot com              |
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=10258

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

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

end of thread, other threads:[~2009-07-02 20:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-10 15:17 [Bug translator/10258] New: procfs probes should not put strings on kernel stack fche at redhat dot com
2009-07-02 20:42 ` [Bug translator/10258] " dsmith 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).