Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syscalls/sockioctl: Align buffer to struct ifreq
In setup3, the following line can lead to an undefined behavior: ifr = *(struct ifreq *)ifc.ifc_buf; Indeed, at this point it can be assumed that ifc.ifc_buf is suitably aligned for struct ifreq. However, ifc.ifc_buf is assigned to buf which has no alignment constraints. This means there exists cases where buf is not suitably aligned to load a struct ifreq, which can generate a SIGBUS. Force the alignment of buf to that of struct ifreq. Signed-off-by: Teo Couprie Diaz <teo.coupriediaz@arm.com>
- Loading branch information