No description
Find a file
Rohit Grover f809c84de2 net: fix a potential refcount leak of SYN buffers
net_send() is meant to release the refcount for the SYN buffer once
a connection is established, but this assumes that the application
uses net_send() for all outgoing buffers. It is possible to setup a
connection (and therefore generate an outgoing SYN) by calling
net_context_tcp_init(), which has the side-effect of overwriting
connection_status . Using such an API would then break the
assumption around net_send() reclaiming the refcount of the SYN buf.

A test case which exposes the problem:
* As a client, setup a connection with an HTTP server.
* Send an HTTP request contained in a buf using net_send()
* The server responds, and then tears down the connection.
* The test client then re-establishes another connection using
  net_context_tcp_init()--this overwrites connection_status, causing
  a refcount leak.

With this change, we remove the dependency on net_send() being called.

Change-Id: I96516cbca3e231ed7fb509a7c03c0ceebf80e03a
Signed-off-by: Rohit Grover <rohit.grover@arm.com>
2016-10-08 21:20:28 +00:00
.known-issues known-issues: update rule for TCF summary line 2016-09-16 11:31:27 -07:00
arch unified/arm: fix saving of registers in __pendsv() 2016-10-07 22:51:11 +00:00
boards gpio: reduce Kconfigs and use consistent name for GPIOs 2016-10-07 16:15:07 +00:00
doc docs: Adjust driver documentation to show const config_info example. 2016-10-07 08:05:50 -04:00
drivers clock/quark: Make config_info pointers const. 2016-10-08 11:40:15 +00:00
ext ksdk: Build ksdk fsl_enet.c and fsl_phy.c 2016-09-23 01:53:50 +00:00
fs fs: Add file system API to flush cache of an open file 2016-09-23 00:06:32 +00:00
include net: fetch valid conn. to determine MSS in data_is_sent_and_acked() 2016-10-08 21:20:28 +00:00
kernel sensor: grove: use global sensor init priority 2016-10-07 20:53:29 +00:00
lib iot/zoap: Fix comparing pointers of different signedness 2016-10-04 12:29:07 +00:00
misc arduino 101: make factory bootloader config the default 2016-09-17 11:13:59 +00:00
net net: fix a potential refcount leak of SYN buffers 2016-10-08 21:20:28 +00:00
samples gpio: reduce Kconfigs and use consistent name for GPIOs 2016-10-07 16:15:07 +00:00
scripts sanitycheck: Remove linker VMA/LMA offset checking 2016-10-05 09:48:54 +00:00
tests tests: Add build test for quark clock driver. 2016-10-08 11:40:14 +00:00
usb usb: do not assert on a variable we do not have 2016-09-24 08:12:35 -04:00
.checkpatch.conf checkpatch: do not check for min_t/max_t 2016-09-13 17:12:55 -04:00
.gitattributes First commit 2015-04-10 16:44:37 -07:00
.gitignore testcases: instruct git to ignore *log and outdir-* 2016-06-14 22:01:34 +00:00
.gitreview Add a .gitreview file 2016-02-20 14:25:01 +00:00
.mailmap mailmap: update with new emails 2016-10-07 16:15:24 +00:00
defaults.tc boards: rename Quark SE Devboard to Quark SE C1000 2016-09-16 03:10:31 +00:00
Kbuild unified/build: adapt Kbuild for unified kernel 2016-09-13 17:12:55 -04:00
Kconfig kconfig: Do not put architecture in the title 2016-03-14 16:50:51 -04:00
Kconfig.zephyr tests: Add a generic testing framework 2016-09-30 21:17:39 +00:00
LICENSE add top level Apache 2.0 license file 2016-02-05 20:24:37 -05:00
MAINTAINERS boards: Rename the nRF52 Nitrogen to 96Boards Nitrogen 2016-09-30 17:13:39 +00:00
Makefile unified: Fix build broblem caused by concurrent make processes in single dir 2016-10-05 10:29:31 +00:00
Makefile.inc win-build: fixes to build with alternative make implementations 2016-09-12 12:28:14 +00:00
zephyr-env.sh zephyr-env.sh: prepend to PATH 2016-08-05 20:38:08 +00:00