-
Notifications
You must be signed in to change notification settings - Fork 6
RDKEMW-13945: Fix L2 Issue on RFC Component #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,10 +66,34 @@ jobs: | |
| run: | | ||
| docker run -d --name native-platform --link mockxconf -v ${{ github.workspace }}:/mnt/L2_CONTAINER_SHARED_VOLUME ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest | ||
|
|
||
|
|
||
| - name: Build RFC and Run L2 inside Native Platform Container | ||
| run: | | ||
| docker exec -i native-platform /bin/bash -c "cd /mnt/L2_CONTAINER_SHARED_VOLUME/ && sh ./cov_build.sh && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/lib/aarch64-linux-gnu:/usr/local/lib && sh run_l2.sh" | ||
|
|
||
| - name: Enable core dump | ||
| run: ulimit -c unlimited | ||
|
|
||
| - name: Debug parodus binary | ||
| run: | | ||
| pwd | ||
| ls -l /usr/local/bin | ||
| file /usr/local/bin/parodus | ||
| ldd /usr/local/bin/parodus || true | ||
|
|
||
| - name: Run test | ||
| run: | | ||
| cd /usr/local/bin | ||
| ./parodus '{"command":"SET","parameters":[{"name":"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload","dataType":0,"value":"TESTIMAGE_DEV.bin"}]}' | ||
|
|
||
|
Comment on lines
+74
to
+88
|
||
| - name: Print stacktrace | ||
| if: failure() | ||
| run: | | ||
| core=$(ls core* 2>/dev/null | head -n1) | ||
| if [ -n "$core" ]; then | ||
| gdb -batch -ex "bt full" /tmp/parodus $core | ||
| fi | ||
|
Comment on lines
+89
to
+95
|
||
|
|
||
| - name: Copy unknown-accountid-xconf-rfc-response json to mockxconf service | ||
| run: | | ||
| docker cp ${{ github.workspace }}/test/test-artifacts/mockxconf/xconf-rfc-response-unknown-accountid.json mockxconf:/etc/xconf/xconf-rfc-response.json | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,46 +25,9 @@ cp ./rfc.properties /opt/rfc.properties | |||||||||||
| cp /opt/certs/client.pem /etc/ssl/certs/client.pem | ||||||||||||
| cp ./rfcMgr/gtest/mocks/tr181store.ini /opt/secure/RFC/tr181store.ini | ||||||||||||
|
|
||||||||||||
| rbuscli set Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.ConfigSetTime uint32 1763118860 | ||||||||||||
| ls -l /usr/local/bin/parodus | ||||||||||||
|
||||||||||||
| ls -l /usr/local/bin/parodus | |
| if [ ! -x /usr/local/bin/parodus ]; then | |
| echo "Error: /usr/local/bin/parodus not found or not executable." >&2 | |
| exit 1 | |
| fi |
Copilot
AI
Mar 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying the parodus binary directly to /tmp/parodus introduces a classic symlink attack risk if this script runs with elevated privileges. An unprivileged user can create /tmp/parodus as a symlink to a sensitive root-owned file, causing cp to overwrite that target when the script runs, leading to privilege escalation or corruption of critical system files. Use a secure temporary path (e.g., via mktemp) and ensure the destination is not a pre-existing symlink in a world-writable directory.
| cp /usr/local/bin/parodus /tmp/parodus | |
| PARODUS_TMP="$(mktemp /tmp/parodus.XXXXXX)" | |
| cp /usr/local/bin/parodus "$PARODUS_TMP" | |
| echo "parodus binary copied to temporary path: $PARODUS_TMP" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,8 +21,8 @@ | |
|
|
||
| def test_WebPA_Set_ACC_Id(): | ||
| print("Starting parodus mock process") | ||
| payload = '{"command":"SET","parameters":[{"name":"Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AccountInfo.AccountID","dataType":0,"value":"412370664406228514"}]}' | ||
| command = ["/usr/local/bin/parodus", payload] | ||
| payload = '{"command":"SET","parameters":[{"name":"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload","dataType":0,"value":"TESTIMAGE_DEV.bin"}]}' | ||
| command = ["/tmp/parodus", payload] | ||
|
Comment on lines
22
to
+25
|
||
|
|
||
|
Comment on lines
+24
to
26
|
||
| result = subprocess.run(command, capture_output=True, text=True) | ||
| assert result.returncode == 0, f"Command failed with error: {result.stderr}" | ||
|
|
@@ -36,7 +36,7 @@ def test_WebPA_Set_ACC_Id(): | |
| def test_WebPA_Get_ACC_Id(): | ||
| print("Starting parodus mock process") | ||
| payload ='{"command":"GET","names":["Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AccountInfo.AccountID"]}' | ||
| command = ["/usr/local/bin/parodus", payload] | ||
| command = ["/tmp/parodus", payload] | ||
|
|
||
|
Comment on lines
36
to
40
|
||
| result = subprocess.run(command, capture_output=True, text=True) | ||
| assert result.returncode == 0, f"Command failed with error: {result.stderr}" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ulimit -c unlimitedis executed on the GitHub runner, but the RFC build/tests run inside thenative-platformcontainer. This ulimit won’t affect processes inside the container, so it won’t enable core dumps where you need them. Set the ulimit ondocker run(e.g.,--ulimit core=-1) or runulimitviadocker execin the same container/session that launchesparodus.