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

Fix crash in client get_packet() call #12

Open
pthedinger opened this issue Jan 4, 2017 · 0 comments
Open

Fix crash in client get_packet() call #12

pthedinger opened this issue Jan 4, 2017 · 0 comments
Labels
type:bug Something isn't working type:testing Issue with testing

Comments

@pthedinger
Copy link

There is a bug where the mii_ethernet_rt_mac.xc can crash when handling the client get_packet() call on the line:

  info.src_ifnum = buf->src_port;

The only case that it seems this would be possible is when there are both high and low priority clients of the MAC and the following occurs:

  1. A packet is received for a low priority client and the client is notified.
  2. Many more packets are received for the high priority client and the buffers start to fill.
  3. The low priority packets are dropped to make room.
  4. The client comes to collect the packet. The pointer is NULL at that point, but is not being checked.

It is an easy fix, to check for NULL before using buf, and to return desc.type = ETH_NO_DATA; in that case. However, it would be best to have a test case to demonstrate this issue before fixing it.

@mbanth mbanth added type:bug Something isn't working type:testing Issue with testing labels Apr 7, 2021
@mbanth mbanth modified the milestone: Publish Before Resolution Apr 7, 2021
@shuchitak shuchitak changed the title Need test case to reproduce bug Fix crash in client get_packet() call Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working type:testing Issue with testing
Projects
None yet
Development

No branches or pull requests

2 participants