History

firmware: Sigma: Prevent out of bounds memory access

The SigmaDSP firmware loader currently does not perform enough boundary size checks when processing the firmware. As a result it is possible that a malformed firmware can cause an out of bounds memory access. This patch adds checks which ensure that both the action header and the payload are completely inside the firmware data boundaries before processing them.

Lars-Peter Clausen committed 14 years ago

Commit 4f718a21 parent fc8e6e82 files · +55 −26Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/sigma.h+0−5
@@ -50,11 +50,6 @@ static inline u32 sigma_action_len(struct sigma_action *sa) · 49 unmodified lines
5050 return (sa->len_hi << 16) | sa->len;
5151 }
5252
53−static inline size_t sigma_action_size(struct sigma_action *sa, u32 payload_len)
54−{
55− return sizeof(*sa) + payload_len + (payload_len % 2);
56−}
57−
5853 extern int process_sigma_firmware(struct i2c_client *client, const char *name);
5954
6055 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t