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

Server segfault when trying to observe from unreachable client #619

Closed
shabunin opened this issue Jul 12, 2021 · 1 comment
Closed

Server segfault when trying to observe from unreachable client #619

shabunin opened this issue Jul 12, 2021 · 1 comment

Comments

@shabunin
Copy link

Steps to reproduce:

  1. Start examples/lwm2mserver
  2. Start examples/lwm2mclient
  3. Kill lwm2mclient, so it won't trigger DEREGISTRATION
  4. observe 0 /5/0/3

After five unsuccessful attempts to send coap message, server throws segmentation fault.
IDE shows that it happened inside observe.c: prv_obsRequestCallback when app is trying to get access to members of (coap_packet_t *) packet structure, which is NULL.

@mlasch
Copy link
Contributor

mlasch commented Jul 16, 2021

Hi @shabunin, thanks for reporting this bug. I was able to reproduce the crash. As you pointed out, the issue happens in the error handling when a transaction expires due to too many re-transmissions.

mlasch added a commit to mlasch/wakaama that referenced this issue Jul 19, 2021
Fix segfault in observation request retry error handling callback.
Check message for NULL pointer prior to accessing it.
mlasch added a commit to mlasch/wakaama that referenced this issue Jul 21, 2021
Fix segfault in retry error handling callback for observation
request. Check message for NULL pointer prior to accessing it.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
mlasch added a commit to mlasch/wakaama that referenced this issue Jul 21, 2021
Fix segfault when observation request exceeds max retries.
Check message for NULL pointer prior to accessing in error
handling callback.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
mlasch added a commit to mlasch/wakaama that referenced this issue Jul 22, 2021
Fix segfault when observation and observation cancel request exceed
max retries. Check message for NULL pointer prior to accessing in
error handling callback.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
mlasch added a commit to mlasch/wakaama that referenced this issue Jul 22, 2021
Fix segfault when observation and observation cancel request exceed
max retries. Check message for NULL pointer prior to accessing in
error handling callback.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
mlasch added a commit to mlasch/wakaama that referenced this issue Aug 24, 2021
Fix segfault when observation and observation cancel request exceed
max retries. Check message for NULL pointer prior to accessing in
error handling callback.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
mlasch added a commit to mlasch/wakaama that referenced this issue Aug 24, 2021
Fix segfault when observation and observation cancel request exceed
max retries. Check message for NULL pointer prior to accessing in
error handling callback.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
mlasch added a commit to mlasch/wakaama that referenced this issue Aug 25, 2021
Fix segfault when observation and observation cancel request exceed
max retries. Check message for NULL pointer prior to accessing in
error handling callback.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
mlasch added a commit that referenced this issue Aug 25, 2021
Fix segfault when observation and observation cancel request exceed
max retries. Check message for NULL pointer prior to accessing in
error handling callback.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
@mlasch mlasch closed this as completed Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants