The bug, dubbed Dirty COW, is being exploited in the wild, with Linux developer Phil Oester spotting the exploit as it was being uploaded to one of his webservers.
It is also present in Android, which uses the Linux kernel, and in many devices like routers that use the kernel.
This flaw could be utilised by an unprivileged local user to gain write access to otherwise read-only memory mappings and thus increase their privileges on the system.
Linux creator Linus Torvalds has admitted that he tried to fix this bug 11 years ago but did not succeed because of other changes in the kernel.
Security firm Immunity has released proof-of-concept code for its customers to test.
Oester told Ars Technica: "For the past few years, I have been capturing all inbound traffic to my webservers for forensic analysis. This practice has proved invaluable on numerous occasions, and I would recommend it to all admins. In this case, I was able to extract the uploaded binary from those captures to analyse its behaviour, and escalate to the appropriate Linux kernel maintainers.
“The vulnerability is easiest exploited with local access to a system such as shell accounts. Less trivially, any web server/application vulnerability which allows the attacker to upload a file to the impacted system and execute it also works."
A community group has set up a site to provide details about the bug.