Skip to content

RDKB-65853: Fixing Vulnerability issue#1259

Open
sshah500 wants to merge 4 commits into
rdkcentral:developfrom
myanaki:test_coverity
Open

RDKB-65853: Fixing Vulnerability issue#1259
sshah500 wants to merge 4 commits into
rdkcentral:developfrom
myanaki:test_coverity

Conversation

@sshah500

Copy link
Copy Markdown

RDKB-65853: Fixing Vulnerability issue

Reason for change: Fixing Vulnerability issues.
Test Procedure: Build should be successful and the regression test should also succeed
Risks: Low
Priority: P1
Signed-off-by: sachinkumar_shah@comcast.com

Copilot AI review requested due to automatic review settings July 13, 2026 09:06
@sshah500
sshah500 requested a review from a team as a code owner July 13, 2026 09:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets vulnerability-related reliability issues by tightening memory management in OVSDB-to-RDK translation paths and RBUS handler encoding paths.

Changes:

  • Added cleanup paths in multiple OVSDB translation functions to free partially built hash-maps/entries on failure.
  • Updated apply_ignite_config() to allocate webconfig_subdoc_data_t on the heap and free it appropriately.
  • Fixed a success-path leak in set_force_vap_apply() by freeing encoded webconfig data before freeing the container.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
source/webconfig/wifi_ovsdb_translator.c Adds error cleanup to avoid leaking partially constructed decoded maps during OVSDB translation.
source/core/wifi_ctrl_rbus_handlers.c Adjusts webconfig subdoc allocation/freeing and plugs a success-path encoded-data leak.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +4667 to +4670
stats_config_t *stat_config_entry;
stats_config_t temp_stat_config_entry;
unsigned int i = 0;
webconfig_error_t rc = webconfig_error_none;
Comment thread source/webconfig/wifi_ovsdb_translator.c
Comment thread source/webconfig/wifi_ovsdb_translator.c
Comment thread source/webconfig/wifi_ovsdb_translator.c
Comment thread source/core/wifi_ctrl_rbus_handlers.c
Copilot AI review requested due to automatic review settings July 13, 2026 13:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

@@ -4667,6 +4667,7 @@ webconfig_error_t translate_config_from_ovsdb_for_stats_config(webconfig_subdoc
stats_config_t *stat_config_entry;
Comment thread source/webconfig/wifi_ovsdb_translator.c
@@ -5120,6 +5159,7 @@ webconfig_error_t translate_config_from_ovsdb_for_steering_clients(webconfig_su
band_steering_clients_t *steering_client_entry;
@@ -5203,6 +5262,7 @@ webconfig_error_t translate_config_from_ovsdb_for_vif_neighbors(webconfig_subdo
vif_neighbors_t *vif_neighbor_entry;
Copilot AI review requested due to automatic review settings July 13, 2026 13:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@@ -5203,6 +5262,7 @@ webconfig_error_t translate_config_from_ovsdb_for_vif_neighbors(webconfig_subdo
vif_neighbors_t *vif_neighbor_entry;
Copilot AI review requested due to automatic review settings July 13, 2026 13:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

@@ -5203,6 +5262,7 @@
vif_neighbors_t *vif_neighbor_entry;
Comment on lines 4713 to +4716
memset(stat_config_entry, 0, sizeof(stats_config_t));
memcpy(stat_config_entry, &temp_stat_config_entry, sizeof(stats_config_t));
hash_map_put(data->u.decoded.stats_config_map, strdup(temp_stat_config_entry.stats_cfg_id), stat_config_entry);
stat_config_entry = NULL;
Comment on lines 4852 to +4855
memset(steer_config_entry, 0, sizeof(steering_config_t));
memcpy(steer_config_entry, &temp_steer_config, sizeof(steering_config_t));
hash_map_put(data->u.decoded.steering_config_map, strdup(temp_steer_config.steering_cfg_id), steer_config_entry);
steer_config_entry = NULL;
Comment on lines 5204 to +5207
memset(steering_client_entry, 0, sizeof(band_steering_clients_t));
memcpy(steering_client_entry, &temp_steering_client, sizeof(band_steering_clients_t));
hash_map_put(data->u.decoded.steering_client_map, strdup(temp_steering_client.steering_client_id), steering_client_entry);
steering_client_entry = NULL;
Comment thread source/webconfig/wifi_ovsdb_translator.c
Copilot AI review requested due to automatic review settings July 13, 2026 13:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Comment on lines 4713 to +4716
memset(stat_config_entry, 0, sizeof(stats_config_t));
memcpy(stat_config_entry, &temp_stat_config_entry, sizeof(stats_config_t));
hash_map_put(data->u.decoded.stats_config_map, strdup(temp_stat_config_entry.stats_cfg_id), stat_config_entry);
stat_config_entry = NULL;
Comment on lines 4852 to +4855
memset(steer_config_entry, 0, sizeof(steering_config_t));
memcpy(steer_config_entry, &temp_steer_config, sizeof(steering_config_t));
hash_map_put(data->u.decoded.steering_config_map, strdup(temp_steer_config.steering_cfg_id), steer_config_entry);
steer_config_entry = NULL;
Comment on lines 5204 to +5207
memset(steering_client_entry, 0, sizeof(band_steering_clients_t));
memcpy(steering_client_entry, &temp_steering_client, sizeof(band_steering_clients_t));
hash_map_put(data->u.decoded.steering_client_map, strdup(temp_steering_client.steering_client_id), steering_client_entry);
steering_client_entry = NULL;
Comment on lines 5309 to +5312
memset(vif_neighbor_entry, 0, sizeof(vif_neighbors_t));
memcpy(vif_neighbor_entry, &temp_vif_neighbor, sizeof(vif_neighbors_t));
hash_map_put(data->u.decoded.vif_neighbors_map, strdup(temp_vif_neighbor.neighbor_id), vif_neighbor_entry);
vif_neighbor_entry = NULL;
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