Re: [PATCH rdma-next] IB/cm: Fix memory corruption in handling CM request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2017-10-19 at 08:40 +0300, Leon Romanovsky wrote:
> From: Parav Pandit <parav@xxxxxxxxxxxx>
> 
> In recent code, two path record entries are alwasy cleared while
> allocated could be either one or two path record entries.
> This leads to zero out of unallocated memory.
> 
> This fix initializes alternative path record only when alternative
> path
> is set.
> 
> While we are at it, path record allocation doesn't check for OPA
> alternative path, but rest of the code checks for OPA alternative
> path.
> Path record allocation code doesn't check for OPA alternative LID.
> This can further lead to memory corruption when only one path record
> is
> allocated, but there is actually alternative OPA path record present
> in CM
> request.
> 
> Cc: <stable@xxxxxxxxxxxxxxx> # v4.12+
> Fixes: 9fdca4da4d8c ("IB/SA: Split struct sa_path_rec based on IB and
> ROCE specific fields")
> Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx>
> Reviewed-by: Moni Shoua <monis@xxxxxxxxxxxx>
> Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>

Thanks, applied.

-- 
Doug Ledford <dledford@xxxxxxxxxx>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux