Skip to content

RDKB-66632 RDKB-66994 : Fix for xconf issues - #46

Open
Kairamkondabhargavi wants to merge 11 commits into
developfrom
Demo_RDKB_66994_xconf
Open

Kairamkondabhargavi wants to merge 11 commits into
developfrom
Demo_RDKB_66994_xconf

Conversation

@Kairamkondabhargavi

@Kairamkondabhargavi Kairamkondabhargavi commented Oct 28, 2026 •

Copy link
Copy Markdown

RDKB-66994 : xconf issues
Reason for change: Fix High-priority issues in xconf-client component
Test Procedure: manual execution
Risks: Low
Priority: P1

@Kairamkondabhargavi
Kairamkondabhargavi requested review from GoutamD2905 and a balanced review from Copilot October 28, 2026 14:03
@Kairamkondabhargavi
Kairamkondabhargavi requested review from a team as code owners October 28, 2026 14:03
@Kairamkondabhargavi Kairamkondabhargavi changed the title Fix for RDKB-66994 xconf issues RDKB-66994 : Fix for xconf issues Oct 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Predictable signing files expose privileged writes to symlink attacks, while validation failures leave stale markers that block future updates, alongside request-value and URL-validation regressions.

7 open issues
What changed in this PR

This PR addresses RDKB-66994 by hardening XConf firmware-update requests and scheduling scripts.

Changes:

  • Replaces several eval calls with direct command invocations.
  • Adds URL, filename, and cron-pattern validation and filters partner/account identifiers.
  • Moves Codebig signing output to PID-based temporary files with a restrictive permission mask.
File Description
scripts/​xb3_firmwareDwnld.sh Adds firmware-input validation and safer curl/signing invocations.
scripts/​xb3_codebig_firmwareDwnld.sh Updates request execution, input validation, and signing-file handling.
scripts/​firmwareSched.sh Validates cron patterns extracted from configuration responses.
scripts/​cbr_firmwareDwnld.sh Adds endpoint/download validation and safer recovery and Codebig requests.

Review effort: Balanced

Comment thread scripts/cbr_firmwareDwnld.sh Resolved
Comment thread scripts/xb3_codebig_firmwareDwnld.sh Resolved
Comment thread scripts/xb3_firmwareDwnld.sh Resolved
Comment thread scripts/cbr_firmwareDwnld.sh Resolved
Comment thread scripts/xb3_codebig_firmwareDwnld.sh Resolved
Comment thread scripts/xb3_codebig_firmwareDwnld.sh Resolved
Comment thread scripts/xb3_firmwareDwnld.sh Resolved
Copilot AI balanced review requested due to automatic review settings October 29, 2026 19:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Critical validation bypasses and faulty download-marker handling can allow forbidden input and concurrent downloads, while stale markers can block subsequent firmware updates.

8 open issues
1 previously missed issue

In code that hasn't changed since last review

Medium severity Codebig validation failures leave a stale download marker

scripts/​xb3_firmwareDwnld.sh:1255

The Codebig validation exits also leave /tmp/.downloadingfw behind: it was already created above, and this script has no EXIT cleanup. A rejected filename or signed server URL therefore blocks every later firmware check until something externally clears the marker. Release the owned marker on both failure paths.

6 resolved since last review

Review effort: Balanced

Comment thread scripts/cbr_firmwareDwnld.sh Resolved
Comment thread scripts/cbr_firmwareDwnld.sh Resolved
Comment thread scripts/cbr_firmwareDwnld.sh Resolved
Comment thread scripts/xb3_codebig_firmwareDwnld.sh Resolved
Comment thread scripts/xb3_codebig_firmwareDwnld.sh Resolved
Comment thread scripts/xb3_codebig_firmwareDwnld.sh Resolved
Comment thread scripts/xb3_firmwareDwnld.sh Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 07:39
Kairamkondabhargavi and others added 2 commits October 30, 2026 13:09
Refactor firmware validation functions to use case statements for input validation.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Refactor firmware filename validation to use case statement.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Cleanup can delete another downloader's lock, and signal handlers allow downloads to continue after termination requests, creating a risk of concurrent firmware downloads.

5 open issues
1 previously missed issue

In code that hasn't changed since last review

Medium severity Release lock when Codebig validation fails

scripts/​xb3_firmwareDwnld.sh:1254

The Codebig validation failures also exit after /tmp/.downloadingfw has been created, without removing it. Since this script has no EXIT cleanup handler, a rejected filename or signed server URL leaves a stale lock that makes every later invocation skip the update. Release the lock on both failure paths, or move these checks before lock acquisition.

3 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 30, 2026 07:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Critical cleanup-trap defects can delete another downloader’s lock or let signalled firmware operations continue without a lock, enabling concurrent firmware downloads.

5 open issues

Review effort: Balanced

Comment thread scripts/xb3_firmwareDwnld.sh Resolved
Copilot AI balanced review requested due to automatic review settings October 30, 2026 08:08
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Critical validation error paths leave the download-in-progress marker behind, blocking subsequent firmware upgrades until reboot or manual cleanup.

2 open issues
5 resolved since last review

Review effort: Balanced

Comment thread scripts/cbr_firmwareDwnld.sh Resolved
Comment thread scripts/xb3_firmwareDwnld.sh Resolved
Copilot AI balanced review requested due to automatic review settings October 30, 2026 08:14
Added error handling for invalid firmware filename and server URL.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Critical validation-failure paths in both firmware download scripts leave /tmp/.downloadingfw behind, blocking subsequent firmware downloads and recovery attempts despite no download having started.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 30, 2026 08:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Critical validation failure paths in the State Red SSR and direct-CDN branches leave the download-in-progress marker behind, blocking subsequent firmware recovery attempts even after the response is corrected.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 30, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The EXIT trap can delete another invocation’s download lock, allowing concurrent firmware downloads; cleanup must only remove a lock owned by the current invocation.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@Suganya-Sugumar Suganya-Sugumar changed the title RDKB-66994 : Fix for xconf issues RDKB-66632 RDKB-66994 : Fix for xconf issues Oct 30, 2026
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