multipath-tcp / mptcpd

mptcpd is a daemon for Linux that performs Multipath TCP path management related operations in the user space 😈
https://mptcpd.mptcp.dev/
BSD 3-Clause "New" or "Revised" License
175 stars 39 forks source link

configuration: Fix use-after-free in merged configuration for load-plugins #245

Closed mjmartineau closed 2 years ago

mjmartineau commented 2 years ago

The section of merge_config() that copies entries from one plugins_to_load queue to another was copying string pointers from one to the other. When the source queue was freed, the string pointers in the destination queue became invalid.

This manifested as garbage strings for the plugins_to_load value if the load-plugins line was used in mptcpd.conf

To fix, populate the destination queue entries with l_strdup()'d strings.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 2626380835

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/configuration.c 0 1 0.0%
<!-- Total: 0 1 0.0% -->
Totals Coverage Status
Change from base Build 2625646526: -0.03%
Covered Lines: 1187
Relevant Lines: 1904

💛 - Coveralls