Re: [PATCH v2] habanalabs: fix information leak in sec_attest_info()

2023-12-19 Thread Oded Gabbay
On Fri, Dec 08, 2023 at 09:00:59PM +0800, Xingyuan Mo wrote: > This function may copy the pad0 field of struct hl_info_sec_attest to user > mode which has not been initialized, resulting in leakage of kernel heap > data to user mode. To prevent this, use kzalloc() to allocate and zero out > the

[PATCH v2] habanalabs: fix information leak in sec_attest_info()

2023-12-08 Thread Xingyuan Mo
This function may copy the pad0 field of struct hl_info_sec_attest to user mode which has not been initialized, resulting in leakage of kernel heap data to user mode. To prevent this, use kzalloc() to allocate and zero out the buffer, which can also eliminate other uninitilized holes, if any.