Commit ef26bc7
fix out-of-bounds read in vk_string_validate on truncated utf-8
The continuation-byte scan only stops at max_length, not at the string's null terminator, so a name ending in a lone multi-byte lead byte makes it read past the terminator, up to MaxLoaderStringLength bytes beyond the buffer. Stop the scan when a null is seen inside a sequence and report it as bad data.1 parent 9a5f88e commit ef26bc7
3 files changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7487 | 7487 | | |
7488 | 7488 | | |
7489 | 7489 | | |
7490 | | - | |
| 7490 | + | |
7491 | 7491 | | |
7492 | 7492 | | |
7493 | 7493 | | |
| |||
7520 | 7520 | | |
7521 | 7521 | | |
7522 | 7522 | | |
| 7523 | + | |
| 7524 | + | |
| 7525 | + | |
| 7526 | + | |
| 7527 | + | |
| 7528 | + | |
7523 | 7529 | | |
7524 | 7530 | | |
7525 | 7531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
341 | 342 | | |
342 | 343 | | |
343 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
0 commit comments