Skip to content

Fix the issue of null pointer dereference in sb_alloc_per_thread_array - #570

Open
wu-zhao-min wants to merge 1 commit into
akopytov:masterfrom
wu-zhao-min:master
Open

Fix the issue of null pointer dereference in sb_alloc_per_thread_array#570
wu-zhao-min wants to merge 1 commit into
akopytov:masterfrom
wu-zhao-min:master

Conversation

@wu-zhao-min

Copy link
Copy Markdown
  • Question: After sb_memalign() returns NULL, the code directly performs memset(ptr, 0, bsize) on the returned pointer without conducting a NULL check.
  • Impact: Under conditions of memory shortage, it triggers a segmentation fault, resulting in a Denial of Service (DoS).
  • Fix: Add a NULL check before the memset operation.

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