Skip to content

Replace configuration file parsers with memory-safe parser - #725

Merged
bradh352 merged 37 commits into
c-ares:mainfrom
bradh352:last_parsers
Mar 16, 2024
Merged

bradh352 merged 37 commits into
c-ares:mainfrom
bradh352:last_parsers

Conversation

@bradh352

@bradh352 bradh352 commented Mar 12, 2024 •

Copy link
Copy Markdown
Member

Rewrite configuration parsers using new memory safe parsing functions. After CVE-2024-25629 its obvious that we need to prioritize again on getting all the hand written parsers with direct pointer manipulation replaced. They're just not safe and hard to audit. It was yet another example of 20+yr old code having a memory safety issue just now coming to light.

Though these parsers are definitely less efficient, they're written with memory safety in mind, and any performance difference is going to be meaningless for something that only happens once a while.

Fix By: Brad House (@bradh352)

@bradh352
bradh352 marked this pull request as draft March 12, 2024 16:05
@bradh352
bradh352 marked this pull request as ready for review March 16, 2024 14:51
@bradh352 bradh352 changed the title Replace last hand-written parsers with memory-safe parsers Replace configuration file parsers with memory-safe parser Mar 16, 2024
@bradh352
bradh352 merged commit a2a8578 into c-ares:main Mar 16, 2024
@bradh352
bradh352 deleted the last_parsers branch March 20, 2024 00:26
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.

1 participant