Commit Graph

4 Commits (124d36a981d4d025a29f425967db467c19d0d16e)

Author SHA1 Message Date
Pierre Ossman ed73ac2aa7 Handle pixel formats with odd shift values
Our fast paths assume that each channel fits in to a separate byte.
That means the shift needs to be a multiple of 8. Start actually
checking this so that a client cannot trip us up and possibly cause
incorrect code exection.

Issue found by Pavel Cheremushkin from Kaspersky Lab.
5 years ago
Pierre Ossman 1d5aaf54f8 Add sanity checks for PixelFormat shift values
Otherwise we might be tricked in to reading and writing things at
incorrect offsets for pixels which ultimately could result in an
attacker writing things to the stack or heap and executing things
they shouldn't.

This only affects the server as the client never uses the pixel
format suggested by th server.

Issue found by Pavel Cheremushkin from Kaspersky Lab.
5 years ago
Pierre Ossman 9f7abaea3a Fix depth sanity test in PixelFormat 5 years ago
matt 408c005d3e Initial commit 5 years ago