lkml.org 
[lkml]   [2025]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] wifi: mac80211: fix interger overflow in hwmp_route_info_get()
From
Date
On Thu, 2024-12-26 at 07:47 +0000, Gavrilov Ilia wrote:
> Since the new_metric and last_hop_metric variables can reach
> the MAX_METRIC(0xffffffff) value, an integer overflow may occur
> when multiplying them by 10/9. It can lead to incorrect behavior.
>
> Found by InfoTeCS on behalf of Linux Verification Center
> (linuxtesting.org) with SVACE.
>
> - mult_frac(new_metric, 10, 9) :
> + mult_frac((u64)new_metric, 10, 9) :
>

As you would expect, this doesn't build on 32-bit.

johannnes

\
 
 \ /
  Last update: 2025-01-13 16:14    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog