Libbpf.c crash in method
Open
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
Regarding the function in libbpf.c: void bpf_program__unload(struct bpf_program *prog)
I received a crash on the expression:
for (i = 0; i < prog->instances.nr; i++)
zclose(prog->instances.fds[i]);
I believe prog->instances.nr is not the proper length of prog->instances.fds[], unless my implementation of this method is wrong.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in libbpf.c at bpf_program__unload and inspect how prog->instances.nr relates to prog->instances.fds[]. Reproduce or trace the reported crash, then verify the unload path uses the valid instance range without accessing outside the file-descriptor array.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100