Task #90899 - added.err
back to task #90899download
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/example/notify_inval_entry.c:283:23: warning[-Wanalyzer-malloc-leak]: leak of 'old_name'
fuse-3.18.1/example/notify_inval_entry.c:272:14: enter_function: entry to 'update_fs_loop'
fuse-3.18.1/example/notify_inval_entry.c:277:11: branch_true: following 'true' branch...
fuse-3.18.1/example/notify_inval_entry.c:278:20: branch_true: ...to here
fuse-3.18.1/example/notify_inval_entry.c:278:20: acquire_memory: allocated here
fuse-3.18.1/example/notify_inval_entry.c:279:9: call_function: calling 'update_fs' from 'update_fs_loop'
fuse-3.18.1/example/notify_inval_entry.c:279:9: return_function: returning to 'update_fs_loop' from 'update_fs'
fuse-3.18.1/example/notify_inval_entry.c:281:12: branch_true: following 'true' branch...
fuse-3.18.1/example/notify_inval_entry.c:282:15: branch_true: following 'true' branch...
fuse-3.18.1/example/notify_inval_entry.c:283:23: branch_true: ...to here
fuse-3.18.1/example/notify_inval_entry.c:283:23: throw: if 'fuse_lowlevel_notify_expire_entry' throws an exception...
fuse-3.18.1/example/notify_inval_entry.c:283:23: danger: 'old_name' leaks here; was allocated at [(4)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/3)
# 281| if (!options.no_notify && lookup_cnt) {
# 282| if(options.only_expire) { // expire entry
# 283|-> ret = fuse_lowlevel_notify_expire_entry
# 284| (se, FUSE_ROOT_ID, old_name, strlen(old_name));
# 285|
Error: GCC_ANALYZER_WARNING (CWE-688):
fuse-3.18.1/example/notify_inval_entry.c:283:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'old_name' where non-null expected
fuse-3.18.1/example/notify_inval_entry.c:272:14: enter_function: entry to 'update_fs_loop'
fuse-3.18.1/example/notify_inval_entry.c:277:11: branch_true: following 'true' branch...
fuse-3.18.1/example/notify_inval_entry.c:278:20: branch_true: ...to here
fuse-3.18.1/example/notify_inval_entry.c:278:20: acquire_memory: this call could return NULL
fuse-3.18.1/example/notify_inval_entry.c:279:9: call_function: calling 'update_fs' from 'update_fs_loop'
fuse-3.18.1/example/notify_inval_entry.c:279:9: return_function: returning to 'update_fs_loop' from 'update_fs'
fuse-3.18.1/example/notify_inval_entry.c:281:12: branch_true: following 'true' branch...
fuse-3.18.1/example/notify_inval_entry.c:282:15: branch_true: following 'true' branch...
fuse-3.18.1/example/notify_inval_entry.c:283:23: branch_true: ...to here
fuse-3.18.1/example/notify_inval_entry.c:283:23: 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
# 281| if (!options.no_notify && lookup_cnt) {
# 282| if(options.only_expire) { // expire entry
# 283|-> ret = fuse_lowlevel_notify_expire_entry
# 284| (se, FUSE_ROOT_ID, old_name, strlen(old_name));
# 285|
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/example/notify_inval_entry.c:297:23: warning[-Wanalyzer-malloc-leak]: leak of 'old_name'
fuse-3.18.1/example/notify_inval_entry.c:272:14: enter_function: entry to 'update_fs_loop'
fuse-3.18.1/example/notify_inval_entry.c:277:11: branch_true: following 'true' branch...
fuse-3.18.1/example/notify_inval_entry.c:278:20: branch_true: ...to here
fuse-3.18.1/example/notify_inval_entry.c:278:20: acquire_memory: allocated here
fuse-3.18.1/example/notify_inval_entry.c:279:9: call_function: calling 'update_fs' from 'update_fs_loop'
fuse-3.18.1/example/notify_inval_entry.c:279:9: return_function: returning to 'update_fs_loop' from 'update_fs'
fuse-3.18.1/example/notify_inval_entry.c:297:23: throw: if 'fuse_lowlevel_notify_increment_epoch' throws an exception...
fuse-3.18.1/example/notify_inval_entry.c:297:23: danger: 'old_name' leaks here; was allocated at [(4)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/3)
# 295| assert(ret == 0 || ret == -ENOENT);
# 296| } else if (options.inc_epoch) { // increment epoch
# 297|-> ret = fuse_lowlevel_notify_increment_epoch(se);
# 298|
# 299| if (ret == -ENOSYS) {
Error: GCC_ANALYZER_WARNING (CWE-775):
fuse-3.18.1/example/passthrough_helpers.h:43:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
fuse-3.18.1/example/passthrough.c:401:12: enter_function: entry to 'xmp_fallocate'
fuse-3.18.1/example/passthrough.c:409:11: branch_true: following 'true' branch (when 'fi' is NULL)...
fuse-3.18.1/example/passthrough.c:410:22: branch_true: ...to here
fuse-3.18.1/example/passthrough.c:410:22: acquire_resource: opened here
fuse-3.18.1/example/passthrough.c:414:12: branch_false: following 'false' branch (when 'fd != -1')...
fuse-3.18.1/example/passthrough.c:417:15: branch_false: ...to here
fuse-3.18.1/example/passthrough.c:417:15: call_function: calling 'do_fallocate' from 'xmp_fallocate'
# 41| {
# 42| #ifdef HAVE_FALLOCATE
# 43|-> if (fallocate(fd, mode, offset, length) == -1)
# 44| return -errno;
# 45| return 0;
Error: GCC_ANALYZER_WARNING (CWE-775):
fuse-3.18.1/example/passthrough_ll.c:315:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dup(fd)'
fuse-3.18.1/example/passthrough_ll.c:335:12: enter_function: entry to 'fill_entry_param_new_inode'
fuse-3.18.1/example/passthrough_ll.c:345:12: branch_false: following 'false' branch (when 'res != -1')...
fuse-3.18.1/example/passthrough_ll.c:348:30: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:348:30: acquire_resource: opened here
fuse-3.18.1/example/passthrough_ll.c:348:30: call_function: calling 'create_new_inode' from 'fill_entry_param_new_inode'
# 313| struct lo_inode *prev, *next;
# 314|
# 315|-> inode = calloc(1, sizeof(struct lo_inode));
# 316| if (!inode)
# 317| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-775):
fuse-3.18.1/include/fuse_lowlevel.h:2143:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'lo.root.fd'
fuse-3.18.1/example/passthrough_ll.c:1283:5: enter_function: entry to 'main'
fuse-3.18.1/example/passthrough_ll.c:1301:12: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1303:13: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1303:12: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1310:20: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1310:19: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1317:12: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1317:11: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1324:13: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1324:12: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1327:20: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1329:12: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1345:29: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1346:19: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1351:14: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1371:22: acquire_resource: opened here
fuse-3.18.1/example/passthrough_ll.c:1372:12: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1378:14: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1378:14: call_function: calling 'fuse_session_new_fn' from 'main'
# 2141| };
# 2142|
# 2143|-> return fuse_session_new_versioned(args, op, op_size, &version,
# 2144| userdata);
# 2145| }
Error: GCC_ANALYZER_WARNING (CWE-775):
fuse-3.18.1/include/fuse_lowlevel.h:2143:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'sfd'
fuse-3.18.1/example/hello_ll_uds.c:312:5: enter_function: entry to 'main'
fuse-3.18.1/example/hello_ll_uds.c:326:12: branch_false: following 'false' branch...
fuse-3.18.1/example/hello_ll_uds.c:328:13: branch_false: ...to here
fuse-3.18.1/example/hello_ll_uds.c:328:12: branch_false: following 'false' branch...
fuse-3.18.1/example/hello_ll_uds.c:334:20: branch_false: ...to here
fuse-3.18.1/example/hello_ll_uds.c:334:19: branch_false: following 'false' branch...
fuse-3.18.1/example/hello_ll_uds.c:341:14: branch_false: ...to here
fuse-3.18.1/example/hello_ll_uds.c:343:12: branch_false: following 'false' branch...
fuse-3.18.1/example/hello_ll_uds.c:346:13: branch_false: ...to here
fuse-3.18.1/example/hello_ll_uds.c:346:12: branch_false: following 'false' branch...
fuse-3.18.1/example/hello_ll_uds.c:349:15: branch_false: ...to here
fuse-3.18.1/example/hello_ll_uds.c:349:15: call_function: calling 'create_socket' from 'main'
# 2141| };
# 2142|
# 2143|-> return fuse_session_new_versioned(args, op, op_size, &version,
# 2144| userdata);
# 2145| }
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/include/fuse_lowlevel.h:2143:16: warning[-Wanalyzer-malloc-leak]: leak of 'lo.source'
fuse-3.18.1/example/passthrough_ll.c:1283:5: enter_function: entry to 'main'
fuse-3.18.1/example/passthrough_ll.c:1301:12: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1303:13: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1303:12: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1310:20: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1310:19: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1317:12: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1317:11: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1324:13: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1324:12: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1327:20: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1329:12: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1345:29: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1345:29: acquire_memory: allocated here
fuse-3.18.1/example/passthrough_ll.c:1346:19: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1351:14: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1372:12: branch_false: following 'false' branch...
fuse-3.18.1/example/passthrough_ll.c:1378:14: branch_false: ...to here
fuse-3.18.1/example/passthrough_ll.c:1378:14: call_function: calling 'fuse_session_new_fn' from 'main'
# 2141| };
# 2142|
# 2143|-> return fuse_session_new_versioned(args, op, op_size, &version,
# 2144| userdata);
# 2145| }
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_loop_mt.c:103:17: warning[-Wanalyzer-malloc-leak]: leak of 'config'
fuse-3.18.1/lib/fuse_loop_mt.c:438:5: enter_function: entry to 'fuse_session_loop_mt_32'
fuse-3.18.1/lib/fuse_loop_mt.c:443:12: branch_false: following 'false' branch (when 'config_v1' is NULL)...
fuse-3.18.1/lib/fuse_loop_mt.c:452:15: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:452:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32'
# 101| if (!ch->ctr) {
# 102| pthread_mutex_unlock(&ch->lock);
# 103|-> close(ch->fd);
# 104| pthread_mutex_destroy(&ch->lock);
# 105| free(ch);
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_loop_mt.c:231:23: warning[-Wanalyzer-malloc-leak]: leak of 'config'
fuse-3.18.1/lib/fuse_loop_mt.c:438:5: enter_function: entry to 'fuse_session_loop_mt_32'
fuse-3.18.1/lib/fuse_loop_mt.c:443:12: branch_false: following 'false' branch (when 'config_v1' is NULL)...
fuse-3.18.1/lib/fuse_loop_mt.c:452:15: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:452:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32'
# 229| long size;
# 230|
# 231|-> res = libfuse_strtol(stack_size, &size);
# 232| if (res)
# 233| fuse_log(FUSE_LOG_ERR, "fuse: invalid stack size: %s\n",
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_loop_mt.c:231:23: warning[-Wanalyzer-malloc-leak]: leak of 'w'
fuse-3.18.1/lib/fuse_loop_mt.c:320:12: enter_function: entry to 'fuse_loop_start_thread'
fuse-3.18.1/lib/fuse_loop_mt.c:324:33: acquire_memory: allocated here
fuse-3.18.1/lib/fuse_loop_mt.c:325:12: branch_false: following 'false' branch (when 'w' is non-NULL)...
fuse-3.18.1/lib/fuse_loop_mt.c:329:9: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:334:12: branch_false: following 'false' branch...
fuse-3.18.1/lib/fuse_loop_mt.c:344:15: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:344:15: call_function: calling 'fuse_start_thread' from 'fuse_loop_start_thread'
# 229| long size;
# 230|
# 231|-> res = libfuse_strtol(stack_size, &size);
# 232| if (res)
# 233| fuse_log(FUSE_LOG_ERR, "fuse: invalid stack size: %s\n",
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_loop_mt.c:233:25: warning[-Wanalyzer-malloc-leak]: leak of 'config'
fuse-3.18.1/lib/fuse_loop_mt.c:438:5: enter_function: entry to 'fuse_session_loop_mt_32'
fuse-3.18.1/lib/fuse_loop_mt.c:443:12: branch_false: following 'false' branch (when 'config_v1' is NULL)...
fuse-3.18.1/lib/fuse_loop_mt.c:452:15: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:452:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32'
# 231| res = libfuse_strtol(stack_size, &size);
# 232| if (res)
# 233|-> fuse_log(FUSE_LOG_ERR, "fuse: invalid stack size: %s\n",
# 234| stack_size);
# 235| else if (pthread_attr_setstacksize(&attr, size))
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_loop_mt.c:233:25: warning[-Wanalyzer-malloc-leak]: leak of 'w'
fuse-3.18.1/lib/fuse_loop_mt.c:320:12: enter_function: entry to 'fuse_loop_start_thread'
fuse-3.18.1/lib/fuse_loop_mt.c:324:33: acquire_memory: allocated here
fuse-3.18.1/lib/fuse_loop_mt.c:325:12: branch_false: following 'false' branch (when 'w' is non-NULL)...
fuse-3.18.1/lib/fuse_loop_mt.c:329:9: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:334:12: branch_false: following 'false' branch...
fuse-3.18.1/lib/fuse_loop_mt.c:344:15: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:344:15: call_function: calling 'fuse_start_thread' from 'fuse_loop_start_thread'
# 231| res = libfuse_strtol(stack_size, &size);
# 232| if (res)
# 233|-> fuse_log(FUSE_LOG_ERR, "fuse: invalid stack size: %s\n",
# 234| stack_size);
# 235| else if (pthread_attr_setstacksize(&attr, size))
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_loop_mt.c:236:25: warning[-Wanalyzer-malloc-leak]: leak of 'config'
fuse-3.18.1/lib/fuse_loop_mt.c:438:5: enter_function: entry to 'fuse_session_loop_mt_32'
fuse-3.18.1/lib/fuse_loop_mt.c:443:12: branch_false: following 'false' branch (when 'config_v1' is NULL)...
fuse-3.18.1/lib/fuse_loop_mt.c:452:15: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:452:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32'
# 234| stack_size);
# 235| else if (pthread_attr_setstacksize(&attr, size))
# 236|-> fuse_log(FUSE_LOG_ERR, "fuse: could not set stack size: %ld\n",
# 237| size);
# 238| }
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_loop_mt.c:236:25: warning[-Wanalyzer-malloc-leak]: leak of 'w'
fuse-3.18.1/lib/fuse_loop_mt.c:320:12: enter_function: entry to 'fuse_loop_start_thread'
fuse-3.18.1/lib/fuse_loop_mt.c:324:33: acquire_memory: allocated here
fuse-3.18.1/lib/fuse_loop_mt.c:325:12: branch_false: following 'false' branch (when 'w' is non-NULL)...
fuse-3.18.1/lib/fuse_loop_mt.c:329:9: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:334:12: branch_false: following 'false' branch...
fuse-3.18.1/lib/fuse_loop_mt.c:344:15: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:344:15: call_function: calling 'fuse_start_thread' from 'fuse_loop_start_thread'
# 234| stack_size);
# 235| else if (pthread_attr_setstacksize(&attr, size))
# 236|-> fuse_log(FUSE_LOG_ERR, "fuse: could not set stack size: %ld\n",
# 237| size);
# 238| }
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_loop_mt.c:251:17: warning[-Wanalyzer-malloc-leak]: leak of 'config'
fuse-3.18.1/lib/fuse_loop_mt.c:438:5: enter_function: entry to 'fuse_session_loop_mt_32'
fuse-3.18.1/lib/fuse_loop_mt.c:443:12: branch_false: following 'false' branch (when 'config_v1' is NULL)...
fuse-3.18.1/lib/fuse_loop_mt.c:452:15: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:452:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_32'
# 249| pthread_attr_destroy(&attr);
# 250| if (res != 0) {
# 251|-> fuse_log(FUSE_LOG_ERR, "fuse: error creating thread: %s\n",
# 252| strerror(res));
# 253| return -1;
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_loop_mt.c:304:35: warning[-Wanalyzer-malloc-leak]: leak of 'w'
fuse-3.18.1/lib/fuse_loop_mt.c:320:12: enter_function: entry to 'fuse_loop_start_thread'
fuse-3.18.1/lib/fuse_loop_mt.c:324:33: acquire_memory: allocated here
fuse-3.18.1/lib/fuse_loop_mt.c:325:12: branch_false: following 'false' branch (when 'w' is non-NULL)...
fuse-3.18.1/lib/fuse_loop_mt.c:329:9: branch_false: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:334:12: branch_true: following 'true' branch...
fuse-3.18.1/lib/fuse_loop_mt.c:335:25: branch_true: ...to here
fuse-3.18.1/lib/fuse_loop_mt.c:335:25: call_function: calling 'fuse_clone_chan' from 'fuse_loop_start_thread'
# 302| if (se->io != NULL) {
# 303| if (se->io->clone_fd != NULL)
# 304|-> clonefd = se->io->clone_fd(se->fd);
# 305| else
# 306| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_loop_mt.c:467:18: warning[-Wanalyzer-malloc-leak]: leak of 'fuse_loop_cfg_create()'
fuse-3.18.1/lib/fuse_loop_mt.c:462:5: enter_function: entry to 'fuse_session_loop_mt_31'
fuse-3.18.1/lib/fuse_loop_mt.c:465:43: call_function: calling 'fuse_loop_cfg_create' from 'fuse_session_loop_mt_31'
fuse-3.18.1/lib/fuse_loop_mt.c:465:43: return_function: returning to 'fuse_session_loop_mt_31' from 'fuse_loop_cfg_create'
fuse-3.18.1/lib/fuse_loop_mt.c:468:15: call_function: calling 'fuse_session_loop_mt_312' from 'fuse_session_loop_mt_31'
# 465| struct fuse_loop_config *config = fuse_loop_cfg_create();
# 466| if (clone_fd > 0)
# 467|-> fuse_loop_cfg_set_clone_fd(config, clone_fd);
# 468| err = fuse_session_loop_mt_312(se, config);
# 469|
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_lowlevel.c:4342:22: warning[-Wanalyzer-malloc-leak]: leak of 'mountpoint'
fuse-3.18.1/lib/fuse_lowlevel.c:4325:12: branch_false: following 'false' branch (when '_mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: acquire_memory: allocated here
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: following 'false' branch (when 'mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4342:22: throw: if 'open' throws an exception...
fuse-3.18.1/lib/fuse_lowlevel.c:4342:22: danger: 'mountpoint' leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
# 4340| */
# 4341| do {
# 4342|-> fd = open("/dev/null", O_RDWR);
# 4343| if (fd > 2)
# 4344| close(fd);
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_lowlevel.c:4344:25: warning[-Wanalyzer-malloc-leak]: leak of 'mountpoint'
fuse-3.18.1/lib/fuse_lowlevel.c:4325:12: branch_false: following 'false' branch (when '_mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: acquire_memory: allocated here
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: following 'false' branch (when 'mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4344:25: throw: if 'close' throws an exception...
fuse-3.18.1/lib/fuse_lowlevel.c:4344:25: danger: 'mountpoint' leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
# 4342| fd = open("/dev/null", O_RDWR);
# 4343| if (fd > 2)
# 4344|-> close(fd);
# 4345| } while (fd >= 0 && fd <= 2);
# 4346|
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_lowlevel.c:4353:14: warning[-Wanalyzer-malloc-leak]: leak of 'mountpoint'
fuse-3.18.1/lib/fuse_lowlevel.c:4325:12: branch_false: following 'false' branch (when '_mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: acquire_memory: allocated here
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: following 'false' branch (when 'mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4345:18: branch_false: following 'false' branch...
fuse-3.18.1/lib/fuse_lowlevel.c:4353:14: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4353:14: throw: if 'fuse_mnt_parse_fuse_fd' throws an exception...
fuse-3.18.1/lib/fuse_lowlevel.c:4353:14: danger: 'mountpoint' leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
# 4351| * parent process takes care of performing the mount in this case.
# 4352| */
# 4353|-> fd = fuse_mnt_parse_fuse_fd(mountpoint);
# 4354| if (fd != -1) {
# 4355| if (fcntl(fd, F_GETFD) == -1) {
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_lowlevel.c:4355:21: warning[-Wanalyzer-malloc-leak]: leak of 'mountpoint'
fuse-3.18.1/lib/fuse_lowlevel.c:4325:12: branch_false: following 'false' branch (when '_mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: acquire_memory: allocated here
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: following 'false' branch (when 'mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4345:18: branch_false: following 'false' branch...
fuse-3.18.1/lib/fuse_lowlevel.c:4353:14: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4354:12: branch_true: following 'true' branch...
fuse-3.18.1/lib/fuse_lowlevel.c:4355:21: branch_true: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4355:21: throw: if 'fcntl' throws an exception...
fuse-3.18.1/lib/fuse_lowlevel.c:4355:21: danger: 'mountpoint' leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
# 4353| fd = fuse_mnt_parse_fuse_fd(mountpoint);
# 4354| if (fd != -1) {
# 4355|-> if (fcntl(fd, F_GETFD) == -1) {
# 4356| fuse_log(FUSE_LOG_ERR,
# 4357| "fuse: Invalid file descriptor /dev/fd/%u\n",
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_lowlevel.c:4356:25: warning[-Wanalyzer-malloc-leak]: leak of 'mountpoint'
fuse-3.18.1/lib/fuse_lowlevel.c:4325:12: branch_false: following 'false' branch (when '_mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: acquire_memory: allocated here
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: following 'false' branch (when 'mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4345:18: branch_false: following 'false' branch...
fuse-3.18.1/lib/fuse_lowlevel.c:4353:14: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4354:12: branch_true: following 'true' branch...
fuse-3.18.1/lib/fuse_lowlevel.c:4355:21: branch_true: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4355:20: branch_true: following 'true' branch...
fuse-3.18.1/lib/fuse_lowlevel.c:4356:25: branch_true: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4356:25: throw: if 'fuse_log' throws an exception...
fuse-3.18.1/lib/fuse_lowlevel.c:4356:25: danger: 'mountpoint' leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
# 4354| if (fd != -1) {
# 4355| if (fcntl(fd, F_GETFD) == -1) {
# 4356|-> fuse_log(FUSE_LOG_ERR,
# 4357| "fuse: Invalid file descriptor /dev/fd/%u\n",
# 4358| fd);
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_lowlevel.c:4366:14: warning[-Wanalyzer-malloc-leak]: leak of 'mountpoint'
fuse-3.18.1/lib/fuse_lowlevel.c:4325:12: branch_false: following 'false' branch (when '_mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: acquire_memory: allocated here
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: following 'false' branch (when 'mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4345:18: branch_false: following 'false' branch...
fuse-3.18.1/lib/fuse_lowlevel.c:4353:14: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4354:12: branch_false: following 'false' branch...
fuse-3.18.1/lib/fuse_lowlevel.c:4366:14: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4366:14: throw: if 'fuse_kern_mount' throws an exception...
fuse-3.18.1/lib/fuse_lowlevel.c:4366:14: danger: 'mountpoint' leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
# 4364|
# 4365| /* Open channel */
# 4366|-> fd = fuse_kern_mount(mountpoint, se->mo);
# 4367| if (fd == -1)
# 4368| goto error_out;
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/fuse_lowlevel.c:4379:1: warning[-Wanalyzer-malloc-leak]: leak of 'mountpoint'
fuse-3.18.1/lib/fuse_lowlevel.c:4325:12: branch_false: following 'false' branch (when '_mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4330:22: acquire_memory: allocated here
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: following 'false' branch (when 'mountpoint' is non-NULL)...
fuse-3.18.1/lib/fuse_lowlevel.c:4331:12: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4345:18: branch_false: following 'false' branch...
fuse-3.18.1/lib/fuse_lowlevel.c:4353:14: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4354:12: branch_true: following 'true' branch...
fuse-3.18.1/lib/fuse_lowlevel.c:4355:21: branch_true: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4355:20: branch_false: following 'false' branch...
fuse-3.18.1/lib/fuse_lowlevel.c:4361:17: branch_false: ...to here
fuse-3.18.1/lib/fuse_lowlevel.c:4379:1: danger: 'mountpoint' leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
# 4377| free(mountpoint);
# 4378| return -1;
# 4379|-> }
# 4380|
# 4381| int fuse_session_fd(struct fuse_session *se)
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/lib/modules/subdir.c:565:23: warning[-Wanalyzer-malloc-leak]: leak of 'newpath'
fuse-3.18.1/lib/modules/subdir.c:557:12: enter_function: entry to 'subdir_statx'
fuse-3.18.1/lib/modules/subdir.c:562:19: call_function: calling 'subdir_addpath' from 'subdir_statx'
fuse-3.18.1/lib/modules/subdir.c:562:19: return_function: returning to 'subdir_statx' from 'subdir_addpath'
fuse-3.18.1/lib/modules/subdir.c:564:12: branch_true: following 'true' branch...
fuse-3.18.1/lib/modules/subdir.c:565:23: branch_true: ...to here
fuse-3.18.1/lib/modules/subdir.c:565:23: throw: if 'fuse_fs_statx' throws an exception...
fuse-3.18.1/lib/modules/subdir.c:565:23: danger: 'newpath' leaks here; was allocated at [(6)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/5)
# 563|
# 564| if (!res) {
# 565|-> res = fuse_fs_statx(ic->next, newpath, flags, mask, stxbuf, fi);
# 566| free(newpath);
# 567| }
Error: GCC_ANALYZER_WARNING (CWE-688):
fuse-3.18.1/test/test_signals.c:159:9: warning[-Wanalyzer-null-argument]: use of NULL 'mountpoint' where non-null expected
fuse-3.18.1/test/test_signals.c:73:12: branch_true: following 'true' branch...
fuse-3.18.1/test/test_signals.c:74:17: branch_true: ...to here
fuse-3.18.1/test/test_signals.c:159:9: danger: argument 1 ('mountpoint') NULL where non-null expected
# 157| fuse_session_destroy(se);
# 158| out_free_mountpoint:
# 159|-> rmdir(mountpoint);
# 160| free(mountpoint);
# 161| out_free_args:
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/test/test_write_cache.c:251:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
fuse-3.18.1/test/test_write_cache.c:228:15: acquire_memory: allocated here
fuse-3.18.1/test/test_write_cache.c:229:9: branch_true: following 'true' branch (when 'buf' is non-NULL)...
fuse-3.18.1/test/test_write_cache.c:230:9: branch_true: ...to here
fuse-3.18.1/test/test_write_cache.c:230:9: branch_true: following 'true' branch...
fuse-3.18.1/test/test_write_cache.c:231:9: branch_true: ...to here
fuse-3.18.1/test/test_write_cache.c:231:9: branch_true: following 'true' branch...
fuse-3.18.1/test/test_write_cache.c:232:9: branch_true: ...to here
fuse-3.18.1/test/test_write_cache.c:234:9: branch_true: following 'true' branch...
fuse-3.18.1/test/test_write_cache.c:235:14: branch_true: ...to here
fuse-3.18.1/test/test_write_cache.c:236:12: branch_false: following 'false' branch...
fuse-3.18.1/test/test_write_cache.c:241:13: branch_false: ...to here
fuse-3.18.1/test/test_write_cache.c:250:27: branch_true: following 'true' branch (when 'cnt != 64')...
fuse-3.18.1/test/test_write_cache.c:251:17: branch_true: ...to here
fuse-3.18.1/test/test_write_cache.c:251:17: throw: if 'pwrite' throws an exception...
fuse-3.18.1/test/test_write_cache.c:251:17: danger: 'buf' leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
# 249|
# 250| for (int cnt = 0; cnt < WRITE_SYSCALLS; cnt++) {
# 251|-> assert(pwrite(fd, buf + off, iosize, off) == iosize);
# 252| off += iosize;
# 253| assert(off <= dsize);
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/util/fusermount.c:262:16: warning[-Wanalyzer-malloc-leak]: leak of 'source'
fuse-3.18.1/util/fusermount.c:1259:12: enter_function: entry to 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: call_function: calling 'open_fuse_device' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: return_function: returning to 'mount_fuse' from 'open_fuse_device'
fuse-3.18.1/util/fusermount.c:1273:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1276:9: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1288:14: call_function: calling 'extract_x_options' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1288:14: return_function: returning to 'mount_fuse' from 'extract_x_options'
fuse-3.18.1/util/fusermount.c:1289:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1292:15: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1292:15: call_function: calling 'check_perm' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1292:15: return_function: returning to 'mount_fuse' from 'check_perm'
fuse-3.18.1/util/fusermount.c:1293:9: call_function: calling 'restore_privs' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1293:9: return_function: returning to 'mount_fuse' from 'restore_privs'
fuse-3.18.1/util/fusermount.c:1294:12: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1295:23: branch_true: ...to here
fuse-3.18.1/util/fusermount.c:1295:23: call_function: calling 'do_mount' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1295:23: return_function: returning to 'mount_fuse' from 'do_mount'
fuse-3.18.1/util/fusermount.c:1298:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1301:12: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1301:12: branch_false: following 'false' branch (when 'res != -1')...
fuse-3.18.1/util/fusermount.c:1304:15: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1305:12: branch_false: following 'false' branch (when 'res != -1')...
fuse-3.18.1/util/fusermount.c:1310:13: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1310:12: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1311:21: branch_true: ...to here
fuse-3.18.1/util/fusermount.c:1311:20: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1311:31: branch_true: ...to here
fuse-3.18.1/util/fusermount.c:1311:21: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1333:23: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1333:23: call_function: inlined call to 'add_mount' from 'mount_fuse'
# 260| const char *opts)
# 261| {
# 262|-> return fuse_mnt_add_mount(progname, source, mnt, type, opts);
# 263| }
# 264|
Error: GCC_ANALYZER_WARNING (CWE-775):
fuse-3.18.1/util/fusermount.c:720:42: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open_fuse_device(dev)'
fuse-3.18.1/util/fusermount.c:1259:12: enter_function: entry to 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: call_function: calling 'open_fuse_device' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: return_function: returning to 'mount_fuse' from 'open_fuse_device'
fuse-3.18.1/util/fusermount.c:1273:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1276:9: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1276:9: call_function: calling 'drop_privs' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1276:9: return_function: returning to 'mount_fuse' from 'drop_privs'
fuse-3.18.1/util/fusermount.c:1277:9: call_function: calling 'read_conf' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1277:9: return_function: returning to 'mount_fuse' from 'read_conf'
fuse-3.18.1/util/fusermount.c:1279:12: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1280:35: call_function: calling 'count_fuse_fs' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1280:35: return_function: returning to 'mount_fuse' from 'count_fuse_fs'
fuse-3.18.1/util/fusermount.c:1281:20: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1282:25: branch_true: ...to here
fuse-3.18.1/util/fusermount.c:720:42: danger: 'open_fuse_device(dev)' leaks here; was opened at [(4)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/3)
# 718| while (fgets(line, sizeof(line), fp) != NULL) {
# 719| if (isnewline) {
# 720|-> if (line[strlen(line)-1] == '\n') {
# 721| strip_line(line);
# 722| parse_line(line, linenum);
Error: GCC_ANALYZER_WARNING (CWE-775):
fuse-3.18.1/util/fusermount.c:720:42: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/fuse.conf", "r")'
fuse-3.18.1/util/fusermount.c:1259:12: enter_function: entry to 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: call_function: calling 'open_fuse_device' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: return_function: returning to 'mount_fuse' from 'open_fuse_device'
fuse-3.18.1/util/fusermount.c:1273:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1276:9: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1276:9: call_function: calling 'drop_privs' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1276:9: return_function: returning to 'mount_fuse' from 'drop_privs'
fuse-3.18.1/util/fusermount.c:1277:9: call_function: calling 'read_conf' from 'mount_fuse'
# 718| while (fgets(line, sizeof(line), fp) != NULL) {
# 719| if (isnewline) {
# 720|-> if (line[strlen(line)-1] == '\n') {
# 721| strip_line(line);
# 722| parse_line(line, linenum);
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/util/fusermount.c:720:42: warning[-Wanalyzer-malloc-leak]: leak of 'fopen("/etc/fuse.conf", "r")'
fuse-3.18.1/util/fusermount.c:1259:12: enter_function: entry to 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: call_function: calling 'open_fuse_device' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: return_function: returning to 'mount_fuse' from 'open_fuse_device'
fuse-3.18.1/util/fusermount.c:1273:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1276:9: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1276:9: call_function: calling 'drop_privs' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1276:9: return_function: returning to 'mount_fuse' from 'drop_privs'
fuse-3.18.1/util/fusermount.c:1277:9: call_function: calling 'read_conf' from 'mount_fuse'
# 718| while (fgets(line, sizeof(line), fp) != NULL) {
# 719| if (isnewline) {
# 720|-> if (line[strlen(line)-1] == '\n') {
# 721| strip_line(line);
# 722| parse_line(line, linenum);
Error: GCC_ANALYZER_WARNING (CWE-775):
fuse-3.18.1/util/fusermount.c:738:20: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen("/etc/fuse.conf", "r")'
fuse-3.18.1/util/fusermount.c:1259:12: enter_function: entry to 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: call_function: calling 'open_fuse_device' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: return_function: returning to 'mount_fuse' from 'open_fuse_device'
fuse-3.18.1/util/fusermount.c:1273:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1276:9: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1276:9: call_function: calling 'drop_privs' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1276:9: return_function: returning to 'mount_fuse' from 'drop_privs'
fuse-3.18.1/util/fusermount.c:1277:9: call_function: calling 'read_conf' from 'mount_fuse'
# 736|
# 737| }
# 738|-> if (ferror(fp)) {
# 739| fprintf(stderr, "%s: reading %s: read failed\n", progname, FUSE_CONF);
# 740| exit(1);
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/util/fusermount.c:738:20: warning[-Wanalyzer-malloc-leak]: leak of 'fopen("/etc/fuse.conf", "r")'
fuse-3.18.1/util/fusermount.c:1259:12: enter_function: entry to 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: call_function: calling 'open_fuse_device' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: return_function: returning to 'mount_fuse' from 'open_fuse_device'
fuse-3.18.1/util/fusermount.c:1273:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1276:9: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1276:9: call_function: calling 'drop_privs' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1276:9: return_function: returning to 'mount_fuse' from 'drop_privs'
fuse-3.18.1/util/fusermount.c:1277:9: call_function: calling 'read_conf' from 'mount_fuse'
# 736|
# 737| }
# 738|-> if (ferror(fp)) {
# 739| fprintf(stderr, "%s: reading %s: read failed\n", progname, FUSE_CONF);
# 740| exit(1);
Error: GCC_ANALYZER_WARNING (CWE-688):
fuse-3.18.1/util/fusermount.c:1322:33: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'x_mnt_opts' where non-null expected
fuse-3.18.1/util/fusermount.c:1259:12: enter_function: entry to 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: call_function: calling 'open_fuse_device' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: return_function: returning to 'mount_fuse' from 'open_fuse_device'
fuse-3.18.1/util/fusermount.c:1273:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1276:9: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1288:14: call_function: calling 'extract_x_options' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1288:14: return_function: returning to 'mount_fuse' from 'extract_x_options'
fuse-3.18.1/util/fusermount.c:1289:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1292:15: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1292:15: call_function: calling 'check_perm' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1292:15: return_function: returning to 'mount_fuse' from 'check_perm'
fuse-3.18.1/util/fusermount.c:1293:9: call_function: calling 'restore_privs' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1293:9: return_function: returning to 'mount_fuse' from 'restore_privs'
fuse-3.18.1/util/fusermount.c:1294:12: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1295:23: branch_true: ...to here
fuse-3.18.1/util/fusermount.c:1295:23: call_function: calling 'do_mount' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1295:23: return_function: returning to 'mount_fuse' from 'do_mount'
fuse-3.18.1/util/fusermount.c:1298:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1301:12: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1301:12: branch_false: following 'false' branch (when 'res != -1')...
fuse-3.18.1/util/fusermount.c:1304:15: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1305:12: branch_false: following 'false' branch (when 'res != -1')...
fuse-3.18.1/util/fusermount.c:1310:13: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1310:12: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1311:21: branch_true: ...to here
fuse-3.18.1/util/fusermount.c:1311:20: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1319:44: acquire_memory: this call could return NULL
fuse-3.18.1/util/fusermount.c:1321:28: branch_true: following 'true' branch (when 'mnt_opts_len != 0')...
fuse-3.18.1/util/fusermount.c:1322:33: branch_true: ...to here
fuse-3.18.1/util/fusermount.c:1322:33: danger: argument 1 ('x_mnt_opts') from [(119)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/118) could be NULL where non-null expected
# 1320|
# 1321| if (mnt_opts_len) {
# 1322|-> strcpy(x_mnt_opts, mnt_opts);
# 1323| strncat(x_mnt_opts, ",", 2);
# 1324| }
Error: GCC_ANALYZER_WARNING (CWE-688):
fuse-3.18.1/util/fusermount.c:1326:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'x_mnt_opts' where non-null expected
fuse-3.18.1/util/fusermount.c:1259:12: enter_function: entry to 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: call_function: calling 'open_fuse_device' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: return_function: returning to 'mount_fuse' from 'open_fuse_device'
fuse-3.18.1/util/fusermount.c:1273:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1276:9: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1288:14: call_function: calling 'extract_x_options' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1288:14: return_function: returning to 'mount_fuse' from 'extract_x_options'
fuse-3.18.1/util/fusermount.c:1289:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1292:15: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1292:15: call_function: calling 'check_perm' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1292:15: return_function: returning to 'mount_fuse' from 'check_perm'
fuse-3.18.1/util/fusermount.c:1293:9: call_function: calling 'restore_privs' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1293:9: return_function: returning to 'mount_fuse' from 'restore_privs'
fuse-3.18.1/util/fusermount.c:1294:12: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1295:23: branch_true: ...to here
fuse-3.18.1/util/fusermount.c:1295:23: call_function: calling 'do_mount' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1295:23: return_function: returning to 'mount_fuse' from 'do_mount'
fuse-3.18.1/util/fusermount.c:1298:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1301:12: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1301:12: branch_false: following 'false' branch (when 'res != -1')...
fuse-3.18.1/util/fusermount.c:1304:15: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1305:12: branch_false: following 'false' branch (when 'res != -1')...
fuse-3.18.1/util/fusermount.c:1310:13: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1310:12: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1311:21: branch_true: ...to here
fuse-3.18.1/util/fusermount.c:1311:20: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1319:44: acquire_memory: this call could return NULL
fuse-3.18.1/util/fusermount.c:1321:28: branch_false: following 'false' branch (when 'mnt_opts_len == 0')...
fuse-3.18.1/util/fusermount.c:1327:33: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1326:25: danger: argument 1 ('x_mnt_opts') from [(119)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/118) could be NULL where non-null expected
# 1324| }
# 1325|
# 1326|-> strncat(x_mnt_opts, x_opts,
# 1327| x_mnt_opts_len - mnt_opts_len - 2);
# 1328|
Error: GCC_ANALYZER_WARNING (CWE-401):
fuse-3.18.1/util/fusermount.c:1349:9: warning[-Wanalyzer-malloc-leak]: leak of 'do_mount_opts'
fuse-3.18.1/util/fusermount.c:1259:12: enter_function: entry to 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: call_function: calling 'open_fuse_device' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1272:14: return_function: returning to 'mount_fuse' from 'open_fuse_device'
fuse-3.18.1/util/fusermount.c:1273:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1276:9: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1288:14: call_function: calling 'extract_x_options' from 'mount_fuse'
fuse-3.18.1/util/fusermount.c:1288:14: return_function: returning to 'mount_fuse' from 'extract_x_options'
fuse-3.18.1/util/fusermount.c:1289:12: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1290:17: branch_true: ...to here
fuse-3.18.1/util/fusermount.c:1349:9: throw: if 'close' throws an exception...
fuse-3.18.1/util/fusermount.c:1349:9: danger: 'do_mount_opts' leaks here; was allocated at [(11)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/10)
# 1347|
# 1348| fail_close_fd:
# 1349|-> close(fd);
# 1350| fd = -1;
# 1351| goto out_free;
Error: GCC_ANALYZER_WARNING (CWE-775):
fuse-3.18.1/util/fusermount.c:1559:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/null", 2)'
fuse-3.18.1/util/fusermount.c:1524:12: branch_false: following 'false' branch (when 'cfd > 2')...
fuse-3.18.1/util/fusermount.c:1528:12: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1549:18: acquire_resource: opened here
fuse-3.18.1/util/fusermount.c:1550:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1556:9: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1559:12: danger: 'open("/dev/null", 2)' leaks here; was opened at [(3)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/2)
# 1557| dup2(nullfd, STDOUT_FILENO);
# 1558| dup2(nullfd, STDERR_FILENO);
# 1559|-> if (nullfd > STDERR_FILENO)
# 1560| close(nullfd);
# 1561|
Error: GCC_ANALYZER_WARNING (CWE-775):
fuse-3.18.1/util/fusermount.c:1560:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/null", 2)'
fuse-3.18.1/util/fusermount.c:1524:12: branch_false: following 'false' branch (when 'cfd > 2')...
fuse-3.18.1/util/fusermount.c:1528:12: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1549:18: acquire_resource: opened here
fuse-3.18.1/util/fusermount.c:1550:12: branch_false: following 'false' branch...
fuse-3.18.1/util/fusermount.c:1556:9: branch_false: ...to here
fuse-3.18.1/util/fusermount.c:1559:12: branch_true: following 'true' branch...
fuse-3.18.1/util/fusermount.c:1560:17: branch_true: ...to here
fuse-3.18.1/util/fusermount.c:1560:17: danger: 'open("/dev/null", 2)' leaks here; was opened at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
# 1558| dup2(nullfd, STDERR_FILENO);
# 1559| if (nullfd > STDERR_FILENO)
# 1560|-> close(nullfd);
# 1561|
# 1562| return 0;