Skip to content

Null pointer dereference on malloc failure in freenect_init_registration_table() #699

Closed as not planned

Description

@hirorogo

Summary

freenect_init_registration_table() in src/registration.c does not check the return value of malloc() before passing the pointer to memset(). If malloc() fails and returns NULL, memset(NULL, ...) causes a null pointer dereference crash.

Location

src/registration.c, inside freenect_init_registration_table() — the malloc() call for the registration table buffer.

Impact

An application that initializes Freenect registration under memory pressure will crash with a segmentation fault (denial of service).

Fix

PR #698 adds a NULL check after malloc() and returns an error code on failure.

Related

Activity

  1. hirorogo commented on Apr 10, 2026

    @hirorogo
    Author

    Closing — the PR itself (#698) contains the full bug description. No separate issue needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions