Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 1806884

Summary: [OVN][ovn-controller] Buffer overread in pinctrl_compose_ipv6
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Dumitru Ceara <dceara>
Component: ovn2.12Assignee: Dumitru Ceara <dceara>
Status: CLOSED CURRENTRELEASE QA Contact: Jianlin Shi <jishi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: FDP 20.ACC: ctrautma, jishi, mmichels, ralongi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1806881 Environment:
Last Closed: 2020-11-10 15:13:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1806881    
Bug Blocks:    

Description Dumitru Ceara 2020-02-25 09:30:48 UTC
+++ This bug was initially created as a clone of Bug #1806881 +++

Description of problem:
Originally reported upstream at: https://patchwork.ozlabs.org/patch/1243716/

Version-Release number of selected component (if applicable):
ovn2.12, ovn2.13

How reproducible:
Compile OVN with address sanitizer. Run MLD unit test.

Steps to Reproduce:
1. clone ovs & ovn
2. build ovs with address sanitizer
3. build ovn with address sanitizer
4. run ovn MLD unit test:
make check TESTSUITEFLAGS="-k mld"
5. check address sanitizer generated file:
$ less tests/testsuite.dir/116/asan.*

Actual results:
Address sanitizer reports buffer overrun.

Expected results:
There should be no buffer overrun.


Additional info:

--- Additional comment from Dumitru Ceara on 2020-02-25 09:20:15 UTC ---

Fix posted upstream for review by Ben Pfaff: https://patchwork.ozlabs.org/patch/1243716/

Comment 1 Dumitru Ceara 2020-02-25 09:31:28 UTC
Fix posted upstream by Ben Pfaff for review: https://patchwork.ozlabs.org/patch/1243716/

Comment 5 Jianlin Shi 2020-03-19 10:24:30 UTC
no MLD test case exists on ovn2.12 repo, can't verify following steps in description.
assign to dceara@ after communication.
thanks dceara@ for testing this.

Comment 6 Dumitru Ceara 2020-04-03 13:09:37 UTC
Verified manually on ovn2.12-2.12.0-36.el7fdp:

# Build ovs with address-sanitizer:
cd /tmp/ovs
./boot.sh
./configure CFLAGS="-g -fsanitize=address" --enable-Werror --enable-sparse
make install

# Build ovn with address-sanitizer:
cd /tmp/ovn
./boot.sh
./configure CFLAGS="-g -fsanitize=address" --enable-Werror --enable-sparse --with-ovs-source=/tmp/ovs/
make install

# OVN quick script create logical router logical switch vm (internal):
# --------------------------------------------------------------------
ovn-nbctl lr-add rtr
ovn-nbctl lrp-add rtr rtr-ls 00:00:00:00:01:00 42::1/64
ovn-nbctl ls-add ls
ovn-nbctl lsp-add ls ls-rtr
ovn-nbctl lsp-set-addresses ls-rtr 00:00:00:00:01:00
ovn-nbctl lsp-set-type ls-rtr router
ovn-nbctl lsp-set-options ls-rtr router-port=rtr-ls
ovn-nbctl lsp-add ls vm1
ovn-nbctl lsp-set-addresses vm1 00:00:00:00:00:01
ip netns add vm1
ovs-vsctl add-port br-int vm1 -- set interface vm1 type=internal
ip link set vm1 netns vm1
ip netns exec vm1 ip link set vm1 address 00:00:00:00:00:01
ip netns exec vm1 ip addr add 42::2/64 dev vm1
ip netns exec vm1 ip link set vm1 up
ovs-vsctl set Interface vm1 external_ids:iface-id=vm1

# Add a reject ACL for tcp traffic.
ovn-nbctl acl-add ls from-lport 1000 "tcp" "reject"

# Trigger the tcpv6 acl reject action.
ip netns exec vm1 nc 42::1 80

# Check that ovn-controller didn't crash.
ps aux | grep ovn-controller
root     21669  0.0  0.0 18253729448 6500 ?    S<s  14:58   0:00 ovn-controller: monitoring pid 21671 (healthy)
root     21671  0.0  0.2 18253764480 43720 ?   S<l  14:58   0:00 ovn-controller unix:/home/dceara/local-builds/var/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --no-chdir --log-file=/home/dceara/local-builds/var/log/ovn/ovn-controller.log --pidfile=/home/dceara/local-builds/var/run/ovn/ovn-controller.pid --detach --monitor
root     22712  0.0  0.0 112716   980 pts/27   S+   15:05   0:00 grep --color=auto ovn-controller

Comment 7 Jianlin Shi 2020-04-06 04:38:49 UTC
set Verified per comment 6

Comment 10 Dan Williams 2020-11-10 15:13:59 UTC
ovn2.12 has been superceded by ovn2.13.