Skip to contentSkip to conversation

sctp: jsctp_sf_eat_sack: fix jprobes function signature mismatch

PATCH Applied Daniel Borkmann 4 participants 4 messages Dec 15, 2012 – Dec 16, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 sctp: jsctp_sf_eat_sack: fix jprobes function signature mismatch

In reply to a message not in the archive

Commit 24cb81a6a (sctp: Push struct net down into all of the state machine functions) introduced the net structure into all state machine functions, but jsctp_sf_eat_sack was not updated, hence when SCTP association probing is enabled in the kernel, any simple SCTP client/server program from userspace will panic the kernel.

---
 net/sctp/probe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/sctp/probe.c +2 -1
index bc6cd75..5f7518d 100644
@@ -122,7 +122,8 @@ static const struct file_operations sctpprobe_fops = {
 	.llseek = noop_llseek,
 };
 
-sctp_disposition_t jsctp_sf_eat_sack(const struct sctp_endpoint *ep,
+sctp_disposition_t jsctp_sf_eat_sack(struct net *net,
+				     const struct sctp_endpoint *ep,
 				     const struct sctp_association *asoc,
 				     const sctp_subtype_t type,
 				     void *arg,
Signature · 1 line
1.7.11.7
Acked-by on v1 1/1
#2 lore raw
Quoted 6 lines · Daniel Borkmann

Commit 24cb81a6a (sctp: Push struct net down into all of the state machine functions) introduced the net structure into all state machine functions, but jsctp_sf_eat_sack was not updated, hence when SCTP association probing is enabled in the kernel, any simple SCTP client/server program from userspace will panic the kernel.

Aha!!! That makes a lot more sense...

Thanks
-vlad

Quoted 22 lines
---
  net/sctp/probe.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
net/sctp/probe.c +2 -1
index bc6cd75..5f7518d 100644
@@ -122,7 +122,8 @@ static const struct file_operations sctpprobe_fops = {
  	.llseek = noop_llseek,
  };
 
-sctp_disposition_t jsctp_sf_eat_sack(const struct sctp_endpoint *ep,
+sctp_disposition_t jsctp_sf_eat_sack(struct net *net,
+				     const struct sctp_endpoint *ep,
  				     const struct sctp_association *asoc,
  				     const sctp_subtype_t type,
  				     void *arg,
#3 lore raw
Quoted 11 lines · Vlad Yasevich
Quoted 7 lines · Daniel Borkmann

Commit 24cb81a6a (sctp: Push struct net down into all of the state machine functions) introduced the net structure into all state machine functions, but jsctp_sf_eat_sack was not updated, hence when SCTP association probing is enabled in the kernel, any simple SCTP client/server program from userspace will panic the kernel.

Aha!!! That makes a lot more sense...

Indeed. ;-)

Quoted 3 lines

Thanks

maintainer Applied
#4 lore raw
In reply to Daniel Borkmann

From: Daniel Borkmann <[email protected]>
Date: Sat, 15 Dec 2012 21:12:43 +0100

Quoted 9 lines

Commit 24cb81a6a (sctp: Push struct net down into all of the state machine functions) introduced the net structure into all state machine functions, but jsctp_sf_eat_sack was not updated, hence when SCTP association probing is enabled in the kernel, any simple SCTP client/server program from userspace will panic the kernel.

Applied.