openwrt / openwrt/rpcd

Bug Report: Uninitialized Buffer res in rpc_iwinfo_scan() May Cause Garbage Data

Open
#14 1 comment 0 reactions 0 assignees View on GitHub

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

  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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.