Skip to content

fix: the memcpy and memmove calls at lines 829-837 i... in main.c#20996

Open
orbisai0security wants to merge 1 commit into
darktable-org:masterfrom
orbisai0security:fix-v001-heap-buffer-overflow-extra-patches
Open

fix: the memcpy and memmove calls at lines 829-837 i... in main.c#20996
orbisai0security wants to merge 1 commit into
darktable-org:masterfrom
orbisai0security:fix-v001-heap-buffer-overflow-extra-patches

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in src/chart/main.c.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File src/chart/main.c:829
CWE CWE-120

Description: The memcpy and memmove calls at lines 829-837 in src/chart/main.c do not validate that n_extra_patches or *N fit within the allocated destination buffers (target_L, target_a, target_b, colorchecker_Lab). An attacker who supplies a crafted color chart or calibration file encoding a large n_extra_patches value can cause a heap buffer overflow, overwriting heap metadata or adjacent allocations.

Changes

  • src/chart/main.c

Verification

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

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI
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