Skip to content

fix: add buffer-length check in cn10k_ml_model.c#1066

Open
orbisai0security wants to merge 1 commit into
F-Stack:devfrom
orbisai0security:fix-cn10k-ml-model-buffer-bounds-check
Open

fix: add buffer-length check in cn10k_ml_model.c#1066
orbisai0security wants to merge 1 commit into
F-Stack:devfrom
orbisai0security:fix-cn10k-ml-model-buffer-bounds-check

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in dpdk/drivers/ml/cnxk/cn10k_ml_model.c.

Vulnerability

Field Value
ID V-002
Severity CRITICAL
Scanner multi_agent_ai
Rule V-002
File dpdk/drivers/ml/cnxk/cn10k_ml_model.c:333
Assessment Confirmed exploitable
CWE CWE-120

Description: The cn10k ML model loading code uses rte_memcpy with sizes directly from model metadata (metadata->init_model.file_size, metadata->main_model.file_size, metadata->finish_model.file_size, metadata->weights_bias.file_size) without validating that these sizes fit within the allocated DMA buffer. An attacker who can supply a crafted ML model file with manipulated size fields can cause heap buffer overflow in DMA memory, potentially achieving arbitrary code execution in driver context.

Changes

  • dpdk/drivers/ml/cnxk/cn10k_ml_model.c

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
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.

1 participant