From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH rdma-next] IB/cm: Fix memory corruption in handling CM request
Date: Wed, 25 Oct 2017 14:39:26 -0400 [thread overview]
Message-ID: <1508956766.3325.53.camel@redhat.com> (raw)
In-Reply-To: <20171019054030.13280-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
On Thu, 2017-10-19 at 08:40 +0300, Leon Romanovsky wrote:
> From: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v4.12+
> Fixes: 9fdca4da4d8c ("IB/SA: Split struct sa_path_rec based on IB and
> ROCE specific fields")
> Signed-off-by: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Thanks, applied.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Doug Ledford <dledford@redhat.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: linux-rdma@vger.kernel.org, Parav Pandit <parav@mellanox.com>,
stable@vger.kernel.org
Subject: Re: [PATCH rdma-next] IB/cm: Fix memory corruption in handling CM request
Date: Wed, 25 Oct 2017 14:39:26 -0400 [thread overview]
Message-ID: <1508956766.3325.53.camel@redhat.com> (raw)
In-Reply-To: <20171019054030.13280-1-leon@kernel.org>
On Thu, 2017-10-19 at 08:40 +0300, Leon Romanovsky wrote:
> From: Parav Pandit <parav@mellanox.com>
>
> 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@vger.kernel.org> # v4.12+
> Fixes: 9fdca4da4d8c ("IB/SA: Split struct sa_path_rec based on IB and
> ROCE specific fields")
> Signed-off-by: Parav Pandit <parav@mellanox.com>
> Reviewed-by: Moni Shoua <monis@mellanox.com>
> Signed-off-by: Leon Romanovsky <leon@kernel.org>
Thanks, applied.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
next prev parent reply other threads:[~2017-10-25 18:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 5:40 [PATCH rdma-next] IB/cm: Fix memory corruption in handling CM request Leon Romanovsky
2017-10-19 5:40 ` Leon Romanovsky
[not found] ` <20171019054030.13280-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-10-25 18:39 ` Doug Ledford [this message]
2017-10-25 18:39 ` Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1508956766.3325.53.camel@redhat.com \
--to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.