Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] fuse-3.16.2/example/notify_inval_entry.c:266:27: warning[-Wanalyzer-malloc-leak]: leak of 'old_name' fuse-3.16.2/example/notify_inval_entry.c:255:14: enter_function: entry to 'update_fs_loop' fuse-3.16.2/example/notify_inval_entry.c:260:11: branch_true: following 'true' branch... fuse-3.16.2/example/notify_inval_entry.c:261:20: branch_true: ...to here fuse-3.16.2/example/notify_inval_entry.c:261:20: acquire_memory: allocated here fuse-3.16.2/example/notify_inval_entry.c:262:9: call_function: calling 'update_fs' from 'update_fs_loop' fuse-3.16.2/example/notify_inval_entry.c:262:9: return_function: returning to 'update_fs_loop' from 'update_fs' fuse-3.16.2/example/notify_inval_entry.c:264:12: branch_true: following 'true' branch... fuse-3.16.2/example/notify_inval_entry.c:265:15: branch_true: following 'true' branch... fuse-3.16.2/example/notify_inval_entry.c:266:27: branch_true: ...to here fuse-3.16.2/example/notify_inval_entry.c:266:27: throw: if 'fuse_lowlevel_notify_expire_entry' throws an exception... fuse-3.16.2/example/notify_inval_entry.c:266:27: danger: 'old_name' leaks here; was allocated at [(4)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/3) # 264| if (!options.no_notify && lookup_cnt) { # 265| if(options.only_expire) { // expire entry # 266|-> int ret = fuse_lowlevel_notify_expire_entry # 267| (se, FUSE_ROOT_ID, old_name, strlen(old_name)); # 268| Error: GCC_ANALYZER_WARNING (CWE-688): [#def2] fuse-3.16.2/example/notify_inval_entry.c:266:27: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'old_name' where non-null expected fuse-3.16.2/example/notify_inval_entry.c:255:14: enter_function: entry to 'update_fs_loop' fuse-3.16.2/example/notify_inval_entry.c:260:11: branch_true: following 'true' branch... fuse-3.16.2/example/notify_inval_entry.c:261:20: branch_true: ...to here fuse-3.16.2/example/notify_inval_entry.c:261:20: acquire_memory: this call could return NULL fuse-3.16.2/example/notify_inval_entry.c:262:9: call_function: calling 'update_fs' from 'update_fs_loop' fuse-3.16.2/example/notify_inval_entry.c:262:9: return_function: returning to 'update_fs_loop' from 'update_fs' fuse-3.16.2/example/notify_inval_entry.c:264:12: branch_true: following 'true' branch... fuse-3.16.2/example/notify_inval_entry.c:265:15: branch_true: following 'true' branch... fuse-3.16.2/example/notify_inval_entry.c:266:27: branch_true: ...to here fuse-3.16.2/example/notify_inval_entry.c:266:27: danger: argument 1 ('old_name') from [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3) could be NULL where non-null expected # 264| if (!options.no_notify && lookup_cnt) { # 265| if(options.only_expire) { // expire entry # 266|-> int ret = fuse_lowlevel_notify_expire_entry # 267| (se, FUSE_ROOT_ID, old_name, strlen(old_name)); # 268| Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] fuse-3.16.2/example/passthrough.c:400:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd' fuse-3.16.2/example/passthrough.c:389:12: branch_false: following 'false' branch (when 'mode == 0')... fuse-3.16.2/example/passthrough.c:392:11: branch_false: ...to here fuse-3.16.2/example/passthrough.c:392:11: branch_true: following 'true' branch (when 'fi' is NULL)... fuse-3.16.2/example/passthrough.c:393:22: branch_true: ...to here fuse-3.16.2/example/passthrough.c:393:22: acquire_resource: opened here fuse-3.16.2/example/passthrough.c:397:12: branch_false: following 'false' branch (when 'fd != -1')... fuse-3.16.2/example/passthrough.c:400:16: branch_false: ...to here fuse-3.16.2/example/passthrough.c:400:16: throw: if 'posix_fallocate' throws an exception... fuse-3.16.2/example/passthrough.c:400:16: danger: 'fd' leaks here; was opened at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4) # 398| return -errno; # 399| # 400|-> res = -posix_fallocate(fd, offset, length); # 401| # 402| if(fi == NULL) Error: GCC_ANALYZER_WARNING (CWE-775): [#def4] fuse-3.16.2/example/passthrough_ll.c:1276:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'lo.root.fd' fuse-3.16.2/example/passthrough_ll.c:1199:12: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1201:13: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1201:12: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1208:20: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1208:19: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1215:12: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1215:11: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1222:13: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1222:12: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1225:20: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1227:12: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1243:29: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1244:19: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1249:14: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1269:22: acquire_resource: opened here fuse-3.16.2/example/passthrough_ll.c:1270:12: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1276:14: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1276:14: throw: if 'fuse_session_new' throws an exception... fuse-3.16.2/example/passthrough_ll.c:1276:14: danger: 'lo.root.fd' leaks here; was opened at [(17)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/16) # 1274| } # 1275| # 1276|-> se = fuse_session_new(&args, &lo_oper, sizeof(lo_oper), &lo); # 1277| if (se == NULL) # 1278| goto err_out1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] fuse-3.16.2/example/passthrough_ll.c:1276:14: warning[-Wanalyzer-malloc-leak]: leak of 'lo.source' fuse-3.16.2/example/passthrough_ll.c:1199:12: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1201:13: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1201:12: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1208:20: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1208:19: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1215:12: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1215:11: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1222:13: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1222:12: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1225:20: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1227:12: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1243:29: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1243:29: acquire_memory: allocated here fuse-3.16.2/example/passthrough_ll.c:1244:19: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1249:14: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1270:12: branch_false: following 'false' branch... fuse-3.16.2/example/passthrough_ll.c:1276:14: branch_false: ...to here fuse-3.16.2/example/passthrough_ll.c:1276:14: throw: if 'fuse_session_new' throws an exception... fuse-3.16.2/example/passthrough_ll.c:1276:14: danger: 'lo.source' leaks here; was allocated at [(13)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/12) # 1274| } # 1275| # 1276|-> se = fuse_session_new(&args, &lo_oper, sizeof(lo_oper), &lo); # 1277| if (se == NULL) # 1278| goto err_out1; Error: CPPCHECK_WARNING (CWE-909): [#def6] fuse-3.16.2/lib/fuse.c:3165: error[uninitStructMember]: Uninitialized struct member: e.ino # 3163| if (!err) { # 3164| pthread_mutex_lock(&f->lock); # 3165|-> get_node(f, e.ino)->open_count++; # 3166| pthread_mutex_unlock(&f->lock); # 3167| if (fuse_reply_create(req, &e, fi) == -ENOENT) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] fuse-3.16.2/lib/fuse_loop_mt.c:71:17: warning[-Wanalyzer-malloc-leak]: leak of 'config' fuse-3.16.2/lib/fuse_loop_mt.c:396:5: enter_function: entry to 'fuse_session_loop_mt_32' fuse-3.16.2/lib/fuse_loop_mt.c:401:12: branch_false: following 'false' branch (when 'config_v1' is NULL)... fuse-3.16.2/lib/fuse_loop_mt.c:410:15: branch_false: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:410:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32' # 69| struct fuse_chan *ch = (struct fuse_chan *) malloc(sizeof(*ch)); # 70| if (ch == NULL) { # 71|-> fuse_log(FUSE_LOG_ERR, "fuse: failed to allocate channel\n"); # 72| return NULL; # 73| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] fuse-3.16.2/lib/fuse_loop_mt.c:224:17: warning[-Wanalyzer-malloc-leak]: leak of 'w' fuse-3.16.2/lib/fuse_loop_mt.c:279:12: enter_function: entry to 'fuse_loop_start_thread' fuse-3.16.2/lib/fuse_loop_mt.c:283:33: acquire_memory: allocated here fuse-3.16.2/lib/fuse_loop_mt.c:284:12: branch_false: following 'false' branch (when 'w' is non-NULL)... fuse-3.16.2/lib/fuse_loop_mt.c:288:9: branch_false: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:293:12: branch_false: following 'false' branch... fuse-3.16.2/lib/fuse_loop_mt.c:303:15: branch_false: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:303:15: call_function: calling 'fuse_start_thread' from 'fuse_loop_start_thread' # 222| stack_size = getenv(ENVNAME_THREAD_STACK); # 223| if (stack_size && pthread_attr_setstacksize(&attr, atoi(stack_size))) # 224|-> fuse_log(FUSE_LOG_ERR, "fuse: invalid stack size: %s\n", stack_size); # 225| # 226| /* Disallow signal reception in worker threads */ Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] fuse-3.16.2/lib/fuse_loop_mt.c:256:19: warning[-Wanalyzer-malloc-leak]: leak of 'config' fuse-3.16.2/lib/fuse_loop_mt.c:396:5: enter_function: entry to 'fuse_session_loop_mt_32' fuse-3.16.2/lib/fuse_loop_mt.c:401:12: branch_false: following 'false' branch (when 'config_v1' is NULL)... fuse-3.16.2/lib/fuse_loop_mt.c:410:15: branch_false: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:410:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32' # 254| #define O_CLOEXEC 0 # 255| #endif # 256|-> clonefd = open(devname, O_RDWR | O_CLOEXEC); # 257| if (clonefd == -1) { # 258| fuse_log(FUSE_LOG_ERR, "fuse: failed to open %s: %s\n", devname, Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] fuse-3.16.2/lib/fuse_loop_mt.c:258:17: warning[-Wanalyzer-malloc-leak]: leak of 'config' fuse-3.16.2/lib/fuse_loop_mt.c:396:5: enter_function: entry to 'fuse_session_loop_mt_32' fuse-3.16.2/lib/fuse_loop_mt.c:401:12: branch_false: following 'false' branch (when 'config_v1' is NULL)... fuse-3.16.2/lib/fuse_loop_mt.c:410:15: branch_false: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:410:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32' # 256| clonefd = open(devname, O_RDWR | O_CLOEXEC); # 257| if (clonefd == -1) { # 258|-> fuse_log(FUSE_LOG_ERR, "fuse: failed to open %s: %s\n", devname, # 259| strerror(errno)); # 260| return NULL; Error: GCC_ANALYZER_WARNING (CWE-775): [#def11] fuse-3.16.2/lib/fuse_loop_mt.c:262:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/fuse", 524290)' fuse-3.16.2/lib/fuse_loop_mt.c:256:19: acquire_resource: opened here fuse-3.16.2/lib/fuse_loop_mt.c:257:12: branch_false: following 'false' branch... fuse-3.16.2/lib/fuse_loop_mt.c:262:9: branch_false: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:262:9: throw: if 'fcntl' throws an exception... fuse-3.16.2/lib/fuse_loop_mt.c:262:9: danger: 'open("/dev/fuse", 524290)' leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0) # 260| return NULL; # 261| } # 262|-> fcntl(clonefd, F_SETFD, FD_CLOEXEC); # 263| # 264| masterfd = mt->se->fd; Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] fuse-3.16.2/lib/fuse_loop_mt.c:262:9: warning[-Wanalyzer-malloc-leak]: leak of 'config' fuse-3.16.2/lib/fuse_loop_mt.c:396:5: enter_function: entry to 'fuse_session_loop_mt_32' fuse-3.16.2/lib/fuse_loop_mt.c:401:12: branch_false: following 'false' branch (when 'config_v1' is NULL)... fuse-3.16.2/lib/fuse_loop_mt.c:410:15: branch_false: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:410:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32' # 260| return NULL; # 261| } # 262|-> fcntl(clonefd, F_SETFD, FD_CLOEXEC); # 263| # 264| masterfd = mt->se->fd; Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] fuse-3.16.2/lib/fuse_loop_mt.c:262:9: warning[-Wanalyzer-malloc-leak]: leak of 'w' fuse-3.16.2/lib/fuse_loop_mt.c:279:12: enter_function: entry to 'fuse_loop_start_thread' fuse-3.16.2/lib/fuse_loop_mt.c:283:33: acquire_memory: allocated here fuse-3.16.2/lib/fuse_loop_mt.c:284:12: branch_false: following 'false' branch (when 'w' is non-NULL)... fuse-3.16.2/lib/fuse_loop_mt.c:288:9: branch_false: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:293:12: branch_true: following 'true' branch... fuse-3.16.2/lib/fuse_loop_mt.c:294:25: branch_true: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:294:25: call_function: calling 'fuse_clone_chan' from 'fuse_loop_start_thread' # 260| return NULL; # 261| } # 262|-> fcntl(clonefd, F_SETFD, FD_CLOEXEC); # 263| # 264| masterfd = mt->se->fd; Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] fuse-3.16.2/lib/fuse_loop_mt.c:267:17: warning[-Wanalyzer-malloc-leak]: leak of 'config' fuse-3.16.2/lib/fuse_loop_mt.c:396:5: enter_function: entry to 'fuse_session_loop_mt_32' fuse-3.16.2/lib/fuse_loop_mt.c:401:12: branch_false: following 'false' branch (when 'config_v1' is NULL)... fuse-3.16.2/lib/fuse_loop_mt.c:410:15: branch_false: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:410:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32' # 265| res = ioctl(clonefd, FUSE_DEV_IOC_CLONE, &masterfd); # 266| if (res == -1) { # 267|-> fuse_log(FUSE_LOG_ERR, "fuse: failed to clone device fd: %s\n", # 268| strerror(errno)); # 269| close(clonefd); Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] fuse-3.16.2/lib/fuse_loop_mt.c:269:17: warning[-Wanalyzer-malloc-leak]: leak of 'config' fuse-3.16.2/lib/fuse_loop_mt.c:396:5: enter_function: entry to 'fuse_session_loop_mt_32' fuse-3.16.2/lib/fuse_loop_mt.c:401:12: branch_false: following 'false' branch (when 'config_v1' is NULL)... fuse-3.16.2/lib/fuse_loop_mt.c:410:15: branch_false: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:410:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32' # 267| fuse_log(FUSE_LOG_ERR, "fuse: failed to clone device fd: %s\n", # 268| strerror(errno)); # 269|-> close(clonefd); # 270| return NULL; # 271| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] fuse-3.16.2/lib/fuse_loop_mt.c:274:17: warning[-Wanalyzer-malloc-leak]: leak of 'config' fuse-3.16.2/lib/fuse_loop_mt.c:396:5: enter_function: entry to 'fuse_session_loop_mt_32' fuse-3.16.2/lib/fuse_loop_mt.c:401:12: branch_false: following 'false' branch (when 'config_v1' is NULL)... fuse-3.16.2/lib/fuse_loop_mt.c:410:15: branch_false: ...to here fuse-3.16.2/lib/fuse_loop_mt.c:410:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32' # 272| newch = fuse_chan_new(clonefd); # 273| if (newch == NULL) # 274|-> close(clonefd); # 275| # 276| return newch; Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] fuse-3.16.2/lib/fuse_lowlevel.c:620:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmpbuf' fuse-3.16.2/lib/fuse_lowlevel.c:2404:5: enter_function: entry to 'fuse_lowlevel_notify_store' fuse-3.16.2/lib/fuse_lowlevel.c:2414:12: branch_false: following 'false' branch (when 'se' is non-NULL)... fuse-3.16.2/lib/fuse_lowlevel.c:2417:13: branch_false: ...to here fuse-3.16.2/lib/fuse_lowlevel.c:2417:12: branch_false: following 'false' branch... fuse-3.16.2/lib/fuse_lowlevel.c:2420:9: branch_false: ...to here fuse-3.16.2/lib/fuse_lowlevel.c:2433:15: call_function: calling 'fuse_send_data_iov' from 'fuse_lowlevel_notify_store' # 618| res = read(fd, buf, len); # 619| if (res == -1) { # 620|-> fuse_log(FUSE_LOG_ERR, "fuse: internal error: failed to read back from pipe: %s\n", strerror(errno)); # 621| return -EIO; # 622| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] fuse-3.16.2/lib/fuse_lowlevel.c:624:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmpbuf' fuse-3.16.2/lib/fuse_lowlevel.c:2404:5: enter_function: entry to 'fuse_lowlevel_notify_store' fuse-3.16.2/lib/fuse_lowlevel.c:2414:12: branch_false: following 'false' branch (when 'se' is non-NULL)... fuse-3.16.2/lib/fuse_lowlevel.c:2417:13: branch_false: ...to here fuse-3.16.2/lib/fuse_lowlevel.c:2417:12: branch_false: following 'false' branch... fuse-3.16.2/lib/fuse_lowlevel.c:2420:9: branch_false: ...to here fuse-3.16.2/lib/fuse_lowlevel.c:2433:15: call_function: calling 'fuse_send_data_iov' from 'fuse_lowlevel_notify_store' # 622| } # 623| if (res != len) { # 624|-> fuse_log(FUSE_LOG_ERR, "fuse: internal error: short read back from pipe: %i from %zi\n", res, len); # 625| return -EIO; # 626| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def19] fuse-3.16.2/lib/mount.c:345:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/null", 0)' fuse-3.16.2/lib/mount.c:317:12: branch_false: following 'false' branch (when 'mountpoint' is non-NULL)... fuse-3.16.2/lib/mount.c:322:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:323:11: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:328:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:329:11: branch_false: following 'false' branch (when 'pid != -1')... fuse-3.16.2/lib/mount.c:336:11: branch_false: ...to here fuse-3.16.2/lib/mount.c:336:11: branch_true: following 'true' branch (when 'pid == 0')... fuse-3.16.2/lib/mount.c:341:20: branch_true: ...to here fuse-3.16.2/lib/mount.c:341:20: branch_true: following 'true' branch (when 'quiet != 0')... fuse-3.16.2/lib/mount.c:342:34: branch_true: ...to here fuse-3.16.2/lib/mount.c:342:34: acquire_resource: opened here fuse-3.16.2/lib/mount.c:343:28: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:344:33: branch_true: ...to here fuse-3.16.2/lib/mount.c:345:33: danger: 'open("/dev/null", 0)' leaks here; was opened at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10) # 343| if (fd != -1) { # 344| dup2(fd, 1); # 345|-> dup2(fd, 2); # 346| } # 347| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def20] fuse-3.16.2/lib/mount.c:406:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/null", 0)' fuse-3.16.2/lib/mount.c:378:12: branch_false: following 'false' branch (when 'mountpoint' is non-NULL)... fuse-3.16.2/lib/mount.c:383:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:384:11: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:389:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:390:11: branch_false: following 'false' branch (when 'pid != -1')... fuse-3.16.2/lib/mount.c:397:11: branch_false: ...to here fuse-3.16.2/lib/mount.c:397:11: branch_true: following 'true' branch (when 'pid == 0')... fuse-3.16.2/lib/mount.c:402:20: branch_true: ...to here fuse-3.16.2/lib/mount.c:402:20: branch_true: following 'true' branch (when 'quiet != 0')... fuse-3.16.2/lib/mount.c:403:34: branch_true: ...to here fuse-3.16.2/lib/mount.c:403:34: acquire_resource: opened here fuse-3.16.2/lib/mount.c:404:28: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:405:33: branch_true: ...to here fuse-3.16.2/lib/mount.c:406:33: danger: 'open("/dev/null", 0)' leaks here; was opened at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10) # 404| if (fd != -1) { # 405| dup2(fd, 1); # 406|-> dup2(fd, 2); # 407| } # 408| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] fuse-3.16.2/lib/mount.c:531:30: warning[-Wanalyzer-malloc-leak]: leak of 'source' fuse-3.16.2/lib/mount.c:459:12: branch_false: following 'false' branch (when 'mnt' is non-NULL)... fuse-3.16.2/lib/mount.c:464:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:465:12: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:471:14: branch_false: ...to here fuse-3.16.2/lib/mount.c:472:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:483:9: branch_false: ...to here fuse-3.16.2/lib/mount.c:487:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:490:26: branch_false: ...to here fuse-3.16.2/lib/mount.c:490:18: acquire_memory: allocated here fuse-3.16.2/lib/mount.c:495:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:500:22: branch_false: ...to here fuse-3.16.2/lib/mount.c:509:12: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:512:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:517:25: branch_false: ...to here fuse-3.16.2/lib/mount.c:521:12: branch_true: following 'true' branch (when 'res == -1')... fuse-3.16.2/lib/mount.c:526:21: branch_true: ...to here fuse-3.16.2/lib/mount.c:526:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:530:29: branch_false: ...to here fuse-3.16.2/lib/mount.c:530:28: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:531:30: throw: if 'fuse_mnt_check_fuseblk' throws an exception... fuse-3.16.2/lib/mount.c:531:30: danger: 'source' leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8) # 529| int errno_save = errno; # 530| if (mo->blkdev && errno == ENODEV && # 531|-> !fuse_mnt_check_fuseblk()) # 532| fuse_log(FUSE_LOG_ERR, # 533| "fuse: 'fuseblk' support missing\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] fuse-3.16.2/lib/mount.c:531:30: warning[-Wanalyzer-malloc-leak]: leak of 'type' fuse-3.16.2/lib/mount.c:459:12: branch_false: following 'false' branch (when 'mnt' is non-NULL)... fuse-3.16.2/lib/mount.c:464:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:465:12: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:471:14: branch_false: ...to here fuse-3.16.2/lib/mount.c:472:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:483:9: branch_false: ...to here fuse-3.16.2/lib/mount.c:487:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:490:26: branch_false: ...to here fuse-3.16.2/lib/mount.c:494:16: acquire_memory: allocated here fuse-3.16.2/lib/mount.c:495:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:500:22: branch_false: ...to here fuse-3.16.2/lib/mount.c:509:12: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:512:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:517:25: branch_false: ...to here fuse-3.16.2/lib/mount.c:521:12: branch_true: following 'true' branch (when 'res == -1')... fuse-3.16.2/lib/mount.c:526:21: branch_true: ...to here fuse-3.16.2/lib/mount.c:526:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:530:29: branch_false: ...to here fuse-3.16.2/lib/mount.c:530:28: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:531:30: throw: if 'fuse_mnt_check_fuseblk' throws an exception... fuse-3.16.2/lib/mount.c:531:30: danger: 'type' leaks here; was allocated at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8) # 529| int errno_save = errno; # 530| if (mo->blkdev && errno == ENODEV && # 531|-> !fuse_mnt_check_fuseblk()) # 532| fuse_log(FUSE_LOG_ERR, # 533| "fuse: 'fuseblk' support missing\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] fuse-3.16.2/lib/mount.c:532:33: warning[-Wanalyzer-malloc-leak]: leak of 'source' fuse-3.16.2/lib/mount.c:459:12: branch_false: following 'false' branch (when 'mnt' is non-NULL)... fuse-3.16.2/lib/mount.c:464:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:465:12: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:471:14: branch_false: ...to here fuse-3.16.2/lib/mount.c:472:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:483:9: branch_false: ...to here fuse-3.16.2/lib/mount.c:487:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:490:26: branch_false: ...to here fuse-3.16.2/lib/mount.c:490:18: acquire_memory: allocated here fuse-3.16.2/lib/mount.c:495:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:500:22: branch_false: ...to here fuse-3.16.2/lib/mount.c:509:12: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:512:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:517:25: branch_false: ...to here fuse-3.16.2/lib/mount.c:521:12: branch_true: following 'true' branch (when 'res == -1')... fuse-3.16.2/lib/mount.c:526:21: branch_true: ...to here fuse-3.16.2/lib/mount.c:526:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:530:29: branch_false: ...to here fuse-3.16.2/lib/mount.c:530:28: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:532:33: throw: if 'fuse_log' throws an exception... fuse-3.16.2/lib/mount.c:532:33: danger: 'source' leaks here; was allocated at [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8) # 530| if (mo->blkdev && errno == ENODEV && # 531| !fuse_mnt_check_fuseblk()) # 532|-> fuse_log(FUSE_LOG_ERR, # 533| "fuse: 'fuseblk' support missing\n"); # 534| else Error: GCC_ANALYZER_WARNING (CWE-401): [#def24] fuse-3.16.2/lib/mount.c:532:33: warning[-Wanalyzer-malloc-leak]: leak of 'type' fuse-3.16.2/lib/mount.c:459:12: branch_false: following 'false' branch (when 'mnt' is non-NULL)... fuse-3.16.2/lib/mount.c:464:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:465:12: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:471:14: branch_false: ...to here fuse-3.16.2/lib/mount.c:472:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:483:9: branch_false: ...to here fuse-3.16.2/lib/mount.c:487:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:490:26: branch_false: ...to here fuse-3.16.2/lib/mount.c:494:16: acquire_memory: allocated here fuse-3.16.2/lib/mount.c:495:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:500:22: branch_false: ...to here fuse-3.16.2/lib/mount.c:509:12: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:512:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:517:25: branch_false: ...to here fuse-3.16.2/lib/mount.c:521:12: branch_true: following 'true' branch (when 'res == -1')... fuse-3.16.2/lib/mount.c:526:21: branch_true: ...to here fuse-3.16.2/lib/mount.c:526:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:530:29: branch_false: ...to here fuse-3.16.2/lib/mount.c:530:28: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:532:33: throw: if 'fuse_log' throws an exception... fuse-3.16.2/lib/mount.c:532:33: danger: 'type' leaks here; was allocated at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8) # 530| if (mo->blkdev && errno == ENODEV && # 531| !fuse_mnt_check_fuseblk()) # 532|-> fuse_log(FUSE_LOG_ERR, # 533| "fuse: 'fuseblk' support missing\n"); # 534| else Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] fuse-3.16.2/lib/mount.c:535:33: warning[-Wanalyzer-malloc-leak]: leak of 'source' fuse-3.16.2/lib/mount.c:459:12: branch_false: following 'false' branch (when 'mnt' is non-NULL)... fuse-3.16.2/lib/mount.c:464:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:465:12: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:471:14: branch_false: ...to here fuse-3.16.2/lib/mount.c:472:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:483:9: branch_false: ...to here fuse-3.16.2/lib/mount.c:487:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:490:26: branch_false: ...to here fuse-3.16.2/lib/mount.c:490:18: acquire_memory: allocated here fuse-3.16.2/lib/mount.c:495:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:500:22: branch_false: ...to here fuse-3.16.2/lib/mount.c:509:12: branch_true: following 'true' branch (when 'res == -1')... fuse-3.16.2/lib/mount.c:509:26: branch_true: ...to here fuse-3.16.2/lib/mount.c:521:12: branch_true: following 'true' branch (when 'res == -1')... fuse-3.16.2/lib/mount.c:526:21: branch_true: ...to here fuse-3.16.2/lib/mount.c:526:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:530:29: branch_false: ...to here fuse-3.16.2/lib/mount.c:535:33: throw: if 'fuse_log' throws an exception... fuse-3.16.2/lib/mount.c:535:33: danger: 'source' leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8) # 533| "fuse: 'fuseblk' support missing\n"); # 534| else # 535|-> fuse_log(FUSE_LOG_ERR, "fuse: mount failed: %s\n", # 536| strerror(errno_save)); # 537| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] fuse-3.16.2/lib/mount.c:535:33: warning[-Wanalyzer-malloc-leak]: leak of 'type' fuse-3.16.2/lib/mount.c:459:12: branch_false: following 'false' branch (when 'mnt' is non-NULL)... fuse-3.16.2/lib/mount.c:464:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:465:12: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:471:14: branch_false: ...to here fuse-3.16.2/lib/mount.c:472:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:483:9: branch_false: ...to here fuse-3.16.2/lib/mount.c:487:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:490:26: branch_false: ...to here fuse-3.16.2/lib/mount.c:494:16: acquire_memory: allocated here fuse-3.16.2/lib/mount.c:495:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:500:22: branch_false: ...to here fuse-3.16.2/lib/mount.c:509:12: branch_true: following 'true' branch (when 'res == -1')... fuse-3.16.2/lib/mount.c:509:26: branch_true: ...to here fuse-3.16.2/lib/mount.c:521:12: branch_true: following 'true' branch (when 'res == -1')... fuse-3.16.2/lib/mount.c:526:21: branch_true: ...to here fuse-3.16.2/lib/mount.c:526:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:530:29: branch_false: ...to here fuse-3.16.2/lib/mount.c:535:33: throw: if 'fuse_log' throws an exception... fuse-3.16.2/lib/mount.c:535:33: danger: 'type' leaks here; was allocated at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8) # 533| "fuse: 'fuseblk' support missing\n"); # 534| else # 535|-> fuse_log(FUSE_LOG_ERR, "fuse: mount failed: %s\n", # 536| strerror(errno_save)); # 537| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def27] fuse-3.16.2/lib/mount.c:544:32: warning[-Wanalyzer-malloc-leak]: leak of 'source' fuse-3.16.2/lib/mount.c:459:12: branch_false: following 'false' branch (when 'mnt' is non-NULL)... fuse-3.16.2/lib/mount.c:464:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:465:12: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:471:14: branch_false: ...to here fuse-3.16.2/lib/mount.c:472:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:483:9: branch_false: ...to here fuse-3.16.2/lib/mount.c:487:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:490:26: branch_false: ...to here fuse-3.16.2/lib/mount.c:490:18: acquire_memory: allocated here fuse-3.16.2/lib/mount.c:495:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:500:22: branch_false: ...to here fuse-3.16.2/lib/mount.c:543:12: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:544:32: branch_true: ...to here fuse-3.16.2/lib/mount.c:544:32: throw: if 'fuse_mnt_resolve_path' throws an exception... fuse-3.16.2/lib/mount.c:544:32: danger: 'source' leaks here; was allocated at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8) # 542| #ifndef IGNORE_MTAB # 543| if (geteuid() == 0) { # 544|-> char *newmnt = fuse_mnt_resolve_path("fuse", mnt); # 545| res = -1; # 546| if (!newmnt) Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] fuse-3.16.2/lib/mount.c:544:32: warning[-Wanalyzer-malloc-leak]: leak of 'type' fuse-3.16.2/lib/mount.c:459:12: branch_false: following 'false' branch (when 'mnt' is non-NULL)... fuse-3.16.2/lib/mount.c:464:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:465:12: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:471:14: branch_false: ...to here fuse-3.16.2/lib/mount.c:472:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:483:9: branch_false: ...to here fuse-3.16.2/lib/mount.c:487:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:490:26: branch_false: ...to here fuse-3.16.2/lib/mount.c:494:16: acquire_memory: allocated here fuse-3.16.2/lib/mount.c:495:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:500:22: branch_false: ...to here fuse-3.16.2/lib/mount.c:543:12: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:544:32: branch_true: ...to here fuse-3.16.2/lib/mount.c:544:32: throw: if 'fuse_mnt_resolve_path' throws an exception... fuse-3.16.2/lib/mount.c:544:32: danger: 'type' leaks here; was allocated at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8) # 542| #ifndef IGNORE_MTAB # 543| if (geteuid() == 0) { # 544|-> char *newmnt = fuse_mnt_resolve_path("fuse", mnt); # 545| res = -1; # 546| if (!newmnt) Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] fuse-3.16.2/lib/mount.c:549:23: warning[-Wanalyzer-malloc-leak]: leak of 'source' fuse-3.16.2/lib/mount.c:459:12: branch_false: following 'false' branch (when 'mnt' is non-NULL)... fuse-3.16.2/lib/mount.c:464:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:465:12: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:471:14: branch_false: ...to here fuse-3.16.2/lib/mount.c:472:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:483:9: branch_false: ...to here fuse-3.16.2/lib/mount.c:487:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:490:26: branch_false: ...to here fuse-3.16.2/lib/mount.c:490:18: acquire_memory: allocated here fuse-3.16.2/lib/mount.c:495:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:500:22: branch_false: ...to here fuse-3.16.2/lib/mount.c:543:12: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:544:32: branch_true: ...to here fuse-3.16.2/lib/mount.c:546:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:549:23: branch_false: ...to here fuse-3.16.2/lib/mount.c:549:23: throw: if 'fuse_mnt_add_mount' throws an exception... fuse-3.16.2/lib/mount.c:549:23: danger: 'source' leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8) # 547| goto out_umount; # 548| # 549|-> res = fuse_mnt_add_mount("fuse", source, newmnt, type, # 550| mnt_opts); # 551| free(newmnt); Error: GCC_ANALYZER_WARNING (CWE-401): [#def30] fuse-3.16.2/lib/mount.c:549:23: warning[-Wanalyzer-malloc-leak]: leak of 'type' fuse-3.16.2/lib/mount.c:459:12: branch_false: following 'false' branch (when 'mnt' is non-NULL)... fuse-3.16.2/lib/mount.c:464:15: branch_false: ...to here fuse-3.16.2/lib/mount.c:465:12: branch_false: following 'false' branch (when 'res != -1')... fuse-3.16.2/lib/mount.c:471:14: branch_false: ...to here fuse-3.16.2/lib/mount.c:472:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:483:9: branch_false: ...to here fuse-3.16.2/lib/mount.c:487:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:490:26: branch_false: ...to here fuse-3.16.2/lib/mount.c:494:16: acquire_memory: allocated here fuse-3.16.2/lib/mount.c:495:12: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:500:22: branch_false: ...to here fuse-3.16.2/lib/mount.c:543:12: branch_true: following 'true' branch... fuse-3.16.2/lib/mount.c:544:32: branch_true: ...to here fuse-3.16.2/lib/mount.c:546:20: branch_false: following 'false' branch... fuse-3.16.2/lib/mount.c:549:23: branch_false: ...to here fuse-3.16.2/lib/mount.c:549:23: throw: if 'fuse_mnt_add_mount' throws an exception... fuse-3.16.2/lib/mount.c:549:23: danger: 'type' leaks here; was allocated at [(9)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/8) # 547| goto out_umount; # 548| # 549|-> res = fuse_mnt_add_mount("fuse", source, newmnt, type, # 550| mnt_opts); # 551| free(newmnt); Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] fuse-3.16.2/test/test_write_cache.c:231:5: warning[-Wanalyzer-malloc-leak]: leak of 'buf' fuse-3.16.2/test/test_write_cache.c:209:11: acquire_memory: allocated here fuse-3.16.2/test/test_write_cache.c:210:5: branch_true: following 'true' branch (when 'buf' is non-NULL)... fuse-3.16.2/test/test_write_cache.c:211:5: branch_true: ...to here fuse-3.16.2/test/test_write_cache.c:211:5: branch_true: following 'true' branch... fuse-3.16.2/test/test_write_cache.c:212:5: branch_true: ...to here fuse-3.16.2/test/test_write_cache.c:212:5: branch_true: following 'true' branch... fuse-3.16.2/test/test_write_cache.c:213:5: branch_true: ...to here fuse-3.16.2/test/test_write_cache.c:215:5: branch_true: following 'true' branch... fuse-3.16.2/test/test_write_cache.c:217:10: branch_true: ...to here fuse-3.16.2/test/test_write_cache.c:218:8: branch_false: following 'false' branch... fuse-3.16.2/test/test_write_cache.c:223:9: branch_false: ...to here fuse-3.16.2/test/test_write_cache.c:231:5: throw: if 'write' throws an exception... fuse-3.16.2/test/test_write_cache.c:231:5: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0) # 229| } # 230| # 231|-> assert(write(fd, buf, dsize) == dsize); # 232| assert(write(fd, buf, dsize) == dsize); # 233| free(buf); Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] fuse-3.16.2/test/test_write_cache.c:232:5: warning[-Wanalyzer-malloc-leak]: leak of 'buf' fuse-3.16.2/test/test_write_cache.c:209:11: acquire_memory: allocated here fuse-3.16.2/test/test_write_cache.c:210:5: branch_true: following 'true' branch (when 'buf' is non-NULL)... fuse-3.16.2/test/test_write_cache.c:211:5: branch_true: ...to here fuse-3.16.2/test/test_write_cache.c:211:5: branch_true: following 'true' branch... fuse-3.16.2/test/test_write_cache.c:212:5: branch_true: ...to here fuse-3.16.2/test/test_write_cache.c:212:5: branch_true: following 'true' branch... fuse-3.16.2/test/test_write_cache.c:213:5: branch_true: ...to here fuse-3.16.2/test/test_write_cache.c:215:5: branch_true: following 'true' branch... fuse-3.16.2/test/test_write_cache.c:217:10: branch_true: ...to here fuse-3.16.2/test/test_write_cache.c:218:8: branch_false: following 'false' branch... fuse-3.16.2/test/test_write_cache.c:223:9: branch_false: ...to here fuse-3.16.2/test/test_write_cache.c:231:5: branch_true: following 'true' branch... fuse-3.16.2/test/test_write_cache.c:232:5: branch_true: ...to here fuse-3.16.2/test/test_write_cache.c:232:5: throw: if 'write' throws an exception... fuse-3.16.2/test/test_write_cache.c:232:5: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/0) # 230| # 231| assert(write(fd, buf, dsize) == dsize); # 232|-> assert(write(fd, buf, dsize) == dsize); # 233| free(buf); # 234| close(fd); Error: GCC_ANALYZER_WARNING (CWE-775): [#def33] fuse-3.16.2/util/fusermount.c:126:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'try_open_fuse_device(devp)' fuse-3.16.2/util/fusermount.c:1114:12: enter_function: entry to 'open_fuse_device' fuse-3.16.2/util/fusermount.c:1116:18: call_function: calling 'try_open_fuse_device' from 'open_fuse_device' fuse-3.16.2/util/fusermount.c:1116:18: return_function: returning to 'open_fuse_device' from 'try_open_fuse_device' fuse-3.16.2/util/fusermount.c:126:17: danger: 'try_open_fuse_device(devp)' leaks here; was opened at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5) # 124| { # 125| if (getuid() != 0) { # 126|-> setfsuid(oldfsuid); # 127| setfsgid(oldfsgid); # 128| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def34] fuse-3.16.2/util/fusermount.c:992:34: warning[-Wanalyzer-malloc-leak]: leak of 'dev' fuse-3.16.2/util/fusermount.c:1128:12: enter_function: entry to 'mount_fuse' fuse-3.16.2/util/fusermount.c:1139:14: call_function: calling 'open_fuse_device' from 'mount_fuse' fuse-3.16.2/util/fusermount.c:1139:14: return_function: returning to 'mount_fuse' from 'open_fuse_device' fuse-3.16.2/util/fusermount.c:1140:12: branch_false: following 'false' branch... fuse-3.16.2/util/fusermount.c:1143:9: branch_false: ...to here fuse-3.16.2/util/fusermount.c:1144:9: call_function: calling 'read_conf' from 'mount_fuse' fuse-3.16.2/util/fusermount.c:1144:9: return_function: returning to 'mount_fuse' from 'read_conf' fuse-3.16.2/util/fusermount.c:1154:15: call_function: calling 'check_perm' from 'mount_fuse' # 990| } else if (S_ISREG(stbuf->st_mode)) { # 991| static char procfile[256]; # 992|-> *mountpoint_fd = open(mnt, O_WRONLY); # 993| if (*mountpoint_fd == -1) { # 994| fprintf(stderr, "%s: failed to open %s: %s\n", Error: GCC_ANALYZER_WARNING (CWE-775): [#def35] fuse-3.16.2/util/fusermount.c:1089:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(dev, 2)' fuse-3.16.2/util/fusermount.c:1085:18: acquire_resource: opened here fuse-3.16.2/util/fusermount.c:1086:12: branch_true: following 'true' branch... fuse-3.16.2/util/fusermount.c:1087:25: branch_true: ...to here fuse-3.16.2/util/fusermount.c:1088:20: branch_true: following 'true' branch... fuse-3.16.2/util/fusermount.c:1089:25: branch_true: ...to here fuse-3.16.2/util/fusermount.c:1089:25: danger: 'open(dev, 2)' leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0) # 1087| *devp = strdup(dev); # 1088| if (*devp == NULL) { # 1089|-> fprintf(stderr, "%s: failed to allocate memory\n", # 1090| progname); # 1091| close(fd); Error: GCC_ANALYZER_WARNING (CWE-775): [#def36] fuse-3.16.2/util/fusermount.c:1117:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'try_open_fuse_device(devp)' fuse-3.16.2/util/fusermount.c:1114:12: enter_function: entry to 'open_fuse_device' fuse-3.16.2/util/fusermount.c:1116:18: call_function: calling 'try_open_fuse_device' from 'open_fuse_device' fuse-3.16.2/util/fusermount.c:1116:18: return_function: returning to 'open_fuse_device' from 'try_open_fuse_device' fuse-3.16.2/util/fusermount.c:1117:12: danger: 'try_open_fuse_device(devp)' leaks here; was opened at [(6)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/5) # 1115| { # 1116| int fd = try_open_fuse_device(devp); # 1117|-> if (fd >= -1) # 1118| return fd; # 1119| Error: GCC_ANALYZER_WARNING (CWE-401): [#def37] fuse-3.16.2/util/fusermount.c:1141:24: warning[-Wanalyzer-malloc-leak]: leak of 'dev' fuse-3.16.2/util/fusermount.c:1128:12: enter_function: entry to 'mount_fuse' fuse-3.16.2/util/fusermount.c:1139:14: call_function: calling 'open_fuse_device' from 'mount_fuse' fuse-3.16.2/util/fusermount.c:1139:14: return_function: returning to 'mount_fuse' from 'open_fuse_device' fuse-3.16.2/util/fusermount.c:1140:12: branch_true: following 'true' branch... fuse-3.16.2/util/fusermount.c:1141:24: branch_true: ...to here fuse-3.16.2/util/fusermount.c:1141:24: danger: 'dev' leaks here; was allocated at [(10)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/9) # 1139| fd = open_fuse_device(&dev); # 1140| if (fd == -1) # 1141|-> return -1; # 1142| # 1143| drop_privs();
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.92.0 |
| diffbase-analyzer-version-cppcheck | 2.19.1 |
| diffbase-analyzer-version-gcc | 16.0.0 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-126.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | fuse3-3.18.1-1.fc44 |
| diffbase-store-results-to | /tmp/tmpw2gh6yzp/fuse3-3.18.1-1.fc44.tar.xz |
| diffbase-time-created | 2026-01-08 16:14:03 |
| diffbase-time-finished | 2026-01-08 16:15:46 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpw2gh6yzp/fuse3-3.18.1-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpw2gh6yzp/fuse3-3.18.1-1.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-126.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | fuse3-3.16.2-5.fc42 |
| store-results-to | /tmp/tmpebxinnui/fuse3-3.16.2-5.fc42.tar.xz |
| time-created | 2026-01-08 16:11:19 |
| time-finished | 2026-01-08 16:13:34 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpebxinnui/fuse3-3.16.2-5.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpebxinnui/fuse3-3.16.2-5.fc42.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |