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 644667 Details for
Bug 871614
CVE-2012-4560 libssh: multiple buffer overflow flaws
[?]
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]
CVE-2012-4560-Fix-possible-integer-overflows.patch
0004-CVE-2012-4560-Fix-possible-integer-overflows.patch (text/plain), 1.51 KB, created by
Andreas Schneider
on 2012-11-14 08:52:21 UTC
(
hide
)
Description:
CVE-2012-4560-Fix-possible-integer-overflows.patch
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2012-11-14 08:52:21 UTC
Size:
1.51 KB
patch
obsolete
>From 450500dc0f21afbf8f234a40553c8aad9b8027f9 Mon Sep 17 00:00:00 2001 >From: Xi Wang <xi.wang@gmail.com> >Date: Fri, 25 Nov 2011 23:02:57 -0500 >Subject: [PATCH 04/11] CVE-2012-4560: Fix possible integer overflows. > > >Signed-off-by: Andreas Schneider <asn@cryptomilk.org> >--- > src/string.c | 25 ++++++++++++++++++------- > 1 file changed, 18 insertions(+), 7 deletions(-) > >diff --git a/src/string.c b/src/string.c >index ff633ac..24be06c 100644 >--- a/src/string.c >+++ b/src/string.c >@@ -22,6 +22,7 @@ > */ > > #include <errno.h> >+#include <limits.h> > #include <stdlib.h> > #include <string.h> > >@@ -52,7 +53,11 @@ > struct ssh_string_struct *ssh_string_new(size_t size) { > struct ssh_string_struct *str = NULL; > >- str = malloc(size + 4); >+ if (size > UINT_MAX - sizeof(struct ssh_string_struct)) { >+ return NULL; >+ } >+ >+ str = malloc(sizeof(struct ssh_string_struct) + size); > if (str == NULL) { > return NULL; > } >@@ -142,16 +147,22 @@ size_t ssh_string_len(struct ssh_string_struct *s) { > char *ssh_string_to_char(struct ssh_string_struct *s) { > size_t len; > char *new; >- if(s==NULL || s->string == NULL) >- return NULL; >- len = ntohl(s->size) + 1; >- new = malloc(len); >+ if (s == NULL || s->string == NULL) { >+ return NULL; >+ } > >+ len = ssh_string_len(s); >+ if (len + 1 < len) { >+ return NULL; >+ } >+ >+ new = malloc(len + 1); > if (new == NULL) { > return NULL; > } >- memcpy(new, s->string, len - 1); >- new[len - 1] = '\0'; >+ memcpy(new, s->string, len); >+ new[len] = '\0'; >+ > return new; > } > >-- >1.8.0 >
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 871614
:
644664
|
644665
|
644666
|
644667
|
644668
|
644669
|
644988
|
644990