Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
d9231f90
Commit
d9231f90
authored
Sep 09, 2015
by
Kenton Varda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:kentonv/capnproto
parents
a5cd0a0b
96635cc8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
8 deletions
+14
-8
message.h
c++/src/capnp/message.h
+1
-1
rpc-twoparty.c++
c++/src/capnp/rpc-twoparty.c++
+6
-3
rpc-twoparty.h
c++/src/capnp/rpc-twoparty.h
+3
-0
2015-03-02-0-c++-integer-overflow.md
security-advisories/2015-03-02-0-c++-integer-overflow.md
+1
-1
2015-03-02-2-all-cpu-amplification.md
security-advisories/2015-03-02-2-all-cpu-amplification.md
+2
-2
2015-03-05-0-c++-addl-cpu-amplification.md
...ity-advisories/2015-03-05-0-c++-addl-cpu-amplification.md
+1
-1
No files found.
c++/src/capnp/message.h
View file @
d9231f90
...
@@ -221,7 +221,7 @@ public:
...
@@ -221,7 +221,7 @@ public:
Orphanage
getOrphanage
();
Orphanage
getOrphanage
();
private
:
private
:
void
*
arenaSpace
[
2
0
];
void
*
arenaSpace
[
2
1
];
// Space in which we can construct a BuilderArena. We don't use BuilderArena directly here
// Space in which we can construct a BuilderArena. We don't use BuilderArena directly here
// because we don't want clients to have to #include arena.h, which itself includes a bunch of
// because we don't want clients to have to #include arena.h, which itself includes a bunch of
// big STL headers. We don't use a pointer to a BuilderArena because that would require an
// big STL headers. We don't use a pointer to a BuilderArena because that would require an
...
...
c++/src/capnp/rpc-twoparty.c++
View file @
d9231f90
...
@@ -159,15 +159,18 @@ struct TwoPartyServer::AcceptedConnection {
...
@@ -159,15 +159,18 @@ struct TwoPartyServer::AcceptedConnection {
rpcSystem
(
makeRpcServer
(
network
,
kj
::
mv
(
bootstrapInterface
)))
{}
rpcSystem
(
makeRpcServer
(
network
,
kj
::
mv
(
bootstrapInterface
)))
{}
};
};
kj
::
Promise
<
void
>
TwoPartyServer
::
listen
(
kj
::
ConnectionReceiver
&
listener
)
{
void
TwoPartyServer
::
accept
(
kj
::
Own
<
kj
::
AsyncIoStream
>&&
connection
)
{
return
listener
.
accept
()
.
then
([
this
,
&
listener
](
kj
::
Own
<
kj
::
AsyncIoStream
>&&
connection
)
mutable
{
auto
connectionState
=
kj
::
heap
<
AcceptedConnection
>
(
bootstrapInterface
,
kj
::
mv
(
connection
));
auto
connectionState
=
kj
::
heap
<
AcceptedConnection
>
(
bootstrapInterface
,
kj
::
mv
(
connection
));
// Run the connection until disconnect.
// Run the connection until disconnect.
auto
promise
=
connectionState
->
network
.
onDisconnect
();
auto
promise
=
connectionState
->
network
.
onDisconnect
();
tasks
.
add
(
promise
.
attach
(
kj
::
mv
(
connectionState
)));
tasks
.
add
(
promise
.
attach
(
kj
::
mv
(
connectionState
)));
}
kj
::
Promise
<
void
>
TwoPartyServer
::
listen
(
kj
::
ConnectionReceiver
&
listener
)
{
return
listener
.
accept
()
.
then
([
this
,
&
listener
](
kj
::
Own
<
kj
::
AsyncIoStream
>&&
connection
)
mutable
{
accept
(
kj
::
mv
(
connection
));
return
listen
(
listener
);
return
listen
(
listener
);
});
});
}
}
...
...
c++/src/capnp/rpc-twoparty.h
View file @
d9231f90
...
@@ -119,6 +119,9 @@ class TwoPartyServer: private kj::TaskSet::ErrorHandler {
...
@@ -119,6 +119,9 @@ class TwoPartyServer: private kj::TaskSet::ErrorHandler {
public
:
public
:
explicit
TwoPartyServer
(
Capability
::
Client
bootstrapInterface
);
explicit
TwoPartyServer
(
Capability
::
Client
bootstrapInterface
);
void
accept
(
kj
::
Own
<
kj
::
AsyncIoStream
>&&
connection
);
// Accepts the connection for servicing.
kj
::
Promise
<
void
>
listen
(
kj
::
ConnectionReceiver
&
listener
);
kj
::
Promise
<
void
>
listen
(
kj
::
ConnectionReceiver
&
listener
);
// Listens for connections on the given listener. The returned promise never resolves unless an
// Listens for connections on the given listener. The returned promise never resolves unless an
// exception is thrown while trying to accept. You may discard the returned promise to cancel
// exception is thrown while trying to accept. You may discard the returned promise to cancel
...
...
security-advisories/2015-03-02-0-c++-integer-overflow.md
View file @
d9231f90
...
@@ -91,7 +91,7 @@ following preventative measures going forward:
...
@@ -91,7 +91,7 @@ following preventative measures going forward:
4.
We will continue to require that all tests (including the new fuzz test) run
4.
We will continue to require that all tests (including the new fuzz test) run
cleanly under Valgrind before each release.
cleanly under Valgrind before each release.
5.
We will commission a professional security review before any 1.0 release.
5.
We will commission a professional security review before any 1.0 release.
Until that time, we continue to recommend agai
sn
t using Cap'n Proto to
Until that time, we continue to recommend agai
ns
t using Cap'n Proto to
interpret data from potentially-malicious sources.
interpret data from potentially-malicious sources.
I am pleased that measures 1, 2, and 3 all detected this bug, suggesting that
I am pleased that measures 1, 2, and 3 all detected this bug, suggesting that
...
...
security-advisories/2015-03-02-2-all-cpu-amplification.md
View file @
d9231f90
...
@@ -21,7 +21,7 @@ CVE-2015-2312
...
@@ -21,7 +21,7 @@ CVE-2015-2312
Impact
Impact
======
======
-
Remotely cause a peer to use excessive CPU time and other resou
cr
es to
-
Remotely cause a peer to use excessive CPU time and other resou
rc
es to
process a very small message, possibly enabling a DoS attack.
process a very small message, possibly enabling a DoS attack.
Fixed in
Fixed in
...
@@ -69,6 +69,6 @@ Preventative measures
...
@@ -69,6 +69,6 @@ Preventative measures
=====================
=====================
This problem was discovered through fuzz testing using American Fuzzy Lop,
This problem was discovered through fuzz testing using American Fuzzy Lop,
wich identified the problem as a "hang", although in fact the test case just
w
h
ich identified the problem as a "hang", although in fact the test case just
took a very long time to complete. We are incorporating testing with AFL into
took a very long time to complete. We are incorporating testing with AFL into
our release process going forward.
our release process going forward.
security-advisories/2015-03-05-0-c++-addl-cpu-amplification.md
View file @
d9231f90
...
@@ -43,7 +43,7 @@ Details
...
@@ -43,7 +43,7 @@ Details
=======
=======
Advisory
[
2015-03-02-2
][
1
]
described a bug allowing a remote attacker to
Advisory
[
2015-03-02-2
][
1
]
described a bug allowing a remote attacker to
consume excessive CPU time or other resources usin a specially-crafted message.
consume excessive CPU time or other resources usin
g
a specially-crafted message.
The present advisory is simply another case of the same bug which was initially
The present advisory is simply another case of the same bug which was initially
missed.
missed.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment