RDKBACCL-1962 RDKB- Security Vulnerability Findings Report in WebUI - #147
Open
vanemage wants to merge 1 commit into
Open
RDKBACCL-1962 RDKB- Security Vulnerability Findings Report in WebUI#147vanemage wants to merge 1 commit into
vanemage wants to merge 1 commit into
Conversation
|
📋 PR Format Reminder
Expected: |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses security-vulnerability findings in the XB6 WebUI wireless configuration action handler by tightening input validation and deriving the target Wi‑Fi radio from the SSID’s LowerLayers instead of trusting client-provided indices.
Changes:
- Added
ssid_numbervalidation (numeric + must be an existingDevice.WiFi.SSIDinstance) with 400 responses on invalid input. - Added
ResolveRadioFromSsid()to map SSID → Radio viaLowerLayersand used that mapping for radio configuration reads/writes. - Simplified SSID apply logic to apply settings on the resolved radio.
Comments suppressed due to low confidence (2)
source/Styles/xb6/jst/actionHandler/ajaxSet_wireless_network_configuration.jst:140
- In this branch
$iwas already parsed/validated above (including handling missingssid_number). Re-reading$arConfig['ssid_number']here bypasses that guard and can trigger an undefined-index notice if the key is absent. Reuse the previously validated$iand explicitly reject empty values in this branch.
$i = String($arConfig['ssid_number']);
$r = ResolveRadioFromSsid($i);
if ($r == "") {
http_response_code(400);
echo( '{"error":"invalid_ssid_mapping"}');
exit(0);
}
source/Styles/xb6/jst/actionHandler/ajaxSet_wireless_network_configuration.jst:139
- This change makes
$ian SSID instance and$rthe resolved radio, but later logic in this handler still treats$ias the radio selector in multiple places (e.g. wireless-mode validation branches on$i==1/$i==2and extension-channel rules use("2" != $i)while settingDevice.WiFi.Radio.$r.*). This will break configuration for SSIDs whose instance id is not the same as the underlying radio (additional SSIDs, future platforms, etc.). The radio-dependent checks/logging should use$r(or a clearly named$radioId) consistently, while SSID/AP paths continue to use$i.
$r = ResolveRadioFromSsid($i);
if ($r == "") {
http_response_code(400);
echo( '{"error":"invalid_ssid_mapping"}');
exit(0);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+61
to
+68
| function ResolveRadioFromSsid($ssid){ | ||
| $ssid_tmp = String($ssid); | ||
| $ssid_lower_layers = getStr("Device.WiFi.SSID."+$ssid_tmp+".LowerLayers"); | ||
| if (strpos($ssid_lower_layers, "Device.WiFi.Radio.1.") !== false) return 1; | ||
| if (strpos($ssid_lower_layers, "Device.WiFi.Radio.2.") !== false) return 2; | ||
| if (strpos($ssid_lower_layers, "Device.WiFi.Radio.3.") !== false) return 3; | ||
| return ""; | ||
| } |
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.
No description provided.