View Issue Details

IDProjectCategoryView StatusLast Update
0010107Talerqtartpublic2025-08-31 17:09
Reporteroec Assigned ToFlorian Dold Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PriorityurgentSeveritycrashReproducibilityrandom
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version1.0 stretch goalsFixed in Version1.0 stretch goals 
Summary0010107: call of js_free on uninitialized pointer
DescriptionIn quickjs-libc.c, function `js_os_post_message_from_host`:

```c
4452 int
4453 js_os_post_message_from_host(JSContext *ctx, const char *msg_str)
4454 {
4455 JSThreadState *ts = JS_GetRuntimeOpaque(JS_GetRuntime(ctx));
4456 JSHostMessage *msg;
4457 JSHostMessagePipe *hp;
4458 uint8_t *data;
4459
...
4491 js_free(ctx, data);
4492 return -1;
4493 }
```

`data` is never initialized. Yet, it is freed in line 4491. This might lead to a crash of qtart.
Additional InformationThe compiler had warned me. Why has this not been fixed already!?
Tagssecurity

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Florian Dold

2025-06-16 22:35

manager   ~0025266

commit be93b6ac80f366d400abe7aaffb1e53d231cae32 (HEAD -> master, origin/master, origin/HEAD)
Author: Florian Dold <florian@dold.me>
Date: Tue Jun 17 00:35:18 2025 +0200

    fix 0010107: call of js_free on uninitialized pointer

Florian Dold

2025-06-16 22:35

manager   ~0025267

Looks like only clang detects this with default warnings, gcc doesn't! That's why we didn't notice/fix this earlier.

Issue History

Date ModifiedUsernameFieldChange
2025-06-15 11:12oecNew Issue
2025-06-15 11:17oecDescription Updated
2025-06-15 12:58Christian GrothoffAssigned To => Florian Dold
2025-06-15 12:58Christian GrothoffPrioritynormal => urgent
2025-06-15 12:58Christian GrothoffStatusnew => assigned
2025-06-15 12:58Christian GrothoffTarget Version => 1.0 stretch goals
2025-06-15 12:58Christian GrothoffTag Attached: security
2025-06-16 22:35Florian DoldNote Added: 0025266
2025-06-16 22:35Florian DoldNote Added: 0025267
2025-06-16 22:36Florian DoldStatusassigned => informing
2025-06-16 22:36Florian DoldResolutionopen => fixed
2025-06-29 21:27Christian GrothoffFixed in Version => 1.0 stretch goals
2025-08-31 17:09Christian GrothoffStatusinforming => closed