Re: [ovs-dev] [patch v5 2/2] conntrack: Fix max size for inet_ntop() call.

2019-02-06 Thread Darrell Ball
On Wed, Feb 6, 2019 at 1:22 AM David Marchand 
wrote:

> On Mon, Feb 4, 2019 at 6:56 PM Ben Pfaff  wrote:
>
>> On Thu, Jan 31, 2019 at 11:35:41PM -0800, Darrell Ball wrote:
>> > The call to inet_ntop() in repl_ftp_v6_addr() is 1 short to handle
>> > the maximum possible V6 address size for v4 mapping case.
>> >
>> > Found by inspection.
>> >
>> > Fixes: bd5e81a0e596 ("Userspace Datapath: Add ALG infra and FTP.")
>> > Signed-off-by: Darrell Ball 
>>
>> Thanks for the bug fix patches.  I applied these to master and
>> backported to 2.10 and 2.11.  If they need to be backported further,
>> please submit backported versions.
>>
>
> Thanks Ben.
>
> Darrell, can these two fixes be backported to 2.9 ?
>

These will go back to 2.8
I am in the middle of some easier post-2.8 backports now



> I can send the backports if you don't have the bandwidth.
>
>
> --
> David Marchand
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [patch v5 2/2] conntrack: Fix max size for inet_ntop() call.

2019-02-06 Thread David Marchand
On Mon, Feb 4, 2019 at 6:56 PM Ben Pfaff  wrote:

> On Thu, Jan 31, 2019 at 11:35:41PM -0800, Darrell Ball wrote:
> > The call to inet_ntop() in repl_ftp_v6_addr() is 1 short to handle
> > the maximum possible V6 address size for v4 mapping case.
> >
> > Found by inspection.
> >
> > Fixes: bd5e81a0e596 ("Userspace Datapath: Add ALG infra and FTP.")
> > Signed-off-by: Darrell Ball 
>
> Thanks for the bug fix patches.  I applied these to master and
> backported to 2.10 and 2.11.  If they need to be backported further,
> please submit backported versions.
>

Thanks Ben.

Darrell, can these two fixes be backported to 2.9 ?
I can send the backports if you don't have the bandwidth.


-- 
David Marchand
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [patch v5 2/2] conntrack: Fix max size for inet_ntop() call.

2019-02-04 Thread Ben Pfaff
On Thu, Jan 31, 2019 at 11:35:41PM -0800, Darrell Ball wrote:
> The call to inet_ntop() in repl_ftp_v6_addr() is 1 short to handle
> the maximum possible V6 address size for v4 mapping case.
> 
> Found by inspection.
> 
> Fixes: bd5e81a0e596 ("Userspace Datapath: Add ALG infra and FTP.")
> Signed-off-by: Darrell Ball 

Thanks for the bug fix patches.  I applied these to master and
backported to 2.10 and 2.11.  If they need to be backported further,
please submit backported versions.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [patch v5 2/2] conntrack: Fix max size for inet_ntop() call.

2019-01-31 Thread David Marchand
On Fri, Feb 1, 2019 at 8:37 AM Darrell Ball  wrote:

> The call to inet_ntop() in repl_ftp_v6_addr() is 1 short to handle
> the maximum possible V6 address size for v4 mapping case.
>
> Found by inspection.
>
> Fixes: bd5e81a0e596 ("Userspace Datapath: Add ALG infra and FTP.")
> Signed-off-by: Darrell Ball 
> ---
>
> v2: s/IPV6_SCAN_LEN/INET6_ADDRSTRLEN/ in
> char v6_addr_str[IPV6_SCAN_LEN] = {0};
> per review by David Marchand.
>
>  lib/conntrack.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/conntrack.c b/lib/conntrack.c
> index 6b66750..0fe 100644
> --- a/lib/conntrack.c
> +++ b/lib/conntrack.c
> @@ -3159,9 +3159,9 @@ repl_ftp_v6_addr(struct dp_packet *pkt, struct
> ct_addr v6_addr_rep,
>  return 0;
>  }
>
> -char v6_addr_str[IPV6_SCAN_LEN] = {0};
> +char v6_addr_str[INET6_ADDRSTRLEN] = {0};
>  ovs_assert(inet_ntop(AF_INET6, _addr_rep.ipv6_aligned, v6_addr_str,
> - IPV6_SCAN_LEN - 1));
> + sizeof v6_addr_str));
>  modify_packet(pkt, ftp_data_start + addr_offset_from_ftp_data_start,
>addr_size, v6_addr_str, strlen(v6_addr_str),
>orig_used_size);
> --
> 1.9.1
>

Reviewed-by: David Marchand 

-- 
David Marchand
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [patch v5 2/2] conntrack: Fix max size for inet_ntop() call.

2019-01-31 Thread Darrell Ball
The call to inet_ntop() in repl_ftp_v6_addr() is 1 short to handle
the maximum possible V6 address size for v4 mapping case.

Found by inspection.

Fixes: bd5e81a0e596 ("Userspace Datapath: Add ALG infra and FTP.")
Signed-off-by: Darrell Ball 
---

v2: s/IPV6_SCAN_LEN/INET6_ADDRSTRLEN/ in
char v6_addr_str[IPV6_SCAN_LEN] = {0};
per review by David Marchand.

 lib/conntrack.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/conntrack.c b/lib/conntrack.c
index 6b66750..0fe 100644
--- a/lib/conntrack.c
+++ b/lib/conntrack.c
@@ -3159,9 +3159,9 @@ repl_ftp_v6_addr(struct dp_packet *pkt, struct ct_addr 
v6_addr_rep,
 return 0;
 }
 
-char v6_addr_str[IPV6_SCAN_LEN] = {0};
+char v6_addr_str[INET6_ADDRSTRLEN] = {0};
 ovs_assert(inet_ntop(AF_INET6, _addr_rep.ipv6_aligned, v6_addr_str,
- IPV6_SCAN_LEN - 1));
+ sizeof v6_addr_str));
 modify_packet(pkt, ftp_data_start + addr_offset_from_ftp_data_start,
   addr_size, v6_addr_str, strlen(v6_addr_str),
   orig_used_size);
-- 
1.9.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev