diff mbox

[net-next] sctp: fix some debug output

Message ID 20170124090540.GA27652@mwanda
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Dan Carpenter Jan. 24, 2017, 9:05 a.m. UTC
We added SCTP_EVENT_TIMEOUT_RECONF but we didn't update this array so
it causes an off-by-one read overflow.

Fixes: 7b9438de0cd4 ("sctp: add stream reconf timer")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Marcelo Ricardo Leitner Jan. 24, 2017, 9:14 a.m. UTC | #1
On Tue, Jan 24, 2017 at 12:05:40PM +0300, Dan Carpenter wrote:
> We added SCTP_EVENT_TIMEOUT_RECONF but we didn't update this array so
> it causes an off-by-one read overflow.
> 
> Fixes: 7b9438de0cd4 ("sctp: add stream reconf timer")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Weird, seems your patch is missing the --- marker here.
Colin (Cc'ed) is supposed to post a v3 of his patch containing this fix.

> 
> diff --git a/net/sctp/debug.c b/net/sctp/debug.c
> index 95d7b15dad21..c5f4ed5242ac 100644
> --- a/net/sctp/debug.c
> +++ b/net/sctp/debug.c
> @@ -159,6 +159,7 @@ static const char *const sctp_timer_tbl[] = {
>  	"TIMEOUT_T4_RTO",
>  	"TIMEOUT_T5_SHUTDOWN_GUARD",
>  	"TIMEOUT_HEARTBEAT",
> +	"TIMEOUT_RECONF",
>  	"TIMEOUT_SACK",
>  	"TIMEOUT_AUTOCLOSE",
>  };
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Dan Carpenter Jan. 24, 2017, 9:51 a.m. UTC | #2
On Tue, Jan 24, 2017 at 07:14:11AM -0200, Marcelo Ricardo Leitner wrote:
> On Tue, Jan 24, 2017 at 12:05:40PM +0300, Dan Carpenter wrote:
> > We added SCTP_EVENT_TIMEOUT_RECONF but we didn't update this array so
> > it causes an off-by-one read overflow.
> > 
> > Fixes: 7b9438de0cd4 ("sctp: add stream reconf timer")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Weird, seems your patch is missing the --- marker here.
> Colin (Cc'ed) is supposed to post a v3 of his patch containing this fix.
> 

Colin, if you wanted, you could CC kernel-janitors with static checker
fixes.  There are several of us on that list.

regards,
dan carpenter
Colin Ian King Jan. 24, 2017, 9:52 a.m. UTC | #3
On 24/01/17 09:51, Dan Carpenter wrote:
> On Tue, Jan 24, 2017 at 07:14:11AM -0200, Marcelo Ricardo Leitner wrote:
>> On Tue, Jan 24, 2017 at 12:05:40PM +0300, Dan Carpenter wrote:
>>> We added SCTP_EVENT_TIMEOUT_RECONF but we didn't update this array so
>>> it causes an off-by-one read overflow.
>>>
>>> Fixes: 7b9438de0cd4 ("sctp: add stream reconf timer")
>>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>
>> Weird, seems your patch is missing the --- marker here.
>> Colin (Cc'ed) is supposed to post a v3 of his patch containing this fix.
>>
> 
> Colin, if you wanted, you could CC kernel-janitors with static checker
> fixes.  There are several of us on that list.

OK, thanks for the heads-up on that Dan.

Colin

> 
> regards,
> dan carpenter
>
Dan Carpenter Jan. 24, 2017, 10:50 a.m. UTC | #4
On Tue, Jan 24, 2017 at 07:14:11AM -0200, Marcelo Ricardo Leitner wrote:
> On Tue, Jan 24, 2017 at 12:05:40PM +0300, Dan Carpenter wrote:
> > We added SCTP_EVENT_TIMEOUT_RECONF but we didn't update this array so
> > it causes an off-by-one read overflow.
> > 
> > Fixes: 7b9438de0cd4 ("sctp: add stream reconf timer")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Weird, seems your patch is missing the --- marker here.

Are there tools that require the --- marker?  I normally leave it out
when it's not required.

regards,
dan carpenter
Marcelo Ricardo Leitner Jan. 24, 2017, 1 p.m. UTC | #5
On Tue, Jan 24, 2017 at 01:50:07PM +0300, Dan Carpenter wrote:
> On Tue, Jan 24, 2017 at 07:14:11AM -0200, Marcelo Ricardo Leitner wrote:
> > On Tue, Jan 24, 2017 at 12:05:40PM +0300, Dan Carpenter wrote:
> > > We added SCTP_EVENT_TIMEOUT_RECONF but we didn't update this array so
> > > it causes an off-by-one read overflow.
> > > 
> > > Fixes: 7b9438de0cd4 ("sctp: add stream reconf timer")
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > Weird, seems your patch is missing the --- marker here.
> 
> Are there tools that require the --- marker?  I normally leave it out
> when it's not required.

Yeah I don't think it's required. It's usually there to split it between
changelog and non-changelog stuff like the diffstat output, which is not
there too, so it should be okay.

  Marcelo
diff mbox

Patch

diff --git a/net/sctp/debug.c b/net/sctp/debug.c
index 95d7b15dad21..c5f4ed5242ac 100644
--- a/net/sctp/debug.c
+++ b/net/sctp/debug.c
@@ -159,6 +159,7 @@  static const char *const sctp_timer_tbl[] = {
 	"TIMEOUT_T4_RTO",
 	"TIMEOUT_T5_SHUTDOWN_GUARD",
 	"TIMEOUT_HEARTBEAT",
+	"TIMEOUT_RECONF",
 	"TIMEOUT_SACK",
 	"TIMEOUT_AUTOCLOSE",
 };