Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 297967 Details for
Bug 436067
NULL pointer dereference at sctp_datamsg_put
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
corrected debug patch
sctp.patch (text/plain), 2.29 KB, created by
Neil Horman
on 2008-03-13 18:39:29 UTC
(
hide
)
Description:
corrected debug patch
Filename:
MIME Type:
Creator:
Neil Horman
Created:
2008-03-13 18:39:29 UTC
Size:
2.29 KB
patch
obsolete
>diff -up linux-2.6.18.noarch/include/net/sctp/structs.h.orig linux-2.6.18.noarch/include/net/sctp/structs.h >--- linux-2.6.18.noarch/include/net/sctp/structs.h.orig 2008-03-13 14:34:58.000000000 -0400 >+++ linux-2.6.18.noarch/include/net/sctp/structs.h 2008-03-13 14:36:07.000000000 -0400 >@@ -614,7 +614,7 @@ struct sctp_datamsg { > struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, > struct sctp_sndrcvinfo *, > struct msghdr *, int len); >-void sctp_datamsg_put(struct sctp_datamsg *); >+int sctp_datamsg_put(struct sctp_datamsg *); > void sctp_datamsg_free(struct sctp_datamsg *); > void sctp_datamsg_track(struct sctp_chunk *); > void sctp_chunk_fail(struct sctp_chunk *, int error); >diff -up linux-2.6.18.noarch/net/sctp/sm_make_chunk.c.orig linux-2.6.18.noarch/net/sctp/sm_make_chunk.c >--- linux-2.6.18.noarch/net/sctp/sm_make_chunk.c.orig 2006-09-19 23:42:06.000000000 -0400 >+++ linux-2.6.18.noarch/net/sctp/sm_make_chunk.c 2008-03-13 14:36:36.000000000 -0400 >@@ -1102,14 +1102,23 @@ static void sctp_chunk_destroy(struct sc > > /* Possibly, free the chunk. */ > void sctp_chunk_free(struct sctp_chunk *chunk) >-{ >+{ int cnt; > BUG_ON(!list_empty(&chunk->list)); > list_del_init(&chunk->transmitted_list); > > /* Release our reference on the message tracker. */ >- if (chunk->msg) >- sctp_datamsg_put(chunk->msg); > >+ /* >+ * We should never delete the parent datamsg here >+ * if the chunks refcnt is less than 2. If it is >+ * then we have a bug, caused by a double chunk_free >+ */ >+ if (chunk->msg) { >+ cnt = atomic_read(&chunk->refcnt); >+ if (sctp_datamsg_put(chunk->msg) == 1) >+ if (cnt < 2) >+ BUG(); >+ } > sctp_chunk_put(chunk); > } > >diff -up linux-2.6.18.noarch/net/sctp/chunk.c.orig linux-2.6.18.noarch/net/sctp/chunk.c >--- linux-2.6.18.noarch/net/sctp/chunk.c.orig 2006-09-19 23:42:06.000000000 -0400 >+++ linux-2.6.18.noarch/net/sctp/chunk.c 2008-03-13 14:36:07.000000000 -0400 >@@ -130,10 +130,14 @@ static void sctp_datamsg_hold(struct sct > } > > /* Release a reference. */ >-void sctp_datamsg_put(struct sctp_datamsg *msg) >+int sctp_datamsg_put(struct sctp_datamsg *msg) > { >- if (atomic_dec_and_test(&msg->refcnt)) >+ int rc = 0; >+ if (atomic_dec_and_test(&msg->refcnt)) { >+ rc = 1; > sctp_datamsg_destroy(msg); >+ } >+ return rc; > } > > /* Free a message. Really just give up a reference, the
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 436067
:
296925
|
297049
|
297108
|
297214
| 297967