Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iwinfo {phy} assoclist will cause segfault and crash rpcd if approx 150+ clients connected to AP #15

Open
mrisaev opened this issue Nov 2, 2024 · 1 comment

Comments

@mrisaev
Copy link

mrisaev commented Nov 2, 2024

buffersize hardcoded in iwinfo.h
#define IWINFO_BUFSIZE 24 * 1024

in my setup size of the one item in assoclist output is around 175 Byte so:

24 x 1024 / 175 = 140 clients won't cause any problems, but when there is more, iwinfo assoclist
crashes with segfault in luci overview page and wireless page uses this function and crashes rpcd service.

'iw {phy} stations dump -v' - works fine in same conditions.

@mrisaev mrisaev changed the title iwinfo {phy} assoclist will cause segfault and crush rpcd if approx 150+ clients connected to AP iwinfo {phy} assoclist will cause segfault and crash rpcd if approx 150+ clients connected to AP Nov 2, 2024
@Ansuel
Copy link
Member

Ansuel commented Dec 6, 2024

Interesting bug... I need to check how this can be repro.

Ansuel added a commit to Ansuel/iwinfo that referenced this issue Dec 6, 2024
Limit assoclist element to IWINFO_BUFSIZE. This is to fix a segfault if
the clients are more than 140. Once the local buffer is filled, the
function stop parsing additional clients and returns info for the parsed
ones.

Fixes: openwrt#15
Signed-off-by: Christian Marangi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants