Skip to content

Conversation

@nashif
Copy link
Owner

@nashif nashif commented Dec 6, 2020

test

@nashif nashif force-pushed the action_pr1 branch 10 times, most recently from ee34296 to d698a70 Compare December 7, 2020 00:21
@nashif nashif force-pushed the action_pr1 branch 3 times, most recently from bdf447a to e2124be Compare December 7, 2020 00:32
@nashif nashif assigned nashif and unassigned nashif Dec 7, 2020
@nashif nashif force-pushed the action_pr1 branch 2 times, most recently from 2f31483 to 9c5bd1e Compare December 7, 2020 01:05
@github-actions github-actions bot requested a review from nashifzephyr December 7, 2020 01:06
@nashif nashif requested review from nashifzephyr and removed request for nashifzephyr December 7, 2020 02:18
@nashif nashif assigned nashif and unassigned nashif Dec 7, 2020
@nashif nashif requested review from nashifzephyr and removed request for nashifzephyr December 7, 2020 02:20
@nashif nashif assigned nashif and unassigned nashif Dec 7, 2020
@nashif nashif removed the request for review from nashifzephyr December 7, 2020 02:21
@nashif nashif removed the area: CI label Dec 7, 2020
Bail if reviewer is not a collaborator.

Signed-off-by: Anas Nashif <[email protected]>
@nashif nashif merged commit 60bee99 into master Dec 7, 2020
nashif pushed a commit that referenced this pull request Oct 28, 2024
hci_packet_complete(buf, buf_size) should check whether buf_size is
enough.
For instance, hci_packet_complete can receive buf with buf_size 1,
leading to the buffer overflow in cmd->param_len, which is buf[3].
This can happen when rx_thread() receives two frames in 512 bytes
and the first frame size is 511. Then, rx_thread() will call
hci_packet_complete() with 1.

==5==ERROR: AddressSanitizer: global-buffer-overflow on address
0x000000ad81c2 at pc 0x0000005279b3 bp 0x7fffe74f5b70 sp 0x7fffe74f5b68

READ of size 2 at 0x000000ad81c2 thread T6
    #0 0x5279b2  (/root/zephyr.exe+0x5279b2)
    #1 0x4d697d  (/root/zephyr.exe+0x4d697d)
    #2 0x7ffff60e5daa  (/lib/x86_64-linux-gnu/libc.so.6+0x89daa)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

0x000000ad81c2 is located 2 bytes to the right of global variable
'rx_thread.frame' defined in 'zephyr/drivers/bluetooth/hci/userchan.c'
(0xad7fc0) of size 512
SUMMARY: AddressSanitizer: global-buffer-overflow
(/root/zephyr.exe+0x5279b2)
Thread T6 created by T2 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T2 created by T1 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x530192  (/root/zephyr.exe+0x530192)
    #2 0x4dcc22  (/root/zephyr.exe+0x4dcc22)

Thread T1 created by T0 here:
    #0 0x48c17c  (/root/zephyr.exe+0x48c17c)
    #1 0x52f36c  (/root/zephyr.exe+0x52f36c)
    #2 0x5371dc  (/root/zephyr.exe+0x5371dc)
    #3 0x5312a6  (/root/zephyr.exe+0x5312a6)
    #4 0x52ed7b  (/root/zephyr.exe+0x52ed7b)
    #5 0x52eddd  (/root/zephyr.exe+0x52eddd)
    #6 0x7ffff6083c89  (/lib/x86_64-linux-gnu/libc.so.6+0x27c89)
(BuildId: 2e01923fea4ad9f7fa50fe24e0f3385a45a6cd1c)

==5==ABORTING

Signed-off-by: Sungwoo Kim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants