Skip to content

Fix: Use after free #542

Closed
Closed

Description

@Youw

Found as part of: #63

if (res < 0) {
    	4. freed_arg: hid_close frees dev. [[show details](https://scan5.scan.coverity.com/eventId=53211934-4&modelId=53211934-0&fileInstanceId=239595692&filePath=%2Flinux%2Fhid.c&fileStart=1150&fileEnd=1163)]
1009                        hid_close(dev);
    	
CID 1529209 (#1 of 1): Use after free (USE_AFTER_FREE)
5. deref_arg: Calling register_device_error_format dereferences freed pointer dev. [[show details](https://scan5.scan.coverity.com/eventId=53211934-8&modelId=53211934-1&fileInstanceId=239595692&filePath=%2Flinux%2Fhid.c&fileStart=175&fileEnd=181)]
1010                        register_device_error_format(dev, "ioctl(GRDESCSIZE) error for '%s', not a HIDRAW device?: %s", path, strerror(errno));
1011                        return NULL;
1012                }

Activity

  1. added
    bug
    hidraw
    on May 10, 2023
  2. added a commit that references this issue on May 21, 2023
    4165d49
  3. added a commit that references this issue on May 22, 2023
    ca8373a
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

    bughidraw

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions