[riot-commits] [RIOT-OS/RIOT] e90470: gnrc_sock_[udp|ip]: store return value before rele...

Martine Lenders authmillenon at gmail.com
Mon Nov 12 17:01:12 CET 2018


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: e9047063ca10e276943be3ebe59d28d958178bf7
      https://github.com/RIOT-OS/RIOT/commit/e9047063ca10e276943be3ebe59d28d958178bf7
  Author: Robin <robin at chilio.net>
  Date:   2018-11-12 (Mon, 12 Nov 2018)

  Changed paths:
    M sys/net/gnrc/sock/ip/gnrc_sock_ip.c
    M sys/net/gnrc/sock/udp/gnrc_sock_udp.c

  Log Message:
  -----------
  gnrc_sock_[udp|ip]: store return value before release

sock_[udp|ip]_recv returns `pkt->size` after pkt was released via `gnrc_pktbuf_release(pkt)`.
This can result in wrong values returned by this functions and thus is not according to its sepecification.

Storing this values before releasing pkt returning the stored values should fix this.


  Commit: 685efc4f5d9c5520c897877072c818e65a664767
      https://github.com/RIOT-OS/RIOT/commit/685efc4f5d9c5520c897877072c818e65a664767
  Author: Martine Lenders <authmillenon at gmail.com>
  Date:   2018-11-12 (Mon, 12 Nov 2018)

  Changed paths:
    M sys/net/gnrc/sock/ip/gnrc_sock_ip.c
    M sys/net/gnrc/sock/udp/gnrc_sock_udp.c

  Log Message:
  -----------
  Merge pull request #10366 from crest42/gnrc_udp_use_after_free

gnrc_sock_[udp|ip]: read return value for _recv after release


Compare: https://github.com/RIOT-OS/RIOT/compare/0319a5658619...685efc4f5d9c
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the commits mailing list