Out of bounds memory read on 64 bit systems

Open
#1,295 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
c, cpp

Research direction

Inspect driver/ppm_events.c around lines 1109 and 1127, tracing the product assigned to u32 and how j is used after the userspace copy. Confirm the fix preserves the full 64-bit value and prevents j from reading beyond the copied data.

Written by the indexing model from the issue text.

Description

bug falcosecurity-contrib pinned

There's an integer truncation here when we assign the product of an unsigned long to a u32:

https://github.com/draios/sysdig/blob/123ba4d1a3bb5534ec8b92bbb10a356ff9652a5d/driver/ppm_events.c#L1109

j can now advance past what we copied from userspace leading to an out of bounds read:
https://github.com/draios/sysdig/blob/123ba4d1a3bb5534ec8b92bbb10a356ff9652a5d/driver/ppm_events.c#L1127

Dominant language
C++
Stars
8.3k
Forks
753
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from draios/sysdig

All issues in draios/sysdig

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.