aws / aws/aws-encryption-sdk-c

Update aws_byte_buf_is_bounded to include a null check

Open
#642 1 comment 0 reactions 0 assignees View on GitHub
cbmc
Dominant language
C
Stars
63
Forks
59
PR merge metrics
No merged PRs in 30d

Description

This would avoid having the following code in proofs:
```
__CPROVER_assume(buf1 != NULL);
__CPROVER_assume(aws_byte_buf_is_bounded(buf1, MAX_BUFFER_SIZE));
ensure_byte_buf_has_allocated_buffer_member(buf1);
__CPROVER_assume(aws_byte_buf_is_valid(buf1));
```
by removing the first line (which should be done in `aws_byte_buf_is_bounded` in any case)

Contributor guide

Open the contributing guide

Research direction

Locate aws_byte_buf_is_bounded and the proof snippet in the issue, then inspect the function's current precondition handling and its callers. Done means the function accounts for a null buffer so the explicit __CPROVER_assume(buf1 != NULL) is no longer needed, with existing tests or proofs still passing.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.