-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[BUG] Chip Stack Protection in LwIP UDP receive path #25604
Comments
@vivien-apple @tcarmelveilleux @wqx6 @kpschoedel The LwIP bits absolutely rely on allocating packetbuffers in LwIPReceiveUDPMessage, which is very much not on the Matter main thread. The options seems to be:
Any other ideas? |
The lwIP pbuf allocation is already thread safe. The stat race should be allowed. |
Get the following output:
|
This is causing crashes on Linux and should be backed out. The cost far outweigh the benefits. @vivien-apple |
Reproduction steps
#25485 enables protection to check PacketBufferHandle accessing and LwIP UDP receive path doesn't require LockChipStack/UnlockChipStack for PacketBufferHandle protection.
So our Wi-Fi platform gets assert on PacketBufferHandle allocation when a UDP packet received,
Is that OK to add LockChipStack()/UnlockChipStack() in UDPEndPointImplLwIP::LwIPReceiveUDPMessage to protect PacketBufferHandle access?
Here is call stack when our platform hit this unsafe access.
Bug prevalence
whenever I do this
GitHub hash of the SDK that was being used
8afc1f5
Platform
other
Platform Version(s)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: