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

[nrf fromtree] net: ipv6: mld: Fix improper reference drop #1679

Merged
merged 1 commit into from
May 14, 2024

Conversation

krish2718
Copy link
Contributor

In case of successful submission, the reference shouldn't be put down, this only should done on error cases.

As reference is put down on success, during the buffer unref, no action is taken due to an uint8 overflow (ref is now 255), so, the buf->frags isn't cleared properly and the next time the frags is used and when L2 inserts a second frag, the first head frag and next frag are same (due to buffer re-use) causing an infinite loop in either net_buf_frag_last or net_pkt_get_len.

Signed-off-by: Chaitanya Tata Chaitanya.Tata@nordicsemi.no
(cherry picked from commit 09048e0)

@krish2718 krish2718 force-pushed the fix_ipv6_mld branch 2 times, most recently from f80ee59 to 249d20c Compare May 9, 2024 20:06
In case of successful submission, the reference shouldn't be put down,
this only should done on error cases.

As reference is put down on success, during the buffer unref, no action
is taken due to an uint8 overflow (ref is now 255), so, the buf->frags
isn't cleared properly and the next time the frags is used and when L2
inserts a second frag, the first head frag and next frag are same (due
to buffer re-use) causing an infinite loop in either net_buf_frag_last
or net_pkt_get_len.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
(cherry picked from commit 09048e0)
@nordicjm nordicjm merged commit 26f4b1b into nrfconnect:main May 14, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants