Skip to content

fabrics: avoid segfault at sanitize_discovery_log_entry()#3376

Open
martin-gpy wants to merge 1 commit into
linux-nvme:masterfrom
martin-gpy:segfault_sanitize_discovery
Open

fabrics: avoid segfault at sanitize_discovery_log_entry()#3376
martin-gpy wants to merge 1 commit into
linux-nvme:masterfrom
martin-gpy:segfault_sanitize_discovery

Conversation

@martin-gpy
Copy link
Copy Markdown
Contributor

Avoid a potential segfault at sanitize_discovery_log_entry() while dereferencing the nvmf_disc_log_entry pointer.

Avoid a potential segfault at sanitize_discovery_log_entry()
while dereferencing the nvmf_disc_log_entry pointer.

Signed-off-by: Martin George <marting@netapp.com>
struct nvmf_disc_log_entry *e)
{
if (!e)
return;
Copy link
Copy Markdown
Collaborator

@igaw igaw May 28, 2026

Choose a reason for hiding this comment

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

Did you observe a crash? I don't see how this is potential possible. All call side pass in &log->entries[i]. So this will be always a pointer value which is != NULL.

I don't mind starting to sanity check the log page input (all input is evil) but this seems at the wrong place.

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