Commit 72b26be
committed
Fix GetObjectId bounds in PKCS12 ContentInfo parsing
Bound GetObjectId() by the ContentInfo SEQUENCE end
(curIdx + curSz) instead of the full buffer size. This
prevents the OID TLV from being parsed past the SEQUENCE
boundary in the first place, complementing the post-check
added in PR wolfSSL#10018.
Previously, GetObjectId received (word32)size as maxIdx,
allowing it to read OID data beyond the ContentInfo SEQUENCE.
The post-check then caught this after the fact. With this
change, GetObjectId itself rejects an OID that would exceed
the SEQUENCE, so the over-read never occurs.1 parent 1fab253 commit 72b26be
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| |||
0 commit comments