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

safety: move RX addr check into top level hook #1727

Merged
merged 8 commits into from
Nov 20, 2023
Merged

Conversation

adeebshihadeh
Copy link
Contributor

No description provided.

@adeebshihadeh adeebshihadeh marked this pull request as ready for review November 20, 2023 04:00
@adeebshihadeh adeebshihadeh merged commit 3d2f99d into master Nov 20, 2023
10 of 11 checks passed
@adeebshihadeh adeebshihadeh deleted the real-rx-whitelist branch November 20, 2023 04:03
@@ -59,14 +59,20 @@ const addr_checks *current_rx_checks = &default_rx_checks;

bool safety_rx_hook(CANPacket_t *to_push) {
bool controls_allowed_prev = controls_allowed;
int ret = current_hooks->rx(to_push);

bool valid = addr_safety_check(to_push, current_rx_checks, current_hooks->get_checksum,
Copy link
Contributor

@sshane sshane Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still returns true if the address isn't in the whitelisted struct btw, so Honda bug isn't caught

But this makes it much easier to write that, so I'll take it up in a new 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

Successfully merging this pull request may close these issues.

2 participants