-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

All,

On 5/21/13 1:25 PM, James Snider wrote:
> [error occurred during error reporting (printing native stack), id
> 0xc0000005]
> 
> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j
> org.apache.tomcat.jni.Socket.sendbb(JII)I+0

The only line of code in Socket.sendbb that could possibly(*) be
causing a SEGV is this one:

  ss = (*s->net->send)(s->opaque, s->jsbbuff + offset + sent, &wr);

Both s->opaque and s->jsbuff have been null-checked via assertions(*)
so only s->net or s->net->send could be null. I don't know enough
about how tcnative works with APR to know which one is more likely, or
whether this is a safe-fail situation (because some wrapper data has
been blanked-out and discarded) or if it is a potential security
problem (overwriting a later response).

- -chris

* The assertions themselves could be causing a problem, as they look
like this:

    TCN_ASSERT(s->opaque != NULL);
    TCN_ASSERT(s->jsbbuff != NULL);

So, if "s" is null, it could cause the seg fault. Since "s" is
passed-in from Java code (it's a jint), it probably should be checked
for NULL before dereferencing it.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRm8Q0AAoJEBzwKT+lPKRYVjkQAMLlB3MXl4YBdTVR2nHLPyH6
SeTgIFY+kzHkr9HikIcKcAEa+qO5K2WcnR0qBfSwzkDcWQZmt5cK15XEV2BDP7dB
WbKyvIOAouh5dKMbNWlGjDwPb2+jp2YZ5Z3e/4GHRhv0HYHi17MRHxKx0ngg+JW4
SKk4uN5A6WXbXgNdwirnEYpJFjaSbhd+QWy6sm5mkygJ6zJ3+lBSOch2uJTSwGhg
gadmlihn9027ZMFPX78UYLq6nopjuUK5MrrEKMQedlP4zEzkW8nNrVZVM2rkbzuU
WbEWeqFSAUKSSsNAfsKek5vhFtc5dFXylmbiMeLMeu8y7Zl/3o/odmpzNGdxmDva
o0GtKkihmf1i3Oz29ZMLU2EOmT2CQoyn2R+FeBLnOjTvg9EPdzN5O6rJcKY8EpNr
oub+TpK+8q/ktWo7ZgqS0lREnLqP7rY/cRCc+IYjnq1ir7SS9sb2i8E3uGWTzi2U
sZZY+uu5BlrmUAefPwra0XSRo4LFTrCafdnpTrg6twm6PTA6v0+N4kE7OD3v1keo
JPQ+a9nu/oHwxhQ+tIIZe+pwwiKAQWyYBPDwU9P/LdE7vFF5tOdLKELBOrftfVEa
atpBg8MaeGmnPLUpYZ1pQEjStaLNxFbvJSeEXbLGd7CoR3EUO+I4XshokaiRfPsv
+lExhvHRpnarZJ+G7eew
=uA/r
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to