-
Notifications
You must be signed in to change notification settings - Fork 409
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
UBSAN: array-index-out-of-bounds for rtw_wlan_util.c and phydm_math_lib.c #345
Comments
The name rtl8821ce/include/wlan_bssdef.h Lines 95 to 99 in 66983b6
For the other thing, the newer version of the driver has a check which prevents the out-of-bounds value: |
Thought it might be worthwhile sharing my experience here as well. The following warnings are printed to the screen by
|
@KernelGhost Have you tried rtw88 recently? It may be working okay now. |
@dubhater When I initially set up my system, I used the rtw88_8821ce driver that came bundled with the Linux kernel. Unfortunately, the performance was poor, with very slow connection speeds and frequent random disconnections from wireless access points. Due to these issues, I blacklisted the RTW88 driver and installed the RTL8821ce driver instead. Since making the switch, I have noticed a significant improvement in both performance and stability. |
But when was that? Some fixes for RTL8821CE went into kernel 6.9. |
Did you mean to say fixes to RTW88 were included in kernel version 6.9?
The last time I tried rtw88_8821ce was on a kernel between 6.5 and 6.8 (inclusive), though I can't recall the exact version. Since networking is currently operational and stable using RTL8821ce, I am willing to tolerate the warnings for now. I might trial rtw88_8821ce again in the future if necessary. |
Yes, I meant fixes to rtw88. |
UBSAN: array-index-out-of-bounds in core/rtw_wlan_util.c:1912:48
UBSAN: array-index-out-of-bounds in core/rtw_wlan_util.c:1917:75
UBSAN: array-index-out-of-bounds in core/rtw_wlan_util.c:1923:76
UBSAN: array-index-out-of-bounds in core/rtw_wlan_util.c:1926:34
pIE->Length
is probably initialized to something incorrect. I can't find the original structPNDIS_802_11_VARIABLE_IEs
declaration anywhere, however I found these which seem to match:(source1, source2, source3)
data
is a single-elementUCHAR
array, so the wholefor (i = 0; i < (pIE->Length); i++)
doesn't make much of a sense unless it's a hack for a variable-length array with array-like declaration instead ofUCHAR* data
. If it's the latter, only bad fixes come to my mind:sizeof (pIE->data) / sizeof (*(pIE->data))
eventually breaking due to the nature ofmalloc()
calloc()
+NULL
requiring the driver allocating memory (doesn't seem to be the case?)and something probably easier to solve:
UBSAN: array-index-out-of-bounds in hal/phydm/phydm_math_lib.c:172:26
is probably missing a row here or the input is garbage value.
Logs:
The text was updated successfully, but these errors were encountered: