This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
David Daney writes:No.
> I have been thinking about:
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29604
> > My inclination is to do nothing. My analysis (int the bug report), > makes me think that to fix the race, all I/O operations would have to > enter a synchronized block twice. This would create a tremendous > overhead.
> > Opinions?
Hmm. This depends, does it not, on the fact that a blocking call does not return when a file descriptor is closed?
This sounds to me like aIt is not socket or java specific. I think of it as a defect in Posix (reuse of the lowest numbered descriptor possible).
bug in the kernel, although perhaps it's a bug that has to be
maintained for backwards compatibility. Blocking on a closed soucket
doesn't sound to me like a fruitful activity.
I think the main place someone would close on a separate thread is with an nio socket. But that does not mean that it is not a problem in other places as well.Anyway, I'm with you on the "do nothing" front. Where does the bug really lie, in the library or in the application code? Decent design doesn't usually involve opening a socket in one thread and then passing that socket to another thread to close. Is this an exploitable security hole? I suppose it is.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |