We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ipfs add --hash id
go-ipfs version: 0.4.12-rc1-5146b34 Repo version: 6 System version: amd64/linux Golang version: go1.9.1
Bug
Medium (potential vector for denial of service attack)
Adding piped content with --hash id kills the daemon:
--hash id
cat anyfile | ipfs add --hash id
go-ipfs output before shutting down:
go-ipfs
panic: runtime error: slice bounds out of range goroutine 16238 [running]: gx/ipfs/QmU9a9NV9RdPNwZQDYd5uKsm6N6LJLSvLbywDDYFbaaC6P/go-multihash.Sum(0xc421864110, 0x4, 0x4, 0x0, 0x20, 0x4, 0x4, 0x0, 0x0, 0x1356c80) /go/src/gx/ipfs/QmU9a9NV9RdPNwZQDYd5uKsm6N6LJLSvLbywDDYFbaaC6P/go-multihash/sum.go:105 +0xd88 gx/ipfs/QmNp85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid.Prefix.Sum(0x1, 0x70, 0x0, 0xffffffffffffffff, 0xc421864110, 0x4, 0x4, 0xc422043aa8, 0xc420031f08, 0x1) /go/src/gx/ipfs/QmNp85zy9RLrQ5oQD4hPyS39ezrrXpcaa7R4Y9kxdWQLLQ/go-cid/cid.go:434 +0x69 github.com/ipfs/go-ipfs/merkledag.(*ProtoNode).EncodeProtobuf(0xc420287960, 0xc420287900, 0xc4202879d0, 0x0, 0x0, 0x1c5b800, 0x1330fc0) /go/src/github.com/ipfs/go-ipfs/merkledag/coding.go:94 +0x1ed github.com/ipfs/go-ipfs/merkledag.(*ProtoNode).RawData(0xc420287960, 0xc422043b78, 0xcb8b02, 0xc4206a5a00) /go/src/github.com/ipfs/go-ipfs/merkledag/node.go:206 +0x30 github.com/ipfs/go-ipfs/merkledag.(*ProtoNode).Cid(0xc420287960, 0x0) /go/src/github.com/ipfs/go-ipfs/merkledag/node.go:306 +0x9f github.com/ipfs/go-ipfs/merkledag.(*ProtoNode).String(0xc420287960, 0x2, 0x8) /go/src/github.com/ipfs/go-ipfs/merkledag/node.go:318 +0x2b github.com/ipfs/go-ipfs/mfs.NewRoot(0x1c50520, 0xc421012940, 0x1c55960, 0xc4214d0a70, 0xc420287960, 0x0, 0x36, 0xc421564cc0, 0x31) /go/src/github.com/ipfs/go-ipfs/mfs/system.go:92 +0x253 github.com/ipfs/go-ipfs/core/coreunix.(*Adder).mfsRoot(0xc4201535e0, 0xc421564cc0, 0x31, 0x1) /go/src/github.com/ipfs/go-ipfs/core/coreunix/add.go:121 +0xe4 github.com/ipfs/go-ipfs/core/coreunix.(*Adder).addNode(0xc4201535e0, 0x1c57720, 0xc4214d0ba0, 0xc421564cc0, 0x31, 0xc4201c09c0, 0x1c55960) /go/src/github.com/ipfs/go-ipfs/core/coreunix/add.go:394 +0x7d github.com/ipfs/go-ipfs/core/coreunix.(*Adder).addFile(0xc4201535e0, 0x1c545e0, 0xc421926820, 0x0, 0x0) /go/src/github.com/ipfs/go-ipfs/core/coreunix/add.go:493 +0x480 github.com/ipfs/go-ipfs/core/coreunix.(*Adder).AddFile(0xc4201535e0, 0x1c545e0, 0xc421926820, 0x0, 0x0) /go/src/github.com/ipfs/go-ipfs/core/coreunix/add.go:431 +0x83 github.com/ipfs/go-ipfs/core/commands.glob..func6.1(0x1c54580, 0xc4218791d0, 0xc4218791d0, 0xc421864090) /go/src/github.com/ipfs/go-ipfs/core/commands/add.go:282 +0x83 github.com/ipfs/go-ipfs/core/commands.glob..func6.2(0xc421d96a20, 0xc421764d20, 0x1c595c0, 0xc420d206c0, 0x1c58900, 0xc420286770) /go/src/github.com/ipfs/go-ipfs/core/commands/add.go:302 +0x7c created by github.com/ipfs/go-ipfs/core/commands.glob..func6 /go/src/github.com/ipfs/go-ipfs/core/commands/add.go:300 +0xcce
The text was updated successfully, but these errors were encountered:
In irc you were wondering if this was a bug or not. This one definitely counts as a bug.
Sorry, something went wrong.
I believe this is already fixed in go-multihash (unreleased).
@Stebalien so this is fixed by multiformats/go-multihash#55?
@kevina It should be.
No branches or pull requests
Version information:
go-ipfs version: 0.4.12-rc1-5146b34
Repo version: 6
System version: amd64/linux
Golang version: go1.9.1
Type:
Bug
Severity:
Medium (potential vector for denial of service attack)
Description:
Adding piped content with
--hash id
kills the daemon:go-ipfs
output before shutting down:The text was updated successfully, but these errors were encountered: