]> git.ipfire.org Git - thirdparty/chrony.git/commit
Fix buffer overflow when processing crafted command packets
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 31 Jul 2013 13:01:15 +0000 (15:01 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 7 Aug 2013 11:39:02 +0000 (13:39 +0200)
commit7712455d9aa33d0db0945effaa07e900b85987b1
tree899e49340cf79590653cb1be192c3fd616b02b7a
parenta9a5f98406c77dbfd4faa1c209b29992940b056f
Fix buffer overflow when processing crafted command packets

When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES
command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES,
RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is
calculated, the number of items stored in the packet is not validated.

A crafted command request/reply can be used to crash the server/client.
Only clients allowed by cmdallow (by default only localhost) can crash
the server.

With chrony versions 1.25 and 1.26 this bug has a smaller security
impact as the server requires the clients to be authenticated in order
to process the subnet and client accesses commands. In 1.27 and 1.28,
however, the invalid calculated length is included also in the
authentication check which may cause another crash.
client.c
cmdmon.c
pktlength.c