You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
commit 2e43ae7dd71cd9bb0d1bce1d3306bf77523feb81 upstream.
Initializing const char opregion_signature[16] = OPREGION_SIGNATURE
(which is "IntelGraphicsMem") drops the NUL termination of the
string. This is intentional, but the compiler doesn't know this.
Switch to initializing header->signature directly from the string
litaral, with sizeof destination rather than source. We don't treat the
signature as a string other than for initialization; it's really just a
blob of binary data.
Add a static assert for good measure to cross-check the sizes.
Reported-by: Kees Cook <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13934
Tested-by: Nicolas Chauvet <[email protected]>
Tested-by: Damian Tometzki <[email protected]>
Cc: [email protected]
Reviewed-by: Zhenyu Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jani Nikula <[email protected]>
(cherry picked from commit 4f8207469094bd04aad952258ceb9ff4c77b6bfa)
Signed-off-by: Jani Nikula <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
(cherry picked from commit 4b171d4cbfffca02df349ed8405e93ff3b01e36a)
Signed-off-by: Jack Vogel <[email protected]>
0 commit comments