misc/122195: Alignment problems in if_ed
christian.kandeler at hob.de
Fri Mar 28 08:00:01 PDT 2008
>Synopsis: Alignment problems in if_ed
>Arrival-Date: Fri Mar 28 15:00:00 UTC 2008
>Originator: Christian Kandeler
Function ed_pio_write_mbufs() in sys/dev/ed/if_ed.c has at least two alignment problems:
1) The savebyte array is cast to an unsigned short pointer and then dereferenced, but since it is a character array, it may not be suitably aligned.
2) The call to ed_asic_outsw() assumes that the data pointer can be dereferenced as an unsigned short, but I don't think there is any guarantee that it fulfills the alignment requirements.
More information about the freebsd-bugs