nasa / nasa/CS

Address sanitizer flagged stack buffer overflows in cs_compute_tests.c

Open Beginner friendly
#117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
36
Forks
41
Avg merge
11d 19h
Merged PRs (30d)
2

Description

In draco, when I enabled the address sanitizer, it flagged a stack buffer overflow in CS_RecomputeAppChildTask_Test_CouldNotGetAddress() (https://github.com/nasa/CS/blob/draco-rc5/unit-test/cs_compute_tests.c#L1456) because the test goes past the boundary of DefAppTbl (https://github.com/nasa/CS/blob/draco-rc5/unit-test/cs_compute_tests.c#L1459).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in unit-test/cs_compute_tests.c at CS_RecomputeAppChildTask_Test_CouldNotGetAddress(), especially around lines 1456 and 1459, and inspect how DefAppTbl is accessed. Run the relevant compute tests with address sanitizer; done means the test no longer accesses beyond DefAppTbl and passes without a stack-buffer-overflow report.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
60/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.