Bug Report: Uninitialized Buffer res in rpc_iwinfo_scan() May Cause Garbage Data
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 15
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
In the rpc_iwinfo_scan() function of rpcd, the local buffer res is defined but not explicitly initialized:
char res[IWINFO_BUFSIZE];
This buffer is reused multiple times during the scan process. Without proper initialization (e.g., memset), this may lead to garbage data or leftover content from previous iterations, especially if the content length varies across calls.
Contributor guide
No contributing guide indexed for this repository
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
Locate rpc_iwinfo_scan() in rpcd and inspect how the local res buffer is reused during scanning. Verify that it is initialized appropriately before use and that varying content lengths cannot expose leftover data; done means the scan no longer returns garbage or stale buffer content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100