]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commit
fw_cfg: add check to validate current entry value
authorPrasad J Pandit <pjp@fedoraproject.org>
Wed, 6 Jan 2016 06:16:25 +0000 (11:46 +0530)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 6 Jan 2016 16:42:43 +0000 (16:42 +0000)
commit18f2ce4bfe67f9b38143d9d96207e49c92b6881c
treef1bee856488b8ac6368f77054c150ab5fc12a0ab
parent9e304f572ac98265f5e7433b6490077962acda97
fw_cfg: add check to validate current entry value

When processing firmware configurations, an OOB r/w access occurs
if 's->cur_entry' is set to be invalid(FW_CFG_INVALID=0xffff).
Add a check to validate 's->cur_entry' to avoid such access.

Reported-by: Donghai Zdh <donghai.zdh@alibaba-inc.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/nvram/fw_cfg.c