### [CVE-2024-50059](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-50059) ![](https://img.shields.io/static/v1?label=Product&message=Linux&color=blue) ![](https://img.shields.io/static/v1?label=Version&message=&color=brightgreen) ![](https://img.shields.io/static/v1?label=Version&message=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2%20&color=brightgreen) ![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=blue) ### Description In the Linux kernel, the following vulnerability has been resolved:ntb: ntb_hw_switchtec: Fix use after free vulnerability in switchtec_ntb_remove due to race conditionIn the switchtec_ntb_add function, it can call switchtec_ntb_init_sndevfunction, then &sndev->check_link_status_work is bound withcheck_link_status_work. switchtec_ntb_link_notification may be calledto start the work.If we remove the module which will call switchtec_ntb_remove to makecleanup, it will free sndev through kfree(sndev), while the workmentioned above will be used. The sequence of operations that may leadto a UAF bug is as follows:CPU0 CPU1 | check_link_status_workswitchtec_ntb_remove |kfree(sndev); | | if (sndev->link_force_down) | // use sndevFix it by ensuring that the work is canceled before proceeding withthe cleanup in switchtec_ntb_remove. ### POC #### Reference No PoCs from references. #### Github - https://github.com/fkie-cad/nvd-json-data-feeds - https://github.com/w4zu/Debian_security