forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 14
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
New fortify warning on ARCH=arm in drivers/iio/pressure/dlhl60d.c after -next commit 0f4459080884 #2000
Labels
[FIXED][LINUX] development cycle
This bug was only present and fixed in a -next or -rc cycle
loop unroller
[WORKAROUND] Applied
This bug has an applied workaround
Comments
FWIW, I cannot reproduce this with GCC. The offending call is in
I'm checking how the fortify split could have possibly triggered this... |
This, again, appears to be a loop unrolling issue. :( However, the iio code is also making a lot of assumptions. I've sent an RFC: |
roxell
pushed a commit
to roxell/linux
that referenced
this issue
Feb 26, 2024
3 bytes were being read but 4 were being written. Explicitly initialize the unused bytes to 0 and refactor the loop to use direct array indexing, which appears to silence a Clang false positive warning[1]. Indent improvement included for readability of the fixed code. Link: ClangBuiltLinux#2000 [1] Fixes: ac78c6a ("iio: pressure: Add driver for DLH pressure sensors") Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240223172936.it.875-kees@kernel.org Cc: <Stable@vger.kerenl.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
nathanchance
added
[PATCH] Accepted
A submitted patch has been accepted upstream
[WORKAROUND] Applied
This bug has an applied workaround
[FIXED][LINUX] development cycle
This bug was only present and fixed in a -next or -rc cycle
and removed
[BUG] Untriaged
Something isn't working
[PATCH] Accepted
A submitted patch has been accepted upstream
labels
Feb 27, 2024
TheOrangeCat
pushed a commit
to TheOrangeCat/linux
that referenced
this issue
Mar 20, 2024
3 bytes were being read but 4 were being written. Explicitly initialize the unused bytes to 0 and refactor the loop to use direct array indexing, which appears to silence a Clang false positive warning[1]. Indent improvement included for readability of the fixed code. Link: ClangBuiltLinux/linux#2000 [1] Fixes: ac78c6a ("iio: pressure: Add driver for DLH pressure sensors") Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240223172936.it.875-kees@kernel.org Cc: <Stable@vger.kerenl.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[FIXED][LINUX] development cycle
This bug was only present and fixed in a -next or -rc cycle
loop unroller
[WORKAROUND] Applied
This bug has an applied workaround
After commit 0f4459080884 ("fortify: Split reporting and avoid passing string pointer") in -next, I see a new fortify warning in
drivers/iio/pressure/dlhl60d.c
with a couple of distribution configurations (such as OpenSUSE's):This happens with LLVM 18, so this does not appear to be any changed compiler behavior (but I did not check older releases).
I have done no further investigation to see if this warning is legitimate or not.
The text was updated successfully, but these errors were encountered: