Skip to content

fix(process): bounds-check GetJavaStacks thread parsing - #630

Open
sfc-gh-ikryvanos wants to merge 1 commit into
mainfrom
fix/process-javastacks-bounds-check
Open

fix(process): bounds-check GetJavaStacks thread parsing#630
sfc-gh-ikryvanos wants to merge 1 commit into
mainfrom
fix/process-javastacks-bounds-check

Conversation

@sfc-gh-ikryvanos

Copy link
Copy Markdown
Collaborator

The jstack parser indexed fields[1] of a thread header line without checking the slice length. A thread name crafted to leave fewer than two trailing fields caused an index-out-of-range panic that crashed the server. Guard the length before indexing. Adds testdata plus a regression case.

The jstack parser indexed fields[1] of a thread header line without
checking the slice length. A thread name crafted to leave fewer than two
trailing fields caused an index-out-of-range panic that crashed the
server. Guard the length before indexing. Adds testdata plus a regression
case.

Co-authored-by: Cursor <cursoragent@cursor.com>
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