mbox series

[SRU,N,0/1] CVE-2024-46758

Message ID 20241010183540.29209-1-bethany.jamison@canonical.com
Headers show
Series CVE-2024-46758 | expand

Message

Bethany Jamison Oct. 10, 2024, 6:35 p.m. UTC
[Impact]

DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large
negative number such as -9223372036854775808 is provided by the user.
Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations.

[Fix]

Noble:	Clean cherry-pick from linux-6.10.y
Jammy:	pending (5.15.0-125.135)
Focal:	pending (5.4.0-200.220)
Bionic:	fix sent to esm ML
Xenial:	fix sent to esm ML
Trusty:	won't fix

[Test Case]

Compile tested.

[Where problems could occur]

This fix affects those who use the driver for Texas Instruments 
National Semiconductor LM95234, an issue with this fix would be 
visible to the user via a loss of precision resulting in inaccurate 
measurements.

Guenter Roeck (1):
  hwmon: (lm95234) Fix underflows seen when writing limit attributes

 drivers/hwmon/lm95234.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Guoqing Jiang Oct. 11, 2024, 2 a.m. UTC | #1
Acked-by: Guoqing Jiang <guoqing.jiang@canonical.com>

On 10/11/24 02:35, Bethany Jamison wrote:
> [Impact]
>
> DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large
> negative number such as -9223372036854775808 is provided by the user.
> Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations.
>
> [Fix]
>
> Noble:	Clean cherry-pick from linux-6.10.y
> Jammy:	pending (5.15.0-125.135)
> Focal:	pending (5.4.0-200.220)
> Bionic:	fix sent to esm ML
> Xenial:	fix sent to esm ML
> Trusty:	won't fix
>
> [Test Case]
>
> Compile tested.
>
> [Where problems could occur]
>
> This fix affects those who use the driver for Texas Instruments
> National Semiconductor LM95234, an issue with this fix would be
> visible to the user via a loss of precision resulting in inaccurate
> measurements.
>
> Guenter Roeck (1):
>    hwmon: (lm95234) Fix underflows seen when writing limit attributes
>
>   drivers/hwmon/lm95234.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
ivanhu Oct. 11, 2024, 3:04 a.m. UTC | #2
Acked-by: Ivan Hu <ivan.hu@canonical.com>


On 10/11/24 02:35, Bethany Jamison wrote:
> [Impact]
> 
> DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large
> negative number such as -9223372036854775808 is provided by the user.
> Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations.
> 
> [Fix]
> 
> Noble:	Clean cherry-pick from linux-6.10.y
> Jammy:	pending (5.15.0-125.135)
> Focal:	pending (5.4.0-200.220)
> Bionic:	fix sent to esm ML
> Xenial:	fix sent to esm ML
> Trusty:	won't fix
> 
> [Test Case]
> 
> Compile tested.
> 
> [Where problems could occur]
> 
> This fix affects those who use the driver for Texas Instruments
> National Semiconductor LM95234, an issue with this fix would be
> visible to the user via a loss of precision resulting in inaccurate
> measurements.
> 
> Guenter Roeck (1):
>    hwmon: (lm95234) Fix underflows seen when writing limit attributes
> 
>   drivers/hwmon/lm95234.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
>
Stefan Bader Oct. 11, 2024, 12:47 p.m. UTC | #3
On 10.10.24 20:35, Bethany Jamison wrote:
> [Impact]
> 
> DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large
> negative number such as -9223372036854775808 is provided by the user.
> Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations.
> 
> [Fix]
> 
> Noble:	Clean cherry-pick from linux-6.10.y
> Jammy:	pending (5.15.0-125.135)
> Focal:	pending (5.4.0-200.220)
> Bionic:	fix sent to esm ML
> Xenial:	fix sent to esm ML
> Trusty:	won't fix
> 
> [Test Case]
> 
> Compile tested.
> 
> [Where problems could occur]
> 
> This fix affects those who use the driver for Texas Instruments
> National Semiconductor LM95234, an issue with this fix would be
> visible to the user via a loss of precision resulting in inaccurate
> measurements.
> 
> Guenter Roeck (1):
>    hwmon: (lm95234) Fix underflows seen when writing limit attributes
> 
>   drivers/hwmon/lm95234.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 

Applied to noble:linux/master-next. Thanks.

-Stefan