Tarantool development patches archive
 help / color / mirror / Atom feed
* [PATCH 0/3] *** [#3619] socket.recvfrom crops UDP packets ***
@ 2018-08-24  2:47 Alexander Turenko
  2018-08-24  2:47 ` [PATCH 1/3] socket: evaluate buffer size in recv / recvfrom Alexander Turenko
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Alexander Turenko @ 2018-08-24  2:47 UTC (permalink / raw)
  To: Vladimir Davydov; +Cc: Alexander Turenko, tarantool-patches, Yaroslav Dynnikov

Hi!

Vladimir, please review the patchset.

Yaroslav, please confirm that the new behaviour is one you want.

The changes in short:

* evaluate buffer size for a UDP socket in recv / recvfrom when it was
  not passed;
* discard a datagram in recv / recvfrom when it is larger then the input
  buffer, when the size was passed;
* prevent defererence of a pointer to non-initialized data in case of
  recvfrom was called for a TCP socket.

WBR, Alexander Turenko.

branch: Totktonada/gh-3619-socket-recvfrom-detect-a-cropped-packet
travis-ci: https://travis-ci.org/tarantool/tarantool/builds/419931085
issue: https://github.com/tarantool/tarantool/issues/3619

Alexander Turenko (3):
  socket: evaluate buffer size in recv / recvfrom
  socket: don't truncate a datagram in recv/recvfrom
  socket: prevent recvfrom from returning garbage

 src/lua/socket.c         |  25 ++
 src/lua/socket.lua       |  84 +++++-
 test/app/socket.result   | 540 ++++++++++++++++++++++++++++++++++++++-
 test/app/socket.test.lua | 198 ++++++++++++++
 4 files changed, 842 insertions(+), 5 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-08-27  9:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-24  2:47 [PATCH 0/3] *** [#3619] socket.recvfrom crops UDP packets *** Alexander Turenko
2018-08-24  2:47 ` [PATCH 1/3] socket: evaluate buffer size in recv / recvfrom Alexander Turenko
2018-08-24 14:07   ` Vladimir Davydov
2018-08-24 15:25   ` Vladimir Davydov
2018-08-27  0:08     ` Alexander Turenko
2018-08-27  9:20       ` Vladimir Davydov
2018-08-27  9:26         ` Alexander Turenko
2018-08-24  2:47 ` [PATCH 2/3] socket: don't truncate a datagram in recv/recvfrom Alexander Turenko
2018-08-24 15:24   ` Vladimir Davydov
2018-08-24  2:47 ` [PATCH 3/3] socket: prevent recvfrom from returning garbage Alexander Turenko
2018-08-24 13:07   ` Vladimir Davydov
2018-08-24 13:44     ` Alexander Turenko
2018-08-24 13:55       ` Vladimir Davydov
2018-08-24 17:11   ` Vladimir Davydov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox