Conversation
RDKEMW-10995: Fix to prevent double close issue
Dobby Patch Release 3.16.1
RDKEMW-15175: Prevent buffer overflow when binary data contains protocol delimiter bytes
* Fix Coverity identified issues - dobby * RDKEMW-12282: Fix Coverity identified issues - dobby * Update DobbyManager.cpp * Update DobbyManager.cpp * Update DobbyManager.cpp * Update DobbyManager.cpp * RDKEMW-12282: Fix Coverity identified issues - dobby * RDKEMW-12282: Fix Coverity identified issues - dobby * Update RefCountFile.cpp * RDKEMW-12282: Fix Coverity identified issues - dobby * Update ThreadedDispatcher.cpp * Update Notifier.h * Update DobbyManager.cpp * RDKEMW-12282: Fix Coverity identified issues - dobby * Update ThreadedDispatcher.cpp * RDKEMW-12282: Fix Coverity identified issues - dobby * Update DobbyBundleConfig.cpp * Update DobbyLogger.cpp * Update DobbyTemplate.cpp * Update ThreadedDispatcher.cpp * Update ServiceMonitor.cpp * Update ThreadedDispatcher.cpp * Update DobbyBundleConfig.cpp * Update DobbyProxy.cpp * Update DobbyIpcBus.cpp * Fixed the alignement * Fixed the alignement * Update Main.cpp * Update DobbyLogger.cpp * Update DobbyLogRelay.cpp * RDKEMW-12282: copilot review fix * RDKEMW-12282: copilot review fix * RDKEMW-12282: copilot review fix * RDKEMW-12282: Fix coverity issues * RDKEMW-12282: Fix coverity issues * RDKEMW-12282: Fix copilot comments * RDKEMW-12282: Fix copilot comments * RDKEMW-12282: Fix deadcode coverity issue * RDKEMW-12282: Remove unused variable Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * RDKEMW-12282: Remove unused variable --------- Co-authored-by: dkumar798_comcast <dinesh_kumar2@comcast.com> Co-authored-by: DineshkumarJP <dineshitsoft@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Merge commit bringing develop changes into main, primarily focused on hardening the daemon and plugins via thread-safety, resource-lifetime fixes, and safer filesystem/socket handling, along with a micro version bump.
Changes:
- Added/adjusted locking and atomics to reduce data races and re-entrancy issues across daemon, plugins, and utilities.
- Improved robustness of file/socket operations (TOCTOU avoidance, safer path copying, cleanup on error paths).
- Bumped project version to 3.16.2.
Reviewed changes
Copilot reviewed 51 out of 52 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/source/DobbyUtils.cpp | Adds locking around metadata getters. |
| utils/include/DobbyUtils.h | Makes metadata mutex mutable for const access. |
| settings/source/Settings.cpp | Fixes indentation; frees wordexp results on failure. |
| rdkPlugins/Storage/source/RefCountFile.cpp | Adds overflow/error handling for refcount updates. |
| rdkPlugins/Storage/source/LoopMountDetails.cpp | Prevents double-close by resetting fd after close. |
| rdkPlugins/Storage/source/DynamicMountDetails.cpp | Improves mount destination preparation and cleanup behavior. |
| rdkPlugins/OOMCrash/source/OOMCrashPlugin.cpp | Simplifies crash-file removal; fixes fclose path. |
| rdkPlugins/Networking/source/NetworkSetup.cpp | Simplifies RuleSet access via operator[]. |
| rdkPlugins/Networking/source/NetworkingPlugin.cpp | Initializes plugin data pointer. |
| rdkPlugins/Networking/source/IPAllocator.cpp | Reworks directory existence handling via opendir + mkdir. |
| rdkPlugins/Minidump/source/AnonymousFile.cpp | Treats invalid/empty file sizes consistently; cleanup fixes. |
| rdkPlugins/Logging/source/FileSink.cpp | Initializes file size limit; fixes fd closing logic and fd checks. |
| rdkPlugins/IONMemory/source/IonMemoryPlugin.cpp | Initializes plugin data pointer. |
| rdkPlugins/HttpProxy/source/HttpProxyPlugin.cpp | Initializes plugin data pointer. |
| rdkPlugins/AppServices/source/AppServicesRdkPlugin.cpp | Initializes plugin config pointer. |
| plugins/OpenCDM/source/OpenCDMPlugin.cpp | Makes socket/file creation/mount flow stricter and more atomic. |
| plugins/MulticastSockets/source/MulticastSocketsPlugin.cpp | Adds error handling for socket creation/dup; fixes env fd formatting. |
| plugins/EthanLog/source/EthanLogLoop.cpp | Protects client list clear with mutex. |
| plugins/EthanLog/source/EthanLogClient.cpp | Fixes memmove bug; improves field parsing; guards against negative lengths. |
| plugins/EthanLog/client/cat/ethanlog-cat.cpp | Tightens read bounds checks; uses size_t buffer offset; fixes arg parsing flow. |
| plugins/Common/source/ServiceMonitor.cpp | Avoids calling handlers while holding locks; adjusts timer check flow. |
| pluginLauncher/tool/source/Main.cpp | Fixes option parsing control flow (break). |
| pluginLauncher/lib/source/DobbyRdkPluginUtils.cpp | Initializes exitStatus in constructors. |
| pluginLauncher/lib/source/DobbyRdkPluginManager.cpp | Adds scandir error handling; avoids redundant fd close. |
| pluginLauncher/lib/include/DobbyRdkPluginUtils.h | Locks around annotation snapshot retrieval. |
| ipcUtils/source/DobbyIpcBus.cpp | Tightens destructor locking scope for shutdown event. |
| daemon/process/source/Main.cpp | Wraps daemon main in try/catch; fixes arg parsing flow. |
| daemon/lib/source/include/DobbyWorkQueue.h | Converts counters/flags to atomics. |
| daemon/lib/source/DobbyWorkQueue.cpp | Adds queue lock in same-thread postWork path. |
| daemon/lib/source/DobbyStats.cpp | Fixes PID log formatting/casting. |
| daemon/lib/source/DobbyManager.cpp | Improves shutdown cleanup locking/iteration; refines hibernate thread captures; adds Coverity suppression. |
| daemon/lib/source/DobbyLogRelay.cpp | Adds socket-path length checks; uses bounded copies. |
| daemon/lib/source/DobbyLogger.cpp | Adds socket-path length checks; wraps destructor in try/catch. |
| daemon/lib/source/DobbyContainer.cpp | Initializes restart counter. |
| daemon/lib/source/Dobby.cpp | Improves watchdog work queue error handling; fixes reply-send error logging formatting/indentation. |
| CMakeLists.txt | Version bump to 3.16.2. |
| client/tool/source/Main.cpp | Adds locking around promise fulfillment; replaces stat with opendir flow; fixes option parsing flow. |
| client/lib/source/DobbyProxy.cpp | Tightens destructor locking scope for shutdown event. |
| bundle/tool/source/Main.cpp | Wraps tool main in try/catch; fixes option parsing control flow. |
| bundle/lib/source/DobbyTemplate.cpp | Avoids returning instance pointer after unlocking. |
| bundle/lib/source/DobbySpecConfig.cpp | Initializes rt priority defaults; adds locking around spec version check. |
| bundle/lib/source/DobbyRootfs.cpp | Uses open(O_DIRECTORY) instead of access + open; improves error handling. |
| bundle/lib/source/DobbyConfig.cpp | Adds lock to printCommand; fixes indentation. |
| bundle/lib/source/DobbyBundleConfig.cpp | Adds locking in getters; fixes indentation. |
| bundle/lib/include/DobbyBundleConfig.h | Minor whitespace/indent change. |
| AppInfrastructure/ReadLine/source/ReadLine.cpp | Fixes format string typo in error output. |
| AppInfrastructure/Public/Common/Notifier.h | Removes redundant unlock; adds Coverity suppression around sync. |
| AppInfrastructure/IpcService/source/sdbus/SDBusIpcService.cpp | Fixes indentation; prevents timeout multiplication narrowing. |
| AppInfrastructure/Common/source/Timer.cpp | Wraps destructor cancel in try/catch. |
| AppInfrastructure/Common/source/ThreadedDispatcher.cpp | Restructures locking/unlocking; clarifies stop/sync behavior; adds Coverity suppression. |
| AppInfrastructure/Common/include/IDGenerator.h | Replaces rand() seed with std::random_device seed. |
| AppInfrastructure/Common/include/ConditionVariable.h | Ensures wait_for returns deterministically on error; debug throws. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
madanagopalt
previously approved these changes
Apr 10, 2026
madanagopalt
approved these changes
Apr 10, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Merge develop to main
Type of Change
Requires Bitbake Recipe changes?
meta-rdk-ext/recipes-containers/dobby/dobby.bb) must be modified to support the changes in this PR (beyond updatingSRC_REV)