Commit Graph

27 Commits

Author SHA1 Message Date
zvecr
b831eb5270 Minor tidy up of xap_respond_success calls 2022-11-19 00:33:02 +00:00
zvecr
7de1a9d485 Fix insecure build 2022-11-17 23:31:09 +00:00
Stefan Kerkmann
1983421b7d
XAP: prevent OOB reads in config blob handler (#18926)
This fixes two bugs:

1. An invalid offset could be specified which wasn't checked to be in
   the bounds of the config blob.
2. The data_len check was incorrect as it would allow reading one byte
   past the config blob lenght.

Before the changes the following operation wouldn't fail:

Assuming we have blob of 64 bytes size and attempt a read with an
offset of 32 and data_len of 32, we actually try to read 32 bytes
starting from the 33. byte in the config blob. This reads exactly
one byte past array. Therefore we have to subtract one byte the get
the correct length.
2022-11-01 15:54:56 +00:00
zvecr
3ee042f236 set_rgb_matrix_config shouldnt touch eeprom 2022-10-27 11:22:19 +01:00
Nick Brassel
d9c8a64c18
Fix build error with NKRO_ENABLE=no 2022-10-27 11:54:51 +11:00
Nick Brassel
f7b44473aa
Use introspection handlers. 2022-10-08 15:14:02 +11:00
Stefan Kerkmann
907640e40e
[Bug] XAP: Fix unaligned memory access in config blob handler and USB task loop condition (#18612)
* Fix unaligned memory access in config blob handler

data* points in the middle of an u8 array, casting this to an u16* and
dereferencing it leads to an unaligned memory access - which hardfaults
on Cortex M0 mcus e.g. RP2040s.

* Actually read until there is no more data to be read
2022-10-05 20:26:53 +01:00
zvecr
986534ea95 Stub out lighting sets 2022-10-03 01:04:49 +01:00
zvecr
7ee5347485 Add eeprom init route 2022-10-01 04:16:19 +01:00
zvecr
019d3f4877 Finish stub for effect mapping 2022-09-29 23:44:19 +01:00
zvecr
f81328068e stash more lighting 2022-09-29 23:44:19 +01:00
zvecr
1dbb4c0f96 stash 2022-09-29 23:44:19 +01:00
zvecr
3fe1a931d7 Fix up OOB behaviour for get/set keycodes 2022-08-09 19:10:49 +01:00
zvecr
ced7094ddd Add xap cli functions to test secure 2022-07-07 01:57:41 +01:00
zvecr
dab3a4fde0 Refactor based on recent discussion - Add back 'Layer Count' 2022-06-19 23:26:37 +01:00
zvecr
956bd3b7ca Refactor based on recent discussion 2022-06-19 22:04:36 +01:00
zvecr
ba7770a4e4 Fix secure symbol missing 2022-06-16 14:27:38 +01:00
zvecr
4d895892e5 Stubs for ENCODER_MAP 2022-04-20 22:38:06 +01:00
zvecr
1d96fc866d Add route for hardware_id 2022-04-19 02:07:05 +01:00
zvecr
79db2df228 Allow secure to be slightly more optional 2022-04-11 01:07:22 +01:00
zvecr
89fab427c4 stub out secure as its own feature 2022-04-11 00:43:18 +01:00
zvecr
c9eae1d384 format 2022-04-02 00:11:22 +01:00
zvecr
e7d9d6675c Implement codegen for more data types - codegen for return_execute stubs removed 2022-04-01 23:38:13 +01:00
zvecr
6269c6b51c partial gen for return_execute 2022-03-30 23:20:14 +01:00
zvecr
ff1bb76537 basic info.json handling 2022-03-28 21:06:16 +01:00
Nick Brassel
c3ac89d1c9 qmk format-c, qmk format-python 2022-03-09 20:01:20 +11:00
Nick Brassel
eba91c6e28 Initial implementation of XAP protocol. 2021-08-11 21:08:32 +10:00