[Bug 1210329] New: use after free bug in da9150_charger_remove due to race condition
http://bugzilla.opensuse.org/show_bug.cgi?id=1210329 Bug ID: 1210329 Summary: use after free bug in da9150_charger_remove due to race condition Classification: openSUSE Product: openSUSE Distribution Version: Leap 16.0 Hardware: x86-64 OS: Linux Status: NEW Severity: Major Priority: P5 - None Component: Kernel Assignee: kernel-bugs@opensuse.org Reporter: hackerzheng666@gmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- In da9150_charger_probe, &charger->otg_work is bound with da9150_charger_otg_work. da9150_charger_otg_ncb may be called to start the work. If we remove the module which will call da9150_charger_remove to make cleanup, there may be a unfinished work. The possible sequence is as follows: Fix it by canceling the work before cleanup in the da9150_charger_remove CPU0 CPUc1 |da9150_charger_otg_work da9150_charger_remove | power_supply_unregister | device_unregister | power_supply_dev_release | kfree(psy) | | | power_supply_changed(charger->usb); | //use There's no kernel log. Here is the patch link of [1] Linux-v6.3 and [2]patchwork [1] https://lore.kernel.org/all/CAHk-=whcaHLNpb7Mu_QX7ABwPgyRyfW-V8=v4Mv0S22fpjY... [2] https://lore.kernel.org/all/20230328142620.323334485@linuxfoundation.org/ -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1210329 Zheng Wang <hackerzheng666@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hackerzheng666@gmail.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1210329 http://bugzilla.opensuse.org/show_bug.cgi?id=1210329#c1 --- Comment #1 from Zheng Wang <hackerzheng666@gmail.com> --- I don't know if da9150 is shipped in SUSE, please feel free to let me know if there isn't any impact. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1210329 http://bugzilla.opensuse.org/show_bug.cgi?id=1210329#c2 Takashi Iwai <tiwai@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |tiwai@suse.com Resolution|--- |FIXED --- Comment #2 from Takashi Iwai <tiwai@suse.com> --- The fix patch has been already backported to stable and SLE15-SP4/SP5 branches. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1210329 http://bugzilla.opensuse.org/show_bug.cgi?id=1210329#c3 --- Comment #3 from Zheng Wang <hackerzheng666@gmail.com> --- (In reply to Takashi Iwai from comment #2)
The fix patch has been already backported to stable and SLE15-SP4/SP5 branches.
May I ask if this issue will be assigned with a CVE number ? Best regards, Zheng Wang -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1210329 http://bugzilla.opensuse.org/show_bug.cgi?id=1210329#c4 --- Comment #4 from Takashi Iwai <tiwai@suse.com> --- (In reply to Zheng Wang from comment #3)
(In reply to Takashi Iwai from comment #2)
The fix patch has been already backported to stable and SLE15-SP4/SP5 branches.
May I ask if this issue will be assigned with a CVE number ?
No, unless you explicitly ask for it. Do you want us to request a CVE number? -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com