microsoft / microsoft/jbpf

When mlock() partially fails, it can lead to memory access issues that could result in a bus error.

Open
#39 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.