Re: [PATCH 1/1] aacraid: prevent ZERO_SIZE_PTR dereference

2013-10-31 Thread Dan Carpenter
On Thu, Oct 31, 2013 at 02:01:02PM +0530, Mahesh Rajashekhara wrote: > It appears that driver runs into a problem here if fibsize is too small > because we allocate user_srbcmd with fibsize size only but later we access it > until user_srbcmd->sg.count to copy it over to srbcmd. Seems to be not

[PATCH 1/1] aacraid: prevent ZERO_SIZE_PTR dereference

2013-10-31 Thread Mahesh Rajashekhara
It appears that driver runs into a problem here if fibsize is too small because we allocate user_srbcmd with fibsize size only but later we access it until user_srbcmd->sg.count to copy it over to srbcmd. Seems to be not correct to test (fibsize < sizeof(*user_srbcmd)) because this structure alr