[PATCH review for 4.4 19/24] staging: lustre: hsm: stack overrun in hai_dump_data_field

2017-10-07 Thread Levin, Alexander (Sasha Levin)
From: frank zago [ Upstream commit 22aadb91c0a0055935109c175f5446abfb130702 ] The function hai_dump_data_field will do a stack buffer overrun when cat'ing /sys/fs/lustre/.../hsm/actions if an action has some data in it. hai_dump_data_field uses snprintf. But there is no check

[PATCH review for 4.4 19/24] staging: lustre: hsm: stack overrun in hai_dump_data_field

2017-10-07 Thread Levin, Alexander (Sasha Levin)
From: frank zago [ Upstream commit 22aadb91c0a0055935109c175f5446abfb130702 ] The function hai_dump_data_field will do a stack buffer overrun when cat'ing /sys/fs/lustre/.../hsm/actions if an action has some data in it. hai_dump_data_field uses snprintf. But there is no check for truncation,