Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

memory leak exists in the function ovs_pcap_open #315

Closed
ccccgb opened this issue Dec 28, 2023 · 6 comments
Closed

memory leak exists in the function ovs_pcap_open #315

ccccgb opened this issue Dec 28, 2023 · 6 comments

Comments

@ccccgb
Copy link

ccccgb commented Dec 28, 2023

project

https://www.openvswitch.org/download/
version:2.17.8

os info

Ubuntu18.04 TLS

poc

poc.zip

build

wget https://www.openvswitch.org/releases/openvswitch-2.17.8.tar.gz
./configure CFLAGS="-g -O2 -fno-omit-frame-pointer -fno-common"
make
./tests/ovstest test-flows ./poc @@

ASAN Info

./tests/ovstest test-flows ./poc @@
2023-12-18T07:25:24Z|00001|pcap|WARN|@@: failed to open pcap file for reading (No such file or directory)
test-flows: failed to open @@ (No such file or directory)

=================================================================
==3820990==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x499dcd in malloc (/home/ubuntu/ovs/tests/ovstest+0x499dcd)
#1 0x826df7 in xmalloc__ /home/ubuntu/ovs/lib/util.c:137:15
#2 0x826df7 in xmalloc /home/ubuntu/ovs/lib/util.c:172:12
#3 0x7ab6e3 in ovs_pcap_open /home/ubuntu/final/ovs/lib/pcap-file.c:83:14
#4 0x509c18 in test_flows_main /home/ubuntu/ovs/tests/test-flows.c:51:12
#5 0x509c18 in ovstest_wrapper_test_flows_main__ /home/ubuntu/ovs/tests/test-flows.c:101:1
#6 0x57a2ba in ovs_cmdl_run_command__ /home/ubuntu/ctf_comp/ovs/lib/command-line.c:247:17
#7 0x4c9fb1 in main /home/ubuntu/ovs/tests/ovstest.c:133:9
#8 0x7ffff78d2082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16

SUMMARY: AddressSanitizer: 16 byte(s) leaked in 1 allocation(s).

@ccccgb ccccgb changed the title memory leaks exists in the function xmalloc__ in openvswitch-2.17.8/lib/util.c:137 memory leak exists in the function xmalloc__ in openvswitch-2.17.8/lib/util.c:137 Dec 29, 2023
@igsilya
Copy link
Member

igsilya commented Jan 2, 2024

Hi, @dddduge . Are you sure you're running OVS 2.17? The issue you described supposed to be fixed long ago in commit openvswitch/ovs@3168f32.

@risicle
Copy link

risicle commented Jan 21, 2024

FWIW CVE-2024-22563 has been assigned to this issue.

@igsilya
Copy link
Member

igsilya commented Jan 22, 2024

@risicle what is the reason for requesting this CVE? The issue was fixed in 2021, and it doesn't affect users, since it was present in a test-related code only. It is not reproducible with 2.17.8 or earlier versions of OVS 2.17.

FWIW, the process [1] for security related issues is to send a report to security@openvswitch.org instead of reporting publicly on GitHub; OVS security team then can asses the issue and decide if it is indeed a security issue and request a CVE allocation for it.

[1] https://docs.openvswitch.org/en/latest/internals/security/

@igsilya
Copy link
Member

igsilya commented Jan 22, 2024

Closing this issue, as it doesn't actually exist in any supported version of Open vSwitch. (And it doesn't exist in 2.17.8.)

@igsilya igsilya closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2024
@risicle
Copy link

risicle commented Jan 22, 2024

I did not request the CVE, I'm merely telling you that there is a CVE pointing here. I have nothing else to do with it.

@igsilya
Copy link
Member

igsilya commented Jan 22, 2024

@risicle Ack. Sorry, I assumed you were a requester. Thanks for the information.

Will try to get some clarification from a CNA.

@igsilya igsilya changed the title memory leak exists in the function xmalloc__ in openvswitch-2.17.8/lib/util.c:137 memory leak exists in the function ovs_pcap_open Jan 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants