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

Segfault with Kernel 5.15 #7

Open
sHorst opened this issue Jan 5, 2022 · 3 comments
Open

Segfault with Kernel 5.15 #7

sHorst opened this issue Jan 5, 2022 · 3 comments

Comments

@sHorst
Copy link

sHorst commented Jan 5, 2022

I tried to adapt the Driver to Kernel 5.15. My fork can be found here: https://github.com/sHorst/socketcan-linux-5.0

It does compile, but will segfault on bringing the can0 Interface up.

I narrowed the bug down to ixx_usb_core.c Line 403. https://github.com/sHorst/socketcan-linux-5.0/blob/master/usb-to-can_socketcan/ixx_usb_core.c#L403

But even when commenting out the line completely (which would result in a Memory leak for now) it does still not work. Since the err of usb_submit_urb(urb, GFP_KERNEL); is ENOENT which indicates "specified interface or endpoint does not exist or is not enabled". I did not dig any deeper, do you have any idears, why it breaks here?

I am using a Kali VM (current as of now) with an USB2CAN interface.

Stefan

@skaretk
Copy link

skaretk commented Feb 3, 2022

Hello @sHorst .
I were also looking into getting this to work with kernel above 5.

Thanks to your code I were able to bring up the can interface on a laptop running native Ubuntu 20.04.

I remember trying to run ubuntu 16.04 on a VM (Virtualbox) with a Ixxat USB2CAN interface, but when attempting to bring up the can interface it resulted in the VM to crash. I never found a solution to this using a VM. Maybe this is related to running this inside a virtual enviroment?

@sHorst
Copy link
Author

sHorst commented Feb 4, 2022

ok the VM seems to be the problem.

So i did a PR #9

@samr-eroad
Copy link

I am not entirely certain whether we can narrow this down to a VM issue.
5.11.0-46-generic on a VM (20.04) works fine without any segfaults.

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

3 participants