Skip to content

Fix the null reference vulnerability. #273

@QiuYitai

Description

@QiuYitai

Hello,
Our team has recently been conducting research on a null-pointer-dereference (NPD) vulnerability detection tool and used it to scan xl2tpd(the version on the master branch). After a manual review, we have identified some potentially vulnerable code snippets that may lead to null-pointer-dereference bugs.
The NULL Dereference vulnerability happens in int control_finish(), control.c
How the NULL Pointer Dereference happens:

  1. When c->lac == NULL
  2. NULL dereference of variable c->lac happens at if (c->lac->pass_peer)
int control_finish (struct tunnel *t, struct call *c)
{
    ......
=>  if (c->lac)
    {
        ......
    }
    ......
=>  if (c->lac->pass_peer)
    {
        ......
    }
    ......
 }

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