lkml.org 
[lkml]   [2022]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] platform/chrome: cros_ec_typec: zero out stale pointers
Hi Prashant,

Thank you for reviewing. I'll update accordingly in the next revision.

On Wed, Dec 7, 2022 at 7:02 PM Prashant Malani <pmalani@chromium.org> wrote:
>
> Hi Victor,
>
> On Tue, Dec 6, 2022 at 8:02 PM Victor Ding <victording@chromium.org> wrote:
> >
> > `cros_typec_get_switch_handles` allocates several pointers when
> > obtaining four handles. These pointers are all freed if failing to
> > obtain any of the four handles; therefore, pointers in `port` becomes
> > stale. The stale pointers eventually cause use-after-free or double in
> > later code paths.
> >
> > This patch proposes
> Please use the imperative form [1]
>
> > to elimite these stale pointers by zeroing them out
>
> s/elimite/eliminate
>
> > right after they are freed.
> >
> > Signed-off-by: Victor Ding <victording@chromium.org>
> This should have a "Fixes" tag.
>
> Best regards,
>
> -Prashant
>
> [1] https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes

Best regards,
Victor

\
 
 \ /
  Last update: 2022-12-07 10:10    [W:0.057 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site