jvinet / knock

A port-knocking daemon
http://www.zeroflux.org/projects/knock
GNU General Public License v2.0
549 stars 113 forks source link

Possible NULL-pointer dereference #56

Closed milabs closed 6 years ago

milabs commented 6 years ago

https://github.com/jvinet/knock/blob/master/src/knockd.c#L1631

    /* create a new entry */
    attempt = (knocker_t*)malloc(sizeof(knocker_t));
    attempt->srchost = NULL; // <<-- NULL-ptr deref if malloc fails
    if(attempt == NULL) {
        perror("malloc");
        exit(1);
    }
TDFKAOlli commented 6 years ago

Already addressed by pull request #52

milabs commented 6 years ago

Ah, ok... didn't see it