Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DoS ircdkit crashes if netcat touches it #1

Closed
ghost opened this issue Nov 3, 2018 · 5 comments
Closed

DoS ircdkit crashes if netcat touches it #1

ghost opened this issue Nov 3, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 3, 2018

An example ircdkit server can be crashed by using netcat.

leet haker

$ netcat localhost 6667
^C
$

servar

~/node_modules/ircdkit/lib/index.js:28
		if (client._socket) throw new Error('Cannot remove a connection with an active socket.');
		                    ^

Error: Cannot remove a connection with an active socket.
    at removeClient (~/node_modules/ircdkit/lib/index.js:28:29)
    at EventEmitter.<anonymous> (~/node_modules/ircdkit/lib/index.js:50:4)
    at emitOne (events.js:116:13)
    at EventEmitter.emit (events.js:211:7)
    at Socket.<anonymous> (~/node_modules/ircdkit/lib/connection.js:77:15)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Is there a way to fix this?

@Twipped
Copy link
Owner

Twipped commented Nov 3, 2018

Oh jeez, I dunno, I haven't looked a this code in 4 years.

trixiegoff added a commit to trixiegoff/ircdkit that referenced this issue May 30, 2019
corrected unhandled connection 'end' event, fixes issue Twipped#1
trixiegoff added a commit to trixiegoff/ircdkit that referenced this issue May 30, 2019
corrected unhandled connection 'end' event, fixes issue Twipped#1
@trixiegoff
Copy link
Contributor

this is caused by an unhandled connection 'end' event, fixed by closing the connection before trying to remove it.

@Twipped
Copy link
Owner

Twipped commented May 31, 2019

Published 1.0.4 with @cottonflop's fix.

@Twipped Twipped closed this as completed May 31, 2019
@TestingPlant
Copy link

On the advisory for this, it says that there is no fix available while, as far as I know, it was fixed by this pull request. The advisory should be updated to note that it has been fixed in later versions, if possible.

@Twipped
Copy link
Owner

Twipped commented Feb 10, 2021

@TestingPlant I didn't create that advisory, I have no idea how to change it. I don't even see any place on the package info page that shows it exists, let alone how to change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants