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 306657 Details for
Bug 448380
Wrong capget/capset version 2 usage. Possible memory corruption.
[?]
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]
try to user new capget/capset interface.
squid-atu-capget.patch (text/plain), 2.12 KB, created by
Anton Guda
on 2008-05-26 11:08:06 UTC
(
hide
)
Description:
try to user new capget/capset interface.
Filename:
MIME Type:
Creator:
Anton Guda
Created:
2008-05-26 11:08:06 UTC
Size:
2.12 KB
patch
obsolete
>diff -r -u squid-3.0.STABLE6.orig/src/tools.cc squid-3.0.STABLE6/src/tools.cc >--- squid-3.0.STABLE6.orig/src/tools.cc 2008-05-24 21:41:01.335633000 +0300 >+++ squid-3.0.STABLE6/src/tools.cc 2008-05-25 00:11:51.241395311 +0300 >@@ -1354,36 +1354,39 @@ > restoreCapabilities(int keep) > { > #if defined(_SQUID_LINUX_) && HAVE_SYS_CAPABILITY_H >- cap_user_header_t head = (cap_user_header_t) xcalloc(1, sizeof(cap_user_header_t)); >- cap_user_data_t cap = (cap_user_data_t) xcalloc(1, sizeof(cap_user_data_t)); >+ struct __user_cap_header_struct head; >+ struct __user_cap_data_struct cap[_LINUX_CAPABILITY_U32S]; > >- head->version = _LINUX_CAPABILITY_VERSION; >+ head.version = _LINUX_CAPABILITY_VERSION; > >- if (capget(head, cap) != 0) { >+ if (capget(&head, cap) != 0) { > debugs(50, 1, "Can't get current capabilities"); > goto nocap; > } > >- if (head->version != _LINUX_CAPABILITY_VERSION) { >- debugs(50, 1, "Invalid capability version " << head->version << " (expected " << _LINUX_CAPABILITY_VERSION << ")"); >+ if (head.version != _LINUX_CAPABILITY_VERSION) { >+ debugs(50, 1, "Invalid capability version " << head.version << " (expected " << _LINUX_CAPABILITY_VERSION << ")"); > goto nocap; > } > >- head->pid = 0; >+ head.pid = 0; > >- cap->inheritable = 0; >- cap->effective = (1 << CAP_NET_BIND_SERVICE); >+ cap[0].inheritable = 0; cap[1].inheritable = 0; >+ cap[0].effective = (1 << CAP_NET_BIND_SERVICE); >+ cap[1].effective = 0; > #if LINUX_TPROXY > > if (need_linux_tproxy) >- cap->effective |= (1 << CAP_NET_ADMIN) | (1 << CAP_NET_BROADCAST); >+ cap[0].effective |= (1 << CAP_NET_ADMIN) | (1 << CAP_NET_BROADCAST); > > #endif > >- if (!keep) >- cap->permitted &= cap->effective; >+ if (!keep) { >+ cap[0].permitted &= cap[0].effective; >+ cap[1].permitted &= cap[1].effective; >+ } > >- if (capset(head, cap) != 0) { >+ if (capset(&head, cap) != 0) { > /* Silent failure unless TPROXY is required */ > #if LINUX_TPROXY > >@@ -1396,9 +1399,8 @@ > > } > >-nocap: >- xfree(head); >- xfree(cap); >+nocap: >+ ; > #else > #if LINUX_TPROXY >
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 448380
: 306657