[PATCH v4 1/2] mt76: mt7915: fix hwmon temp sensor mem use-after-free

Felix Fietkau nbd at nbd.name
Fri Aug 13 03:15:00 PDT 2021


On 2021-07-31 04:17, Ryder Lee wrote:
> From: Ben Greear <greearb at candelatech.com>
> 
> Without this change, garbage is seen in the hwmon name
> and sensors output for mt7915 is garbled.
Where does the use-after-free bug come from? It's not obvious to me why
using KBUILD_MODNAME instead of wiphy_name() fixes it.
I still think the phy name should probably be part of the prefix.

> With the change:
> 
> mt7915-pci-1400
> Adapter: PCI adapter
> temp1:        +49.0°C
> 
> Fixes: d6938251bb5b (mt76: mt7915: add thermal sensor device support)
The format is wrong (missing quotes), and the hash references a commit
that's not in any upstream tree.

- Felix



More information about the Linux-mediatek mailing list