Skip to content

libtraceevent: Fix double free in process_sizeof()

Steven Rostedt linux-trace-devel 2 versions New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v13 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3libtraceevent: Fix double free in parsing sizeof()src/event-parse.c+2 -10 replies
2/3libtraceevent: No need for testing ok in else if (!ok) in process_sizeof()src/event-parse.c+1 -10 replies
3/3libtraceevent: Rename "ok" to "token_has_paren" in process_sizeof()src/event-parse.c+6 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] libtraceevent: Fix double free in process_sizeof()

From: "Steven Rostedt (Google)" <[email protected]>

Google's fuzz testing found a double free in process_sizeof(). That was an easy fix, but the reason the bug happened was because of that silly "ok" variable called "ok", which is meaningless for what it is used for.

Also, remove the unneeded test of !ok at the end of the if/else block.

Changes since v1: https://lore.kernel.org/all/[email protected]/

- Fix commit message of patch 3 that used "end" originally, but then I thought that too was too ambiguous.

Steven Rostedt (Google) (3):
libtraceevent: Fix double free in parsing sizeof()
libtraceevent: No need for testing ok in else if (!ok) in
process_sizeof()
libtraceevent: Rename "ok" to "token_has_paren" in process_sizeof()

 src/event-parse.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
Signature · 1 line
2.39.1