Ubuntu Developers
The reason cited is the presence in the dmesg output of information that can be used by attackers to simplify the creation of exploits for privilege escalation. For example, dmesg displays a stack dump in case of failures, and it is possible to determine the addresses of structures in the kernel that can help bypass the KASLR mechanism. An attacker can use dmesg as feedback, gradually bringing the exploit to its proper form, watching the oops messages in the log after unsuccessful attack attempts.
Source: opennet.ru