Home
last modified time | relevance | path

Searched hist:d2c717b23e63e07a3c05dbbdd6af62117480920d (Results 1 – 2 of 2) sorted by relevance

/optee_os/core/include/
H A Dconsole.hd2c717b23e63e07a3c05dbbdd6af62117480920d Tue Jul 02 16:16:54 UTC 2019 Jerome Forissier <jerome.forissier@linaro.org> core: console: fix use after free when CFG_DT=y

Commit 770b2afacf33 ("core: more flexible console init from DT") has
split configure_console_from_dt() in two parts, the first one being
moved to a new function: get_console_node_from_dt(). Unfortunately,
this function may return pointers to a freed buffer.

Fix the problem by allocating each output string on the heap and letting
the caller clean on return.

Fixes: 770b2afacf33 ("core: more flexible console init from DT")
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Rouven Czerwinski <r.czerwinksi@pengutronix.de>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
/optee_os/core/kernel/
H A Dconsole.cd2c717b23e63e07a3c05dbbdd6af62117480920d Tue Jul 02 16:16:54 UTC 2019 Jerome Forissier <jerome.forissier@linaro.org> core: console: fix use after free when CFG_DT=y

Commit 770b2afacf33 ("core: more flexible console init from DT") has
split configure_console_from_dt() in two parts, the first one being
moved to a new function: get_console_node_from_dt(). Unfortunately,
this function may return pointers to a freed buffer.

Fix the problem by allocating each output string on the heap and letting
the caller clean on return.

Fixes: 770b2afacf33 ("core: more flexible console init from DT")
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Rouven Czerwinski <r.czerwinksi@pengutronix.de>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>