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

canbus: isotp: send_sf() only checks length in ASSERT statement #61501

Closed
henrikbrixandersen opened this issue Aug 15, 2023 · 0 comments · Fixed by #61502
Closed

canbus: isotp: send_sf() only checks length in ASSERT statement #61501

henrikbrixandersen opened this issue Aug 15, 2023 · 0 comments · Fixed by #61502
Assignees
Labels
area: CAN bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@henrikbrixandersen
Copy link
Member

Describe the bug
The send_sf() function in subsys/canbus/isotp/isotp.c only checks the SF length against the ISO-TP DL - index in an assert.

Expected behavior
It should always be checked at runtime.

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: Zephyr SDK
  • Commit SHA: 00e9461

Additional context
Found by code inspection.

@henrikbrixandersen henrikbrixandersen added bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug area: CAN labels Aug 15, 2023
henrikbrixandersen added a commit to vestas-wind-systems/zephyr that referenced this issue Aug 15, 2023
Convert the ISO-TP SF length check in send_sf() from __ASSERT() to a
runtime check.

Fixes: zephyrproject-rtos#61501

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
mbolivar-ampere pushed a commit that referenced this issue Aug 15, 2023
Convert the ISO-TP SF length check in send_sf() from __ASSERT() to a
runtime check.

Fixes: #61501

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
zephyrbot pushed a commit that referenced this issue Aug 15, 2023
Convert the ISO-TP SF length check in send_sf() from __ASSERT() to a
runtime check.

Fixes: #61501

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
(cherry picked from commit 1b3d1e0)
zephyrbot pushed a commit that referenced this issue Aug 15, 2023
Convert the ISO-TP SF length check in send_sf() from __ASSERT() to a
runtime check.

Fixes: #61501

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
(cherry picked from commit 1b3d1e0)
zephyrbot pushed a commit that referenced this issue Aug 15, 2023
Convert the ISO-TP SF length check in send_sf() from __ASSERT() to a
runtime check.

Fixes: #61501

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
(cherry picked from commit 1b3d1e0)
meshium pushed a commit to meshium/zephyr that referenced this issue Aug 16, 2023
Convert the ISO-TP SF length check in send_sf() from __ASSERT() to a
runtime check.

Fixes: zephyrproject-rtos#61501

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
jgl-meta pushed a commit that referenced this issue Aug 22, 2023
Convert the ISO-TP SF length check in send_sf() from __ASSERT() to a
runtime check.

Fixes: #61501

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
(cherry picked from commit 1b3d1e0)
fabiobaltieri pushed a commit that referenced this issue Aug 22, 2023
Convert the ISO-TP SF length check in send_sf() from __ASSERT() to a
runtime check.

Fixes: #61501

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
(cherry picked from commit 1b3d1e0)
cfriedt pushed a commit that referenced this issue Aug 25, 2023
Convert the ISO-TP SF length check in send_sf() from __ASSERT() to a
runtime check.

Fixes: #61501

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
(cherry picked from commit 1b3d1e0)
npal-cy pushed a commit to npal-cy/zephyr-1 that referenced this issue Oct 3, 2023
Convert the ISO-TP SF length check in send_sf() from __ASSERT() to a
runtime check.

Fixes: zephyrproject-rtos#61501

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: CAN bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant