Kernel module for advanced rickrolling replaces open() call
p = (char *)(path + strlen(path) - 4);This is a very bad idea as path is user-supplied and has to be treated as malicious.
An attacker can omit the string-terminator...