]> xenbits.xensource.com Git - qemu-upstream-4.5-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:43:16 +0000 (16:43 +0000)
commitf662c5972a54f2f4b218d9ace5c3b10ae9a15b7e
tree6a46d99e3647764fb135818ff88c4d5b70ce4f36
parent32bba3499008c847e08858f310d65806e0bade36
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