Skip to content

Random Kernel Reboots #10

@fatalcoder524

Description

@fatalcoder524

strncpy(midas_mmap_buf.entrys[i].tgid_name, task->comm, TASK_COMM_LEN);

Please add a null check to task before strncpy!

Also if possible change strncpy to a safer function with respect to broader change in linux kernel.

Working code with no issues in sm8550:
https://github.com/OnePlusOSS/android_kernel_modules_and_devicetree_oneplus_sm8550/blob/7361170583ffa7cc9570c1678ae38ee37f4023cd/vendor/oplus/kernel/cpu/midas/v1_gki/midas_ioctl.c#L129

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