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

net: core: Free packet properly if TTL/hop limit is 0 #87325

Merged

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Mar 19, 2025

We drop the packet if TTL or hop limit is 0, but we should also unref the packet in this case because we return 0 to the caller which is not then able to free the packet because it thinks that the packet was sent properly.

Fixes #87323

We drop the packet if TTL or hop limit is 0, but we should
also unref the packet in this case because we return 0 to
the caller which is not then able to free the packet because
it thinks that the packet was sent properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
@zephyrbot zephyrbot added size: XS A PR changing only a single line of code area: Networking labels Mar 19, 2025
@jukkar jukkar added backport v3.7-branch Request backport to the v3.7-branch backport v4.1-branch Request backport to the v4.1-branch labels Mar 19, 2025
@kartben kartben merged commit 2f1a134 into zephyrproject-rtos:main Mar 21, 2025
30 checks passed
@jukkar jukkar deleted the fix/87323/net-buf-leak-for-ttl-0 branch March 21, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking backport v3.7-branch Request backport to the v3.7-branch backport v4.1-branch Request backport to the v4.1-branch size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Network buffer leak if sending IPv4 TTL 0 or IPv6 hop limit 0 packets
5 participants