Handle multiple identical near simultaneous DNS queries better. 57/252557/1 tizen_5.5
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 28 Jan 2021 02:07:50 +0000 (11:07 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Fri, 29 Jan 2021 07:48:49 +0000 (16:48 +0900)
commit284f6948c25fe22b1e7cae7b00a6949114fecd73
tree72e195203f93f8ca01fe4e7e89ad313d5574a21b
parent01e4051d3cc3dc8fc9d58ee5a3c308467b9f3d73
Handle multiple identical near simultaneous DNS queries better.

Previously, such queries would all be forwarded
independently. This is, in theory, inefficent but in practise
not a problem, _except_ that is means that an answer for any
of the forwarded queries will be accepted and cached.
An attacker can send a query multiple times, and for each repeat,
another {port, ID} becomes capable of accepting the answer he is
sending in the blind, to random IDs and ports. The chance of a
succesful attack is therefore multiplied by the number of repeats
of the query. The new behaviour detects repeated queries and
merely stores the clients sending repeats so that when the
first query completes, the answer can be sent to all the
clients who asked. Refer: CERT VU#434904.

Backported for CVE-2020-25686

Change-Id: I2b4dfd8ff28b72ad67da4eacf2a8baa98d7eb5d9
CHANGELOG
src/dnsmasq.h
src/forward.c