Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-03 Thread Wenwen Wang
On Thu, May 3, 2018 at 8:39 AM, Marcelo Ricardo Leitner wrote: > On Thu, May 03, 2018 at 08:31:28AM -0500, Wenwen Wang wrote: >> On Thu, May 3, 2018 at 7:46 AM, Marcelo Ricardo Leitner >> wrote: >> > On Thu, May 03, 2018 at 07:01:51AM -0500, Wenwen Wang wrote: >> >> On Wed, May 2, 2018 at 8:48 PM

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-03 Thread Marcelo Ricardo Leitner
On Thu, May 03, 2018 at 08:31:28AM -0500, Wenwen Wang wrote: > On Thu, May 3, 2018 at 7:46 AM, Marcelo Ricardo Leitner > wrote: > > On Thu, May 03, 2018 at 07:01:51AM -0500, Wenwen Wang wrote: > >> On Wed, May 2, 2018 at 8:48 PM, Marcelo Ricardo Leitner > >> wrote: > >> > On Wed, May 02, 2018 at

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-03 Thread Wenwen Wang
On Thu, May 3, 2018 at 7:46 AM, Marcelo Ricardo Leitner wrote: > On Thu, May 03, 2018 at 07:01:51AM -0500, Wenwen Wang wrote: >> On Wed, May 2, 2018 at 8:48 PM, Marcelo Ricardo Leitner >> wrote: >> > On Wed, May 02, 2018 at 08:27:05PM -0500, Wenwen Wang wrote: >> >> On Wed, May 2, 2018 at 8:24 PM

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-03 Thread Marcelo Ricardo Leitner
On Thu, May 03, 2018 at 07:01:51AM -0500, Wenwen Wang wrote: > On Wed, May 2, 2018 at 8:48 PM, Marcelo Ricardo Leitner > wrote: > > On Wed, May 02, 2018 at 08:27:05PM -0500, Wenwen Wang wrote: > >> On Wed, May 2, 2018 at 8:24 PM, Marcelo Ricardo Leitner > >> wrote: > >> > On Wed, May 02, 2018 at

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-03 Thread Wenwen Wang
On Wed, May 2, 2018 at 8:48 PM, Marcelo Ricardo Leitner wrote: > On Wed, May 02, 2018 at 08:27:05PM -0500, Wenwen Wang wrote: >> On Wed, May 2, 2018 at 8:24 PM, Marcelo Ricardo Leitner >> wrote: >> > On Wed, May 02, 2018 at 08:15:45PM -0500, Wenwen Wang wrote: >> >> In sctp_setsockopt_maxseg(), t

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-03 Thread Neil Horman
On Wed, May 02, 2018 at 08:07:17PM -0500, Wenwen Wang wrote: > Hi Marcelo, > > I guess I worked on an old version of the kernel. I will re-submit the > patch. Sorry :( > You don't have to resubmit the patch, this isn't broken. As marcelo points out, a value of zero in this socket option is speci

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-02 Thread Marcelo Ricardo Leitner
On Wed, May 02, 2018 at 08:27:05PM -0500, Wenwen Wang wrote: > On Wed, May 2, 2018 at 8:24 PM, Marcelo Ricardo Leitner > wrote: > > On Wed, May 02, 2018 at 08:15:45PM -0500, Wenwen Wang wrote: > >> In sctp_setsockopt_maxseg(), the integer 'val' is compared against min_len > >> and max_len to check

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-02 Thread Wenwen Wang
On Wed, May 2, 2018 at 8:24 PM, Marcelo Ricardo Leitner wrote: > On Wed, May 02, 2018 at 08:15:45PM -0500, Wenwen Wang wrote: >> In sctp_setsockopt_maxseg(), the integer 'val' is compared against min_len >> and max_len to check whether it is in the appropriate range. If it is not, >> an error code

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-02 Thread Marcelo Ricardo Leitner
On Wed, May 02, 2018 at 08:15:45PM -0500, Wenwen Wang wrote: > In sctp_setsockopt_maxseg(), the integer 'val' is compared against min_len > and max_len to check whether it is in the appropriate range. If it is not, > an error code -EINVAL will be returned. This is enforced by a security > check. Bu

[PATCH] sctp: fix a potential missing-check bug

2018-05-02 Thread Wenwen Wang
In sctp_setsockopt_maxseg(), the integer 'val' is compared against min_len and max_len to check whether it is in the appropriate range. If it is not, an error code -EINVAL will be returned. This is enforced by a security check. But, this check is only executed when 'val' is not 0. In fact, if 'val'

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-02 Thread Wenwen Wang
Hi Marcelo, I guess I worked on an old version of the kernel. I will re-submit the patch. Sorry :( Wenwen On Wed, May 2, 2018 at 6:23 PM, Marcelo Ricardo Leitner wrote: > Hi Wenwen, > > On Wed, May 02, 2018 at 05:12:45PM -0500, Wenwen Wang wrote: >> In sctp_setsockopt_maxseg(), the integer 'val

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-02 Thread Marcelo Ricardo Leitner
Hi Wenwen, On Wed, May 02, 2018 at 05:12:45PM -0500, Wenwen Wang wrote: > In sctp_setsockopt_maxseg(), the integer 'val' is compared against min_len > and max_len to check whether it is in the appropriate range. If it is not, > an error code -EINVAL will be returned. This is enforced by a security

[PATCH] sctp: fix a potential missing-check bug

2018-05-02 Thread Wenwen Wang
In sctp_setsockopt_maxseg(), the integer 'val' is compared against min_len and max_len to check whether it is in the appropriate range. If it is not, an error code -EINVAL will be returned. This is enforced by a security check. But, this check is only executed when 'val' is not 0. In fact, if 'val'