Talos Vulnerability Report

TALOS-2017-0396

Circle with Disney Apid Server Fork Denial of Service Vulnerability

October 31, 2017
CVE Number

CVE-2017-2889

Summary

An exploitable Denial of Service vulnerability exists in the API daemon of Circle with Disney running firmware 2.0.1. A large amount of simultaneous TCP connections causes the APID daemon to repeatedly fork, causing the daemon to run out of memory and trigger a device reboot. An attacker needs network connectivity to the device to trigger this vulnerability.

Tested Versions

Circle with Disney 2.0.1

Product URLs

https://meetcircle.com/

CVSSv3 Score

7.5 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CWE

CWE-400: Uncontrolled Resource Consumption (‘Resource Exhaustion’)

Details

The apid binary is a web server listening on the Disney Circle, that serves as the main API for user functionality. Through the apid server, all configurations and queries are made from the ‘Circle Home’ application for the administrator’s phone.

Due to the fact that the socket that is listening on TCP:4567 for these API calls has a high limit of connections that it will accept:

.text:00403FB0 038                 move    $a0, $s0         # fd
.text:00403FB4 038                 jal     listen
.text:00403FB8 038                 li      $a1, 0x400       # n

Coupled with the apid server forking with every one of these TCP connections, and there is a rather speedy consumption of all computing resources.

[   82.380000] [ pid ]   uid  tgid total_vm      rss nr_ptes swapents oom_score_adj name
[   82.730000] [ 1397]     0  1397    13564      532      10      326             0 timetracker
[   82.740000] [ 1509]     0  1509      340        9       4       18             0 udhcpc
[   82.750000] [ 1588]     0  1588     1156       30       4       60             0 apid
[   82.760000] [ 1589]     0  1589     1156       30       4       60             0 apid
[   82.770000] [ 1590]     0  1590     1156       30       4       60             0 apid
Ö.
[   86.040000] [ 1995]     0  1995     1142       16       4       45             0 apid
[   86.040000] [ 1996]     0  1996     1142       16       4       45             0 apid
[   86.050000] [ 1997]     0  1997     1142       16       4       45             0 apid

After about 60 seconds of the process being locked, the Circle device will reboot, returning back to normal in about 40 more seconds.

Crash Information

[   74.530000] apid invoked oom-killer: gfp_mask=0x4d0, order=0, oom_score_adj=0
[   74.540000] CPU: 0 PID: 1120 Comm: apid Not tainted 3.10.49 #3
[   74.550000] Stack : 00000000 00000000 00000000 00000000 803bce76 00000032 82f6def8 00000000
      802f5b44 8033f9a3 00000460 803b3a00 82f6def8 00000000 00000000 00000000
      00000011 80290d44 00000000 801f39b0 00000006 8391f680 802f71d4 82e87bec
      00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      00000000 00000000 00000000 00000000 00000000 00000000 00000000 82e87b78
      ...
[   74.590000] Call Trace:
[   74.590000] [<80235a38>] show_stack+0x48/0x70
[   74.590000] [<802903b8>] dump_header.isra.16+0x4c/0x13c
[   74.600000] [<801cdfd4>] oom_kill_process+0xc8/0x3b0
[   74.600000] [<801cf14c>] out_of_memory+0x2ac/0x2e4
[   74.610000] [<80082078>] __alloc_pages_nodemask+0x5d0/0x634
[   74.610000] [<800a3ac8>] __pte_alloc+0x34/0x17c
[   74.620000] [<800f7a20>] copy_pte_range+0xbc/0x38c
[   74.620000] [<800f6c18>] copy_page_range+0xec/0x13c
[   74.630000] [<80128604>] dup_mm+0x2cc/0x3e8
[   74.630000] [<800f7320>] copy_process.part.78+0x6b8/0xcfc
[   74.640000] [<80115eac>] do_fork+0xe4/0x2d4
[   74.640000] [<800625b0>] stack_done+0x20/0x44
[   74.650000]
[   74.650000] Mem-Info:
[   74.650000] Normal per-cpu:
[   74.650000] CPU    0: hi:   18, btch:   3 usd:  14
[   74.660000] active_anon:3039 inactive_anon:3042 isolated_anon:160
[   74.660000]  active_file:48 inactive_file:82 isolated_file:0
[   74.660000]  unevictable:0 dirty:0 writeback:3193 unstable:0
[   74.660000]  free:251 slab_reclaimable:350 slab_unreclaimable:2729
[   74.660000]  mapped:121 shmem:74 pagetables:1495 bounce:0
[   74.660000]  free_cma:0
[   74.690000] Normal free:1004kB min:988kB low:1232kB high:1480kB active_anon:12156kB inactive_anon:12168kB active_file:192kB   
inactive_file:328kB unevictable:   
0kB isolated(anon):640kB isolated(file):0kB present:65536kB managed:61080kB mlocked:0kB dirty:0kB writeback:12772kB mapped:484kB 
shmem:296kB slab_reclaimable:
1400kB slab_unreclaimable:10916kB kernel_stack:3296kB pagetables:5980kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB 
pages_scanned:80006 
all_unreclaimable? yes
[   74.740000] lowmem_reserve[]: 0 0
[   74.740000] Normal: 7*4kB (UER) 2*8kB (UR) 0*16kB 6*32kB (MR) 6*64kB (UMR) 1*128kB (M) 1*256kB (R) 0*512kB 0*1024kB 0*2048kB 
0*4096kB = 1004kB
[   74.750000] 3416 total pagecache pages
[   74.760000] 3212 pages in swap cache
[   74.760000] Swap cache stats: add 5500, delete 2288, find 136/145
[   74.770000] Free swap  = 109376kB
[   74.770000] Total swap = 131068kB
[   74.780000] 16384 pages RAM
[   74.780000] 1047 pages reserved
[   74.780000] 299377 pages shared
[   74.790000] 13241 pages non-shared
Ö.
[   77.840000] [ 1907]     0  1907     1142       27       4       39             0 apid
[   77.850000] Out of memory: Kill process 1396 (timetracker) score 17 or sacrifice child
[   77.850000] Killed process 1396 (timetracker) total-vm:54252kB, anon-rss:52kB, file-rss:2048kB

Timeline

2017-08-29 - Vendor Disclosure
2017-10-31 - Public Release

Credit

Discovered Lilith (>_>) Wyatt and Claudio Bozzato of Cisco Talos.