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

rt_can_read memory write out of boundary #8634

Open
easy6666 opened this issue Mar 19, 2024 · 1 comment
Open

rt_can_read memory write out of boundary #8634

easy6666 opened this issue Mar 19, 2024 · 1 comment

Comments

@easy6666
Copy link

easy6666 commented Mar 19, 2024

function _can_int_rx in components/drivers/can/can.c

/* read from software FIFO */
while (msgs)
{
    ...
        rt_memcpy(data, &listmsg->data, sizeof(struct rt_can_msg));
    ...
    data ++;
    msgs -= sizeof(struct rt_can_msg);
}

didn't validate the data length and rx_fifo->uselist msgs length while calling _can_int_rx in rt_can_read, if msgs > datalength, it could result in memory write out of boundary.

@easy6666 easy6666 changed the title rt_can_read memory write out of bounder rt_can_read memory write out of boundary Mar 19, 2024
@mysterywolf
Copy link
Member

欢迎提交PR~

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

No branches or pull requests

2 participants