trace-cmd report buffer overflow detected

Bug #1955129 reported by Ioanna Alifieraki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
trace-cmd (Ubuntu)
Fix Released
Medium
Ioanna Alifieraki
Bionic
Won't Fix
Medium
Ioanna Alifieraki

Bug Description

[IMPACT]

When running trace-cmd report on Bionic it crashes with

*** buffer overflow detected ***: trace-cmd terminated
Aborted (core dumped)

[TEST CASE]

Prepare a simple script to trace e.g. :

#!/usr/bin/python
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.close()

then

$ sudo trace-cmd record -a -p function_graph -g __fput -g sock_close -g tcp_close python2 ./close.py

$ sudo trace-cmd report

The latter will fail with buffer overflow detected

[WHERE THINGS COULD GO WRONG]

The fixing commit changes the size of a buffer from 20 to 24 in arg_eval() function
to avoid buffer overflow.
Any potential regression would occur in that function.

[OTHER]

Only Bionic is affected, it is fixed in newer releases.

Fix upstream commit 1375d98d8017e371776adbef10122a57ce2100e5

Changed in trace-cmd (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Ioanna Alifieraki (joalif)
Changed in trace-cmd (Ubuntu Bionic):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Ioanna Alifieraki (joalif)
Revision history for this message
Ioanna Alifieraki (joalif) wrote :

Debdiff for Bionic

Revision history for this message
Ioanna Alifieraki (joalif) wrote :

Debdiff for Bionic

tags: added: sts
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "lp1955129_bionic.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
tags: added: sts-sponsor-halves
Revision history for this message
Heitor Alves de Siqueira (halves) wrote :

@joalif thank you for the debdiff! There are some minor nitpicks about the patch file that I'd like to confirm with you:

- The 'Origin:' tag in your patch file seems to be missing the patch identifier. From the commit id, would it be appropriate to point it towards [0]?
- I've seen you added a line that says "Backported from upstream commit <snip>". If this required changes, please adjust the 'Origin:' tag with a "backport" prefix instead of "upstream" (you could then omit that additional line)

[0] https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?id=1375d98d8017

Mathew Hodson (mhodson)
Changed in trace-cmd (Ubuntu):
status: In Progress → Fix Released
tags: added: se-sponsor-halves
removed: sts-sponsor-halves
Revision history for this message
Heitor Alves de Siqueira (halves) wrote :

Marking as won't fix, as Bionic is no longer under standard support.

Changed in trace-cmd (Ubuntu Bionic):
status: In Progress → Won't Fix
tags: removed: patch se-sponsor-halves sts
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.