Keberos 5 tickets being decoded when using the RXRPC keys incorrectly assumes the size of a field. This could lead to the size-remaining variable wrapping and the data pointer going over the end of the buffer. This could possibly lead to memory corruption and possible privilege escalation.
When a kerberos 5 ticket is being decoded so that it can be loaded into an rxrpc-type key, the length of a variable-length field is checked to make sure that it's not going to overrun the allocated buffer space.
The data is padded to the nearest four-byte boundary and the code doesn't check for this extra four-byte aligned padding. This can lead to the size-remaining variable wrapping and the data pointer accessing or reading past the end of the buffer. The read functionality could allow for a 3 byte infoleak and the write flaw could allow for an uncontrolled 3 byte write to kernels slab memory. This could lead to memory corruption and possible privilege escalation although no known exploit exists at the time of writing.
Discussion an a CVE-ID assignment:
Name: Shi Lei (Qihoo 360 Gear Team)
This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5,6 and 7 as the module is not enabled on these systems.
This issue affects the Linux kernel packages as shipped with Red Hat Enterprise MRG-2. Future Linux kernel updates for the respective releases may address this issue.
Created kernel tracking bugs for this issue:
Affects: fedora-all [bug 1464888]
As far as I can see in the kernel sources for the version 3.10.0-514.26.1 in RHEL 7, the affected code (from net/rxrpc/ar-key.c) is only built when CONFIG_AF_RXRPC is set. However, that kernel and at least some earlier ones have "# CONFIG_AF_RXRPC is not set" in their config files.
So RHEL 7 is actually not affected by this issue, right? Or, perhaps, I am missing something.
You're 100% right, I had originally grepped the config for CONFIG_RX_RPC not CONFIG_AF_RX_RPC. Kernel-rt/MRG-2 still seems to use this as a module it remains affected.
Closing trackers for 6 and 7 adjusting statement.
This was fixed for Fedora with 4.11.8 stable updates
This issue has been addressed in the following products:
Red Hat Enterprise MRG 2
Via RHSA-2019:0641 https://access.redhat.com/errata/RHSA-2019:0641