Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ASan buffer overflow errors caused by memcmp #393

Merged
merged 1 commit into from
Dec 22, 2021

Conversation

JohnoKing
Copy link

This pull request replaces more instances of memcmp with strncmp to fix some more heap-buffer-overflow errors in ASan, some of which can occur when running the regression tests with xtrace enabled. It combines two existing patches plus another fix in name.c for xtrace:
https://www.mail-archive.com/[email protected]/msg00877.html
https://github.com/oracle/solaris-userland/blob/master/components/ksh93/patches/035-CR7036535.patch

This commit replaces more instances of memcmp with strncmp to fix some
more heap-buffer-overflow errors in ASan, some of which can occur when
running the regression tests with xtrace enabled. It combines two
existing patches plus another fix in name.c for xtrace:
https://www.mail-archive.com/[email protected]/msg00877.html
https://github.com/oracle/solaris-userland/blob/master/components/ksh93/patches/035-CR7036535.patch
@McDutchie
Copy link

Does this fix the remainder of #306 by any chance?

@JohnoKing
Copy link
Author

The changes in this pull request do fix one issue that caused the heredoc tests to fail with xtrace, but it doesn't fix the issue with lex_advance (this crash still occurs).

@McDutchie McDutchie merged commit d40d998 into ksh93:master Dec 22, 2021
McDutchie pushed a commit that referenced this pull request Dec 22, 2021
This commit replaces more instances of memcmp with strncmp to fix some
more heap-buffer-overflow errors in ASan, some of which can occur when
running the regression tests with xtrace enabled. It combines two
existing patches plus another fix in name.c for xtrace:
https://www.mail-archive.com/[email protected]/msg00877.html
https://github.com/oracle/solaris-userland/blob/master/components/ksh93/patches/035-CR7036535.patch
@JohnoKing JohnoKing deleted the memcmp-to-strncmp branch December 22, 2021 07:33
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