OpenVisualCloud / Media-Transport-Library

A real-time media transport(DPDK, AF_XDP, RDMA) stack for both raw and compressed video based on COTS hardware.
BSD 3-Clause "New" or "Revised" License
171 stars 55 forks source link

fix out-of-bounds segfault in mt_sch_put_lcore #936

Closed DawidWesierski4 closed 4 months ago

DawidWesierski4 commented 4 months ago

When mt_sch_put_lcore is called with an incorrect lcore ID while using mtl_manager, the error log attempts to access out-of-bounds memory, causing a segmentation fault

Add check that will prevent this issue

DawidWesierski4 commented 4 months ago

Running test: =========================================== ./build/tests/KahawaiUfdTest --p_port 0000:b1:01.1 --r_port 0000:b1:01.2

Test passed in 17 seconds.

=========================================== Running test: =========================================== ./build/tests/KahawaiUfdTest --p_port 0000:b1:01.1 --r_port 0000:b1:01.2 --queue_mode shared

Test passed in 20 seconds.

=========================================== Running test: =========================================== ./build/tests/KahawaiUfdTest --p_port 0000:b1:01.1 --r_port 0000:b1:01.2 --queue_mode shared --udp_lcore

Test passed in 21 seconds.

=========================================== Running test: =========================================== ./build/tests/KahawaiUfdTest --p_port 0000:b1:01.1 --r_port 0000:b1:01.2 --rss_mode l3_l4

Test passed in 20 seconds.

=========================================== Running test: =========================================== ./build/tests/KahawaiTest --auto_start_stop --p_port 0000:b1:01.1 --r_port 0000:b1:01.2 --dma_dev 0000:00:01.0,0000:00:01.1 --gtestfilter=-St22?x.*

Test passed in 782 seconds.

=========================================== Running test: =========================================== ./build/tests/KahawaiTest --auto_start_stop --p_port 0000:b1:01.1 --r_port 0000:b1:01.2 --rss_mode l3_l4 --pacing_way tsc --iova_mode pa --multi_src_port --gtest_filter=Main.:St20p:-ext

Test passed in 82 seconds.

=========================================== Running test: =========================================== ./build/tests/KahawaiTest --p_port kernel:lo --r_port kernel:lo --auto_start_stop --gtest_filter=St20p*

Test passed in 137 seconds.

===========================================

Due to the lack of runners gtests are passed manually