sysprog21 / vwifi

A virtual wireless device driver for Linux
MIT License
203 stars 39 forks source link

Fix possible buffer overflow #17

Closed rickywu0421 closed 2 years ago

rickywu0421 commented 2 years ago

In owl_connect(), when sme->ssid_len is greater than or equal to SSID_MAX_LENGTH, ssid_len will be assign to SSID_MAX_LENGTH, and a buffer overflow will occur when adding NULL terminator at owl->connecting_ssid[ssid_len].

rickywu0421 commented 2 years ago

Understood. I have changed the git commit message.

rickywu0421 commented 2 years ago

I doubt that we should increment the size of the connecting_ssid by one in owl_context instead of doing the above, because connecting_ssid should fit the length of SSID_MAX_LENGTH.

jserv commented 2 years ago

Use git rebase -i to squash the git commits into one.

jserv commented 2 years ago

Thank @rickywu0421 for contributing!