You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I found that the function mesalink_BIO_new_mem_buf might incorrectly assume buf_ptr points to any type that has non-zero length (all the example cases also show the assumption); however, it ignores the case that buf_ptr could also point to struct type.
let buf = unsafe{ slice::from_raw_parts_mut(buf_ptr, buflen)};
Even in C, the struct could also contain padding bytes, which means the slice created at line 733 might point to uninitialized padding bytes. We consider that the function could add pre-condition check to make sure buf_ptr is kind of plain old data.
The text was updated successfully, but these errors were encountered:
Hi, I found that the function
mesalink_BIO_new_mem_buf
might incorrectly assumebuf_ptr
points to any type that has non-zero length (all the example cases also show the assumption); however, it ignores the case thatbuf_ptr
could also point tostruct
type.mesalink/src/libcrypto/bio.rs
Lines 720 to 733 in ef12dd6
Even in C, the
struct
could also contain padding bytes, which means the slice created at line 733 might point to uninitialized padding bytes. We consider that the function could add pre-condition check to make surebuf_ptr
is kind of plain old data.The text was updated successfully, but these errors were encountered: