Skip to content

Fix benign overread in HTML/js-norm parser#503

Merged
val-ms merged 1 commit intoCisco-Talos:mainfrom
val-ms:CLAM-1711-js-norm-overread
Sep 17, 2022
Merged

Fix benign overread in HTML/js-norm parser#503
val-ms merged 1 commit intoCisco-Talos:mainfrom
val-ms:CLAM-1711-js-norm-overread

Conversation

@val-ms
Copy link
Contributor

@val-ms val-ms commented Mar 16, 2022

Fix a possible overread in handle_de() where we dereference tokens
without boundchecking. The over-read does not cause a crash.
I do not believe this issue to be a vulnerability.

Resolves: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44849

Also clean up very sloppy bounds checking in match_parameters().
I don't have any evidence of an overflow. The code just looks sus.

Eliminated a benign warning in cli_js_process_buffer().

@val-ms val-ms requested a review from ragusaa March 16, 2022 01:05
@val-ms
Copy link
Contributor Author

val-ms commented Mar 16, 2022

I'd like to run this one through a larger regression test to make sure it doesn't inadvertently change the javascript normalization and cause false negatives.

@val-ms val-ms requested a review from shutton March 16, 2022 01:07
@val-ms
Copy link
Contributor Author

val-ms commented May 1, 2022

I haven't merged this yet because in a large regression test I found a number of false negatives and I haven't had time to triage each to determine if there's a bug, or if we will just have to update some signatures after this lands. Can complete this after 0.105 ships.

@val-ms val-ms force-pushed the CLAM-1711-js-norm-overread branch from 01511cd to 386bd44 Compare September 16, 2022 21:52
Fix a possible overread in `handle_de()` where we dereference tokens
without boundchecking. The over-read does not cause a crash.

Resolves: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44849

Also clean up very sloppy bounds checking in `match_parameters()`.
I don't have any evidence of an overflow. The code just looks sus.

Eliminated a benign warning in `cli_js_process_buffer()`.
@val-ms val-ms force-pushed the CLAM-1711-js-norm-overread branch from 386bd44 to 7301d1a Compare September 16, 2022 21:54
@val-ms val-ms merged commit 0301808 into Cisco-Talos:main Sep 17, 2022
@val-ms val-ms deleted the CLAM-1711-js-norm-overread branch September 17, 2022 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants