When mlock() partially fails, it can lead to memory access issues that could result in a bus error.
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 73
- Forks
- 23
- Avg merge
- 21h 17m
- Merged PRs (30d)
- 1
Description
When mlock() partially fails, it can lead to memory access issues that could result in a bus error.
https://github.com/microsoft/jbpf/blob/main/src/mem_mgmt/jbpf_mem_mgmt.c#L452 When mlock fails, it just prints a warning - not sure should we fail and return?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/mem_mgmt/jbpf_mem_mgmt.c at line 452 and trace how the mlock() result is handled when locking only partially succeeds. Determine the appropriate failure behavior and verify that callers do not continue with unsafe memory access; done means the partial-failure case is handled without a possible bus error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100