
| Key: |
MODPYTHON-58
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Minor
|
| Assignee: |
Unassigned
|
| Reporter: |
Jim Gallacher
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
File Attachments:
|
|
|
Environment:
|
All
|
|
| Resolution Date: |
10/Aug/05 07:59 PM
|
|
All of the following calls will cause a segfault when the index is greater than the number of global mutexes available or index < -1.
eg. 32 mutexes created on apache startup
index = 100
_apache._global_lock(req.server, None, index)
_global_unlock(req.server, None, index)
_apache._global_trylock(req.server, None, index)
For all of the corresponding functions in _apachemodule.c, the value of index is not checked before using it to access the contents of the global array of mutex locks.
eg.
rv = apr_global_mutex_lock(glb->g_locks[index]);
I'll attach a patch for all three functions that does this check.
eg.
if ((index >= (glb->nlocks)) || (index < -1)) {
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"Index %d is out of range for number of global mutex locks", index);
PyErr_SetString(PyExc_ValueError,
"Lock index is out of range for number of global mutex locks");
return NULL;
}
|
|
Description
|
All of the following calls will cause a segfault when the index is greater than the number of global mutexes available or index < -1.
eg. 32 mutexes created on apache startup
index = 100
_apache._global_lock(req.server, None, index)
_global_unlock(req.server, None, index)
_apache._global_trylock(req.server, None, index)
For all of the corresponding functions in _apachemodule.c, the value of index is not checked before using it to access the contents of the global array of mutex locks.
eg.
rv = apr_global_mutex_lock(glb->g_locks[index]);
I'll attach a patch for all three functions that does this check.
eg.
if ((index >= (glb->nlocks)) || (index < -1)) {
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
"Index %d is out of range for number of global mutex locks", index);
PyErr_SetString(PyExc_ValueError,
"Lock index is out of range for number of global mutex locks");
return NULL;
} |
Show » |
| No work has yet been logged on this issue.
|
|