Mitigate VIA keylogger security issues (#25414)
Co-authored-by: Nick Brassel <nick@tzarc.org>
This commit is contained in:
parent
6347d18a2d
commit
711b109246
3 changed files with 16 additions and 0 deletions
|
|
@ -22,6 +22,10 @@
|
|||
# error "DYNAMIC_KEYMAP_ENABLE is not enabled"
|
||||
#endif
|
||||
|
||||
#ifdef VIA_INSECURE
|
||||
# pragma message "VIA_INSECURE is enabled - firmware is susceptible to keyloggers"
|
||||
#endif
|
||||
|
||||
#include "via.h"
|
||||
|
||||
#include "raw_hid.h"
|
||||
|
|
@ -318,7 +322,11 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
|
|||
uint8_t rows = 28 / ((MATRIX_COLS + 7) / 8);
|
||||
uint8_t i = 2;
|
||||
for (uint8_t row = 0; row < rows && row + offset < MATRIX_ROWS; row++) {
|
||||
#ifdef VIA_INSECURE
|
||||
matrix_row_t value = matrix_get_row(row + offset);
|
||||
#else
|
||||
matrix_row_t value = 0;
|
||||
#endif
|
||||
#if (MATRIX_COLS > 24)
|
||||
command_data[i++] = (value >> 24) & 0xFF;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue