[pull] master from linux-nvme:master#243
Merged
Merged
Conversation
The dev_mng_log pointer allocated by sndk_get_dev_mgment_data() was never freed before the function returns. Add free(dev_mng_log) at the out label to properly release the allocated memory in both success and error paths. Signed-off-by: LaraibJaved <LaraibJaved@ibm.com>
Fixes shell and path-related command injection vulnerabilities in the micron plugin: - Replaces system() calls that rely on user-supplied or drive-supplied strings with spawning a new process with a fixed argv array. - Trims and sanitizes the drive-provided serial number string before using it in path strings. - Checks the user-provided zip/tar package path for unsafe or unsupported characters before using it. Signed-off-by: Broc Going <bgoing@micron.com>
No functional changes. Changes pointer casts and format strings to support type size differences accross platforms. - Uses %"PRIu64" for platform-agnostic 64-bit value handling. - Uses %zu for platform-agnostic size_t handling - Uses uintptr_t for pointer casts Renames internal stricmp to sldgm_stricmp to avoid conflicts with native stricmp implementations on some platforms. Signed-off-by: Broc Going <bgoing@micron.com>
Add a brief mention in README.md and a dedicated section in CONTRIBUTING.md describing the optional nvme-cli-ai companion repository, which provides shared AI workflow resources for contributors who use AI coding assistants. Signed-off-by: Martin Belanger <martin.belanger@dell.com>
…ta() wdc_get_dev_mng_log_entry() may be able to find valid log entries but fail to find desired log page id leaving @sph to NULL. Continuing to use @sph in this case may result in a NULL pointer dereference. Validate both the return value from wdc_get_dev_mng_log_entry() and the @sph pointer before dereferencing it. Split the error handling into separate paths so callers receive an appropriate return code and a meaningful diagnostic depending on the failure. This issue was reported by the clang static analyzer. Signed-off-by: Sarah Ahmed <sarah.ahmed@ibm.com>
Increase the buf length and read only the length minus one. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
This is to reduce the duplicated functions. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Fixes buffer overflow vulnerabilities due to sprintf, read, and readlink handling. Signed-off-by: Broc Going <bgoing@micron.com>
Fixes NULL pointer dereference vulnerabilities: - Checks strdup return values. - Ensures that GetCommonLogPage returns an error when allocation fails. - Handles log page reads that return less data than expected. Signed-off-by: Broc Going <bgoing@micron.com>
Makes temporary data directories write-protected. Signed-off-by: Broc Going <bgoing@micron.com>
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )