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

lwm2m: Composite operations return Access Denied (LwM2M 1.1) #64012

Closed
SeppoTakalo opened this issue Oct 17, 2023 · 1 comment · Fixed by #64016
Closed

lwm2m: Composite operations return Access Denied (LwM2M 1.1) #64012

SeppoTakalo opened this issue Oct 17, 2023 · 1 comment · Fixed by #64016
Assignees
Labels
area: LWM2M bug The issue is a bug, or the PR is fixing a bug

Comments

@SeppoTakalo
Copy link
Collaborator

Describe the bug
When sending Composite-Read operation, regardless of the targeted paths, LwM2M client is returning "Access Denied"

This is caused by check in https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/net/lib/lwm2m/lwm2m_message_handling.c#L2421-L2424

As Composite operations don't have PATH in CoAP, the uninitialized path object have ID of zero, which looks like operation into the security object.

To Reproduce
Steps to reproduce the behavior:

  1. Do Composite-Read

Expected behavior

Impact
LwM2M 1.1 Composite operations don't work.

@SeppoTakalo SeppoTakalo added the bug The issue is a bug, or the PR is fixing a bug label Oct 17, 2023
@SeppoTakalo SeppoTakalo self-assigned this Oct 17, 2023
SeppoTakalo added a commit to SeppoTakalo/zephyr that referenced this issue Oct 17, 2023
As composite operations don't have path in CoAP packet,
it wrongly triggered a check for security object and got
denied the access.

Fixes zephyrproject-rtos#64012

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
@SeppoTakalo
Copy link
Collaborator Author

Fix submitted in #64016

SeppoTakalo added a commit to SeppoTakalo/sdk-nrf that referenced this issue Oct 17, 2023
This pull request contains fixes for following two issues:
* zephyrproject-rtos/zephyr#64012
* zephyrproject-rtos/zephyr#64011

Fixes are submitted in Zephyr upstream in following PR:
* zephyrproject-rtos/zephyr#64016
* zephyrproject-rtos/zephyr#64015

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
SeppoTakalo added a commit to SeppoTakalo/zephyr that referenced this issue Oct 18, 2023
As composite operations don't have path in CoAP packet,
it wrongly triggered a check for security object and got
denied the access.

Fixes zephyrproject-rtos#64012

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
SeppoTakalo added a commit to SeppoTakalo/zephyr that referenced this issue Oct 19, 2023
As composite operations don't have path in CoAP packet,
it wrongly triggered a check for security object and got
denied the access.

Fixes zephyrproject-rtos#64012

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
SeppoTakalo added a commit to SeppoTakalo/zephyr that referenced this issue Oct 20, 2023
As composite operations don't have path in CoAP packet,
it wrongly triggered a check for security object and got
denied the access.

Fixes zephyrproject-rtos#64012

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
carlescufi pushed a commit that referenced this issue Oct 20, 2023
As composite operations don't have path in CoAP packet,
it wrongly triggered a check for security object and got
denied the access.

Fixes #64012

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Chenhongren pushed a commit to Chenhongren/zephyr that referenced this issue Oct 26, 2023
As composite operations don't have path in CoAP packet,
it wrongly triggered a check for security object and got
denied the access.

Fixes zephyrproject-rtos#64012

(cherry picked from commit 77ea861)

Original-Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
GitOrigin-RevId: 77ea861
Change-Id: I97e79ff918e486961652395b3a2516f5503f92c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4962334
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Commit-Queue: Al Semjonovs <asemjonovs@google.com>
Tested-by: Al Semjonovs <asemjonovs@google.com>
Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: LWM2M bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants