]> git.baikalelectronics.ru Git - kernel.git/commit
of/irq: Fix potential buffer overflow
authorGrant Likely <grant.likely@linaro.org>
Sat, 2 Nov 2013 07:11:02 +0000 (00:11 -0700)
committerGrant Likely <grant.likely@linaro.org>
Sun, 3 Nov 2013 23:16:43 +0000 (23:16 +0000)
commitb9be3daa8bef0d366a43ff620b3758e9502113c0
tree21263268a1e0a9e07680c027f406d42e4d85e268
parent1b543fb84ff4b68cdf1d63c40c9430f9d1c12972
of/irq: Fix potential buffer overflow

Commit 2a3406cbf73e, "of/irq: Refactor interrupt-map parsing" introduced
a potential buffer overflow bug because it doesn't do sufficient range
checking on the input data. This patch adds the appropriate checking and
buffer size adjustments. If the bounds are out of range then warn
loudly. MAX_PHANDLE_ARGS should be sufficient. If it is not then the
value can be increased.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
drivers/of/irq.c