]> git.ipfire.org Git - thirdparty/chrony.git/commit
cmdmon: fix initialization of allocated reply slots
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 30 Mar 2015 13:13:27 +0000 (15:13 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 7 Apr 2015 14:35:16 +0000 (16:35 +0200)
commit79eacdb7e694c7e6681b68006425df3faca51aec
treeacecb471293a6d06fddad46012280d25767ee2dd
parentcf19042ecb656b8afec0cc4906e7dd3ea9266ac8
cmdmon: fix initialization of allocated reply slots

When allocating memory to save unacknowledged replies to authenticated
command requests, the last "next" pointer was not initialized to NULL.
When all allocated reply slots were used, the next reply could be
written to an invalid memory instead of allocating a new slot for it.

An attacker that has the command key and is allowed to access cmdmon
(only localhost is allowed by default) could exploit this to crash
chronyd or possibly execute arbitrary code with the privileges of the
chronyd process.
cmdmon.c