RDKB-64347: Fixing coverity issues#1106
Open
vanshika-singhal24 wants to merge 2 commits intordkcentral:developfrom
Open
RDKB-64347: Fixing coverity issues#1106vanshika-singhal24 wants to merge 2 commits intordkcentral:developfrom
vanshika-singhal24 wants to merge 2 commits intordkcentral:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses low-priority Coverity findings by adding defensive bounds/overflow checks in packet decoding, file packaging, and QM request parsing.
Changes:
- Add radiotap header length validation before accessing the 802.11 frame in PCAP decoding.
- Add file size and total package size cap/overflow checks while packing files.
- Add request topic/data size bounds checks when reading QM requests from a socket.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
source/sampleapps/webconfig_consumer_apis.c |
Adds bounds checks to prevent out-of-range access when parsing radiotap + 802.11 frames from captured packets. |
source/dml/tr_181/sbapi/pack_file.c |
Adds validation of per-file size and total package size to prevent oversized allocations/overflows during packing. |
lib/qm/qm_conn.c |
Adds bounds checks for topic_len and data_size to keep reads within QM_COMPACT_SEND_SIZE. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ebea188 to
98c1f31
Compare
Reason for change: Fixing Low priority Coverity issues. Test Procedure: Build should be successful and the regression test should also succeed. Risks: Low Priority: P1 Signed-off-by: vanshika_lnu@comcast.com
98c1f31 to
6fb25e3
Compare
navyasher
reviewed
May 7, 2026
| } | ||
|
|
||
| if (buf.st_size < 0 || buf.st_size > PACK_MAX_SIZE_BYTES) { | ||
| fprintf(stderr, "%s: invalid file size %jd\n", __FUNCTION__, (intmax_t)buf.st_size); |
Contributor
There was a problem hiding this comment.
validate PACK_MAX_SIZE_BYTES value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change: Fixing Low priority Coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.
Risks: Low
Priority: P1
Signed-off-by: vanshika_lnu@comcast.com