cve_id
stringlengths 13
16
| obtain_all_privilege
stringclasses 3
values | obtain_user_privilege
stringclasses 2
values | obtain_other_privilege
stringclasses 2
values | user_interaction_required
stringclasses 3
values | cvss2_vector_string
stringclasses 106
values | cvss2_access_vector
stringclasses 4
values | cvss2_access_complexity
stringclasses 4
values | cvss2_authentication
stringclasses 3
values | cvss2_confidentiality_impact
stringclasses 4
values | cvss2_integrity_impact
stringclasses 4
values | cvss2_availability_impact
stringclasses 4
values | cvss2_base_score
stringclasses 50
values | cvss3_vector_string
stringclasses 226
values | cvss3_attack_vector
stringclasses 5
values | cvss3_attack_complexity
stringclasses 3
values | cvss3_privileges_required
stringclasses 4
values | cvss3_user_interaction
stringclasses 3
values | cvss3_scope
stringclasses 3
values | cvss3_confidentiality_impact
stringclasses 4
values | cvss3_integrity_impact
stringclasses 4
values | cvss3_availability_impact
stringclasses 4
values | cvss3_base_score
stringclasses 55
values | cvss3_base_severity
stringclasses 5
values | exploitability_score
stringclasses 22
values | impact_score
stringclasses 15
values | ac_insuf_info
stringclasses 3
values | reference_json
stringlengths 221
23.3k
| problemtype_json
stringclasses 200
values | severity
stringclasses 4
values | cve_nodes
stringlengths 2
33.1k
| cve_description
stringlengths 64
1.99k
| cve_last_modified_date
stringlengths 17
17
| cve_published_date
stringlengths 17
17
| cwe_name
stringclasses 125
values | cwe_description
stringclasses 124
values | cwe_extended_description
stringclasses 95
values | cwe_url
stringclasses 124
values | cwe_is_category
int64 0
1
| commit_author
stringlengths 0
34
| commit_author_date
stringlengths 25
25
| commit_msg
stringlengths 0
13.3k
| commit_hash
stringlengths 40
40
| commit_is_merge
stringclasses 1
value | repo_name
stringclasses 467
values | repo_description
stringclasses 459
values | repo_date_created
stringclasses 467
values | repo_date_last_push
stringclasses 467
values | repo_homepage
stringclasses 294
values | repo_owner
stringclasses 470
values | repo_stars
stringclasses 406
values | repo_forks
stringclasses 352
values | function_name
stringlengths 3
120
| function_signature
stringlengths 6
640
| function_parameters
stringlengths 2
302
| function
stringlengths 12
114k
| function_token_count
stringlengths 1
5
| function_before_change
stringclasses 1
value | labels
int64 1
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CVE-2021-40566 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/issues/1887', 'name': 'https://github.com/gpac/gpac/issues/1887', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/96047e0e6166407c40cc19f4e94fb35cd7624391', 'name': 'https://github.com/gpac/gpac/commit/96047e0e6166407c40cc19f4e94fb35cd7624391', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.0.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'A Segmentation fault casued by heap use after free vulnerability exists in Gpac through 1.0.1 via the mpgviddmx_process function in reframe_mpgvid.c when using mp4box, which causes a denial of service.'}] | 2022-01-14T13:52Z | 2022-01-12T22:15Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | jeanlf | 2021-08-30 15:46:16+02:00 | fixed #1887 | 96047e0e6166407c40cc19f4e94fb35cd7624391 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | xviddec_configure_pid | xviddec_configure_pid( GF_Filter * filter , GF_FilterPid * pid , Bool is_remove) | ['filter', 'pid', 'is_remove'] | static GF_Err xviddec_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
{
const GF_PropertyValue *p;
GF_M4VDecSpecInfo dsi;
GF_Err e;
Bool is_first = GF_FALSE;
#ifdef XVID_USE_OLD_API
XVID_DEC_FRAME frame;
XVID_DEC_PARAM par;
#else
xvid_dec_frame_t frame;
xvid_dec_create_t par;
#endif
GF_XVIDCtx *ctx = gf_filter_get_udta(filter);
if (is_remove) {
if (ctx->opid) {
gf_filter_pid_remove(ctx->opid);
ctx->opid = NULL;
}
ctx->ipid = NULL;
return GF_OK;
}
if (! gf_filter_pid_check_caps(pid))
return GF_NOT_SUPPORTED;
ctx->ipid = pid;
if (!ctx->opid) {
ctx->opid = gf_filter_pid_new(filter);
gf_filter_pid_set_framing_mode(ctx->ipid, GF_TRUE);
is_first = GF_TRUE;
}
//copy properties at init or reconfig
gf_filter_pid_copy_properties(ctx->opid, ctx->ipid);
gf_filter_pid_set_property(ctx->opid, GF_PROP_PID_CODECID, &PROP_UINT(GF_CODECID_RAW) );
p = gf_filter_pid_get_property(pid, GF_PROP_PID_DECODER_CONFIG);
if (p && p->value.data.ptr && p->value.data.size) {
u32 ex_crc = gf_crc_32(p->value.data.ptr, p->value.data.size);
if (ctx->cfg_crc == ex_crc) return GF_OK;
//shoud we flush ?
if (ctx->codec) xvid_decore(ctx->codec, XVID_DEC_DESTROY, NULL, NULL);
ctx->codec = NULL;
ctx->cfg_crc = ex_crc;
} else if (!is_first) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CODEC, ("[XVID] Reconfiguring without DSI not yet supported\n"));
return GF_NOT_SUPPORTED;
} else {
return GF_OK;
}
/*decode DSI*/
e = gf_m4v_get_config(p->value.data.ptr, p->value.data.size, &dsi);
if (e) return e;
if (!dsi.width || !dsi.height) return GF_NON_COMPLIANT_BITSTREAM;
memset(&par, 0, sizeof(par));
par.width = dsi.width;
par.height = dsi.height;
/*note that this may be irrelevant when used through systems (FPS is driven by systems CTS)*/
ctx->FPS = dsi.clock_rate;
ctx->FPS /= 1000;
if (!ctx->FPS) ctx->FPS = 30.0f;
ctx->pixel_ar.num = dsi.par_num;
ctx->pixel_ar.den = dsi.par_den;
#ifndef XVID_USE_OLD_API
par.version = XVID_VERSION;
#endif
if (xvid_decore(NULL, XVID_DEC_CREATE, &par, NULL) < 0) return GF_NON_COMPLIANT_BITSTREAM;
ctx->width = par.width;
ctx->height = par.height;
ctx->codec = par.handle;
/*init decoder*/
memset(&frame, 0, sizeof(frame));
frame.bitstream = (void *) p->value.data.ptr;
frame.length = p->value.data.size;
#ifndef XVID_USE_OLD_API
frame.version = XVID_VERSION;
xvid_decore(ctx->codec, XVID_DEC_DECODE, &frame, NULL);
#else
/*don't perform error check, XviD doesn't like DSI only frame ...*/
xvid_decore(ctx->codec, XVID_DEC_DECODE, &frame, NULL);
#endif
ctx->first_frame = GF_TRUE;
ctx->out_size = ctx->width * ctx->height * 3 / 2;
gf_filter_pid_set_property(ctx->opid, GF_PROP_PID_WIDTH, &PROP_UINT(ctx->width) );
gf_filter_pid_set_property(ctx->opid, GF_PROP_PID_HEIGHT, &PROP_UINT(ctx->height) );
gf_filter_pid_set_property(ctx->opid, GF_PROP_PID_STRIDE, &PROP_UINT(ctx->width) );
gf_filter_pid_set_property(ctx->opid, GF_PROP_PID_PAR, &PROP_FRAC(ctx->pixel_ar) );
gf_filter_pid_set_property(ctx->opid, GF_PROP_PID_PIXFMT, &PROP_UINT(GF_PIXEL_YUV) );
return GF_OK;
} | 642 | True | 1 |
CVE-2021-40566 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/issues/1887', 'name': 'https://github.com/gpac/gpac/issues/1887', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/96047e0e6166407c40cc19f4e94fb35cd7624391', 'name': 'https://github.com/gpac/gpac/commit/96047e0e6166407c40cc19f4e94fb35cd7624391', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.0.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'A Segmentation fault casued by heap use after free vulnerability exists in Gpac through 1.0.1 via the mpgviddmx_process function in reframe_mpgvid.c when using mp4box, which causes a denial of service.'}] | 2022-01-14T13:52Z | 2022-01-12T22:15Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | jeanlf | 2021-08-30 15:46:16+02:00 | fixed #1887 | 96047e0e6166407c40cc19f4e94fb35cd7624391 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | mpgviddmx_process | mpgviddmx_process( GF_Filter * filter) | ['filter'] | GF_Err mpgviddmx_process(GF_Filter *filter)
{
GF_MPGVidDmxCtx *ctx = gf_filter_get_udta(filter);
GF_FilterPacket *pck, *dst_pck;
u64 byte_offset;
s64 vosh_start = -1;
s64 vosh_end = -1;
GF_Err e;
char *data;
u8 *start;
u32 pck_size;
s32 remain;
//always reparse duration
if (!ctx->duration.num)
mpgviddmx_check_dur(filter, ctx);
pck = gf_filter_pid_get_packet(ctx->ipid);
if (!pck) {
if (gf_filter_pid_is_eos(ctx->ipid)) {
mpgviddmx_enqueue_or_dispatch(ctx, NULL, GF_TRUE, GF_TRUE);
if (ctx->opid)
gf_filter_pid_set_eos(ctx->opid);
if (ctx->src_pck) gf_filter_pck_unref(ctx->src_pck);
ctx->src_pck = NULL;
return GF_EOS;
}
return GF_OK;
}
data = (char *) gf_filter_pck_get_data(pck, &pck_size);
byte_offset = gf_filter_pck_get_byte_offset(pck);
start = data;
remain = pck_size;
//input pid sets some timescale - we flushed pending data , update cts
if (!ctx->resume_from && ctx->timescale) {
u64 ts = gf_filter_pck_get_cts(pck);
if (ts != GF_FILTER_NO_TS) {
if (!ctx->cts || !ctx->recompute_cts)
ctx->cts = ts;
}
ts = gf_filter_pck_get_dts(pck);
if (ts != GF_FILTER_NO_TS) {
if (!ctx->dts || !ctx->recompute_cts)
ctx->dts = ts;
if (!ctx->prev_dts) ctx->prev_dts = ts;
else if (ctx->prev_dts != ts) {
u64 diff = ts;
diff -= ctx->prev_dts;
if (!ctx->cur_fps.den) ctx->cur_fps.den = (u32) diff;
else if (ctx->cur_fps.den > diff)
ctx->cur_fps.den = (u32) diff;
}
}
gf_filter_pck_get_framing(pck, &ctx->input_is_au_start, &ctx->input_is_au_end);
//this will force CTS recomput of each frame
if (ctx->recompute_cts) ctx->input_is_au_start = GF_FALSE;
if (ctx->src_pck) gf_filter_pck_unref(ctx->src_pck);
ctx->src_pck = pck;
gf_filter_pck_ref_props(&ctx->src_pck);
}
//we stored some data to find the complete vosh, aggregate this packet with current one
if (!ctx->resume_from && ctx->hdr_store_size) {
if (ctx->hdr_store_alloc < ctx->hdr_store_size + pck_size) {
ctx->hdr_store_alloc = ctx->hdr_store_size + pck_size;
ctx->hdr_store = gf_realloc(ctx->hdr_store, sizeof(char)*ctx->hdr_store_alloc);
}
memcpy(ctx->hdr_store + ctx->hdr_store_size, data, sizeof(char)*pck_size);
if (byte_offset != GF_FILTER_NO_BO) {
if (byte_offset >= ctx->hdr_store_size)
byte_offset -= ctx->hdr_store_size;
else
byte_offset = GF_FILTER_NO_BO;
}
ctx->hdr_store_size += pck_size;
start = data = ctx->hdr_store;
remain = pck_size = ctx->hdr_store_size;
}
if (ctx->resume_from) {
if (gf_filter_pid_would_block(ctx->opid))
return GF_OK;
//resume from data copied internally
if (ctx->hdr_store_size) {
assert(ctx->resume_from <= ctx->hdr_store_size);
start = data = ctx->hdr_store + ctx->resume_from;
remain = pck_size = ctx->hdr_store_size - ctx->resume_from;
} else {
assert(remain >= (s32) ctx->resume_from);
start += ctx->resume_from;
remain -= ctx->resume_from;
}
ctx->resume_from = 0;
}
if (!ctx->bs) {
ctx->bs = gf_bs_new(start, remain, GF_BITSTREAM_READ);
} else {
gf_bs_reassign_buffer(ctx->bs, start, remain);
}
if (!ctx->vparser) {
ctx->vparser = gf_m4v_parser_bs_new(ctx->bs, ctx->is_mpg12);
}
while (remain) {
Bool full_frame;
u8 *pck_data;
s32 current;
u8 sc_type, forced_sc_type=0;
Bool sc_type_forced = GF_FALSE;
Bool skip_pck = GF_FALSE;
u8 ftype;
u32 tinc;
u64 size=0;
u64 fstart;
Bool is_coded;
u32 bytes_from_store = 0;
u32 hdr_offset = 0;
Bool copy_last_bytes = GF_FALSE;
//not enough bytes to parse start code
if (remain<5) {
memcpy(ctx->hdr_store, start, remain);
ctx->bytes_in_header = remain;
break;
}
current = -1;
//we have some potential bytes of a start code in the store, copy some more bytes and check if valid start code.
//if not, dispatch these bytes as continuation of the data
if (ctx->bytes_in_header) {
memcpy(ctx->hdr_store + ctx->bytes_in_header, start, 8 - ctx->bytes_in_header);
current = mpgviddmx_next_start_code(ctx->hdr_store, 8);
//no start code in stored buffer
if ((current<0) || (current >= (s32) ctx->bytes_in_header) ) {
if (ctx->opid) {
dst_pck = gf_filter_pck_new_alloc(ctx->opid, ctx->bytes_in_header, &pck_data);
if (!dst_pck) return GF_OUT_OF_MEM;
if (ctx->src_pck) gf_filter_pck_merge_properties(ctx->src_pck, dst_pck);
gf_filter_pck_set_cts(dst_pck, GF_FILTER_NO_TS);
gf_filter_pck_set_dts(dst_pck, GF_FILTER_NO_TS);
memcpy(pck_data, ctx->hdr_store, ctx->bytes_in_header);
gf_filter_pck_set_framing(dst_pck, GF_FALSE, GF_FALSE);
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset - ctx->bytes_in_header);
}
mpgviddmx_enqueue_or_dispatch(ctx, dst_pck, GF_FALSE, GF_FALSE);
}
if (current<0) current = -1;
else current -= ctx->bytes_in_header;
ctx->bytes_in_header = 0;
} else {
//we have a valid start code, check which byte in our store or in the packet payload is the start code type
//and remember its location to reinit the parser from there
hdr_offset = 4 - ctx->bytes_in_header + current;
//bytes still to dispatch
bytes_from_store = ctx->bytes_in_header;
ctx->bytes_in_header = 0;
if (!hdr_offset) {
forced_sc_type = ctx->hdr_store[current+3];
} else {
forced_sc_type = start[hdr_offset-1];
}
sc_type_forced = GF_TRUE;
}
}
//no starcode in store, look for startcode in packet
if (current == -1) {
//locate next start code
current = mpgviddmx_next_start_code(start, remain);
//no start code, dispatch the block
if (current<0) {
u8 b3, b2, b1;
if (! ctx->frame_started) {
GF_LOG(GF_LOG_DEBUG, GF_LOG_MEDIA, ("[MPGVid] no start code in block and no frame started, discarding data\n" ));
break;
}
size = remain;
b3 = start[remain-3];
b2 = start[remain-2];
b1 = start[remain-1];
//we may have a startcode at the end of the packet, store it and don't dispatch the last 3 bytes !
if (!b1 || !b2 || !b3) {
copy_last_bytes = GF_TRUE;
assert(size >= 3);
size -= 3;
ctx->bytes_in_header = 3;
}
dst_pck = gf_filter_pck_new_alloc(ctx->opid, (u32) size, &pck_data);
if (!dst_pck) return GF_OUT_OF_MEM;
if (ctx->src_pck) gf_filter_pck_merge_properties(ctx->src_pck, dst_pck);
memcpy(pck_data, start, (size_t) size);
gf_filter_pck_set_framing(dst_pck, GF_FALSE, GF_FALSE);
gf_filter_pck_set_cts(dst_pck, GF_FILTER_NO_TS);
gf_filter_pck_set_dts(dst_pck, GF_FILTER_NO_TS);
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset);
}
mpgviddmx_enqueue_or_dispatch(ctx, dst_pck, GF_FALSE, GF_FALSE);
if (copy_last_bytes) {
memcpy(ctx->hdr_store, start+remain-3, 3);
}
break;
}
}
assert(current>=0);
//if we are in the middle of parsing the vosh, skip over bytes remaining from previous obj not parsed
if ((vosh_start>=0) && current) {
assert(remain>=current);
start += current;
remain -= current;
current = 0;
}
//also skip if no output pid
if (!ctx->opid && current) {
assert(remain>=current);
start += current;
remain -= current;
current = 0;
}
//dispatch remaining bytes
if (current>0) {
//flush remaining
dst_pck = gf_filter_pck_new_alloc(ctx->opid, current, &pck_data);
if (!dst_pck) return GF_OUT_OF_MEM;
if (ctx->src_pck) gf_filter_pck_merge_properties(ctx->src_pck, dst_pck);
gf_filter_pck_set_cts(dst_pck, GF_FILTER_NO_TS);
gf_filter_pck_set_dts(dst_pck, GF_FILTER_NO_TS);
gf_filter_pck_set_framing(dst_pck, GF_FALSE, GF_TRUE);
//bytes were partly in store, partly in packet
if (bytes_from_store) {
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset - bytes_from_store);
}
assert(bytes_from_store>=(u32) current);
bytes_from_store -= current;
memcpy(pck_data, ctx->hdr_store, current);
} else {
//bytes were only in packet
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset);
}
memcpy(pck_data, start, current);
assert(remain>=current);
start += current;
remain -= current;
current = 0;
}
gf_filter_pck_set_carousel_version(dst_pck, 1);
mpgviddmx_enqueue_or_dispatch(ctx, dst_pck, GF_FALSE, GF_FALSE);
}
//parse headers
//we have a start code loaded, eg the data packet does not have a full start code at the beginning
if (sc_type_forced) {
gf_bs_reassign_buffer(ctx->bs, start + hdr_offset, remain - hdr_offset);
sc_type = forced_sc_type;
} else {
gf_bs_reassign_buffer(ctx->bs, start, remain);
gf_bs_read_int(ctx->bs, 24);
sc_type = gf_bs_read_int(ctx->bs, 8);
}
if (ctx->is_mpg12) {
switch (sc_type) {
case M2V_SEQ_START_CODE:
case M2V_EXT_START_CODE:
gf_bs_reassign_buffer(ctx->bs, start, remain);
e = gf_m4v_parse_config(ctx->vparser, &ctx->dsi);
//not enough data, accumulate until we can parse the full header
if (e==GF_EOS) {
if (vosh_start<0) vosh_start = 0;
if (ctx->hdr_store_alloc < ctx->hdr_store_size + pck_size - vosh_start) {
ctx->hdr_store_alloc = (u32) (ctx->hdr_store_size + pck_size - vosh_start);
ctx->hdr_store = gf_realloc(ctx->hdr_store, sizeof(char)*ctx->hdr_store_alloc);
}
memcpy(ctx->hdr_store + ctx->hdr_store_size, data + vosh_start, (size_t) (pck_size - vosh_start) );
ctx->hdr_store_size += pck_size - (u32) vosh_start;
gf_filter_pid_drop_packet(ctx->ipid);
return GF_OK;
} else if (e != GF_OK) {
GF_LOG(GF_LOG_ERROR, GF_LOG_MEDIA, ("[MPGVid] Failed to parse VOS header: %s\n", gf_error_to_string(e) ));
} else {
mpgviddmx_check_pid(filter, ctx, 0, NULL);
}
break;
case M2V_PIC_START_CODE:
break;
default:
break;
}
} else {
u8 PL;
switch (sc_type) {
case M4V_VOS_START_CODE:
ctx->dsi.VideoPL = (u8) gf_bs_read_u8(ctx->bs);
vosh_start = start - (u8 *)data;
skip_pck = GF_TRUE;
assert(remain>=5);
start += 5;
remain -= 5;
break;
case M4V_VOL_START_CODE:
gf_bs_reassign_buffer(ctx->bs, start, remain);
PL = ctx->dsi.VideoPL;
e = gf_m4v_parse_config(ctx->vparser, &ctx->dsi);
ctx->dsi.VideoPL = PL;
//not enough data, accumulate until we can parse the full header
if (e==GF_EOS) {
if (vosh_start<0) vosh_start = 0;
if (ctx->hdr_store_alloc < ctx->hdr_store_size + pck_size - vosh_start) {
ctx->hdr_store_alloc = (u32) (ctx->hdr_store_size + pck_size - (u32) vosh_start);
ctx->hdr_store = gf_realloc(ctx->hdr_store, sizeof(char)*ctx->hdr_store_alloc);
}
memcpy(ctx->hdr_store + ctx->hdr_store_size, data + vosh_start, (size_t) (pck_size - vosh_start) );
ctx->hdr_store_size += pck_size - (u32) vosh_start;
gf_filter_pid_drop_packet(ctx->ipid);
return GF_OK;
} else if (e != GF_OK) {
GF_LOG(GF_LOG_ERROR, GF_LOG_MEDIA, ("[MPGVid] Failed to parse VOS header: %s\n", gf_error_to_string(e) ));
} else {
u32 obj_size = (u32) gf_m4v_get_object_start(ctx->vparser);
if (vosh_start<0) vosh_start = 0;
vosh_end = start - (u8 *)data + obj_size;
vosh_end -= vosh_start;
mpgviddmx_check_pid(filter, ctx,(u32) vosh_end, data+vosh_start);
skip_pck = GF_TRUE;
assert(remain>=(s32) obj_size);
start += obj_size;
remain -= obj_size;
}
break;
case M4V_VOP_START_CODE:
case M4V_GOV_START_CODE:
break;
case M4V_VO_START_CODE:
case M4V_VISOBJ_START_CODE:
default:
if (vosh_start>=0) {
skip_pck = GF_TRUE;
assert(remain>=4);
start += 4;
remain -= 4;
}
break;
}
}
if (skip_pck) {
continue;
}
if (!ctx->opid) {
assert(remain>=4);
start += 4;
remain -= 4;
continue;
}
if (!ctx->is_playing) {
ctx->resume_from = (u32) ((char *)start - (char *)data);
return GF_OK;
}
//at this point, we no longer reaggregate packets
ctx->hdr_store_size = 0;
if (ctx->in_seek) {
u64 nb_frames_at_seek = (u64) (ctx->start_range * ctx->cur_fps.num);
if (ctx->cts + ctx->cur_fps.den >= nb_frames_at_seek) {
//u32 samples_to_discard = (ctx->cts + ctx->dts_inc) - nb_samples_at_seek;
ctx->in_seek = GF_FALSE;
}
}
//may happen that after all our checks, only 4 bytes are left, continue to store these 4 bytes
if (remain<5)
continue;
//good to go
gf_m4v_parser_reset(ctx->vparser, sc_type_forced ? forced_sc_type + 1 : 0);
size = 0;
e = gf_m4v_parse_frame(ctx->vparser, &ctx->dsi, &ftype, &tinc, &size, &fstart, &is_coded);
//true if we strip VO and VISOBJ assert(!fstart);
//we skipped bytes already in store + end of start code present in packet, so the size of the first object
//needs adjustement
if (bytes_from_store) {
size += bytes_from_store + hdr_offset;
}
if ((e == GF_EOS) && !ctx->input_is_au_end) {
u8 b3 = start[remain-3];
u8 b2 = start[remain-2];
u8 b1 = start[remain-1];
//we may have a startcode at the end of the packet, store it and don't dispatch the last 3 bytes !
if (!b1 || !b2 || !b3) {
copy_last_bytes = GF_TRUE;
assert(size >= 3);
size -= 3;
ctx->bytes_in_header = 3;
}
full_frame = GF_FALSE;
} else {
full_frame = GF_TRUE;
}
if (!is_coded) {
/*if prev is B and we're parsing a packed bitstream discard n-vop*/
if (ctx->forced_packed && ctx->b_frames) {
ctx->is_packed = GF_TRUE;
assert(remain>=size);
start += size;
remain -= (s32) size;
continue;
}
/*policy is to import at variable frame rate, skip*/
if (ctx->vfr) {
ctx->is_vfr = GF_TRUE;
mpgviddmx_update_time(ctx);
assert(remain>=size);
start += size;
remain -= (s32) size;
continue;
}
/*policy is to keep non coded frame (constant frame rate), add*/
}
if (ftype==2) {
//count number of B-frames since last ref
ctx->b_frames++;
ctx->nb_b++;
} else {
//flush all pending packets
mpgviddmx_enqueue_or_dispatch(ctx, NULL, GF_TRUE, GF_FALSE);
//remeber the CTS of the last ref
ctx->last_ref_cts = ctx->cts;
if (ctx->max_b < ctx->b_frames) ctx->max_b = ctx->b_frames;
ctx->b_frames = 0;
if (ftype)
ctx->nb_p++;
else
ctx->nb_i++;
}
ctx->nb_frames++;
dst_pck = gf_filter_pck_new_alloc(ctx->opid, (u32) size, &pck_data);
if (!dst_pck) return GF_OUT_OF_MEM;
if (ctx->src_pck) gf_filter_pck_merge_properties(ctx->src_pck, dst_pck);
//bytes come from both our store and the data packet
if (bytes_from_store) {
memcpy(pck_data, ctx->hdr_store+current, bytes_from_store);
assert(size >= bytes_from_store);
size -= bytes_from_store;
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset - bytes_from_store);
}
memcpy(pck_data + bytes_from_store, start, (size_t) size);
} else {
//bytes only come the data packet
memcpy(pck_data, start, (size_t) size);
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset + start - (u8 *) data);
}
}
assert(pck_data[0] == 0);
assert(pck_data[1] == 0);
assert(pck_data[2] == 0x01);
gf_filter_pck_set_framing(dst_pck, GF_TRUE, (full_frame || ctx->input_is_au_end) ? GF_TRUE : GF_FALSE);
gf_filter_pck_set_cts(dst_pck, ctx->cts);
gf_filter_pck_set_dts(dst_pck, ctx->dts);
if (ctx->input_is_au_start) {
ctx->input_is_au_start = GF_FALSE;
} else {
//we use the carousel flag temporarly to indicate the cts must be recomputed
gf_filter_pck_set_carousel_version(dst_pck, 1);
}
gf_filter_pck_set_sap(dst_pck, ftype ? GF_FILTER_SAP_NONE : GF_FILTER_SAP_1);
gf_filter_pck_set_duration(dst_pck, ctx->cur_fps.den);
if (ctx->in_seek) gf_filter_pck_set_seek_flag(dst_pck, GF_TRUE);
ctx->frame_started = GF_TRUE;
mpgviddmx_enqueue_or_dispatch(ctx, dst_pck, GF_FALSE, GF_FALSE);
mpgviddmx_update_time(ctx);
if (!full_frame) {
if (copy_last_bytes) {
memcpy(ctx->hdr_store, start+remain-3, 3);
}
break;
}
assert(remain>=size);
start += size;
remain -= (s32) size;
}
gf_filter_pid_drop_packet(ctx->ipid);
return GF_OK;
} | 2953 | True | 1 |
CVE-2021-40569 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/commit/b03c9f252526bb42fbd1b87b9f5e339c3cf2390a', 'name': 'https://github.com/gpac/gpac/commit/b03c9f252526bb42fbd1b87b9f5e339c3cf2390a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/issues/1890', 'name': 'https://github.com/gpac/gpac/issues/1890', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.0.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The binary MP4Box in Gpac through 1.0.1 has a double-free vulnerability in the iloc_entry_del funciton in box_code_meta.c, which allows attackers to cause a denial of service.'}] | 2022-01-14T16:35Z | 2022-01-13T18:15Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | jeanlf | 2021-08-30 15:55:13+02:00 | fixed #1890 | b03c9f252526bb42fbd1b87b9f5e339c3cf2390a | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | iloc_box_read | iloc_box_read( GF_Box * s , GF_BitStream * bs) | ['s', 'bs'] | GF_Err iloc_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 item_count, extent_count, i, j;
GF_ItemLocationBox *ptr = (GF_ItemLocationBox *)s;
ISOM_DECREASE_SIZE(ptr, 2)
ptr->offset_size = gf_bs_read_int(bs, 4);
ptr->length_size = gf_bs_read_int(bs, 4);
ptr->base_offset_size = gf_bs_read_int(bs, 4);
if (ptr->version == 1 || ptr->version == 2) {
ptr->index_size = gf_bs_read_int(bs, 4);
} else {
gf_bs_read_int(bs, 4);
}
if (ptr->version < 2) {
ISOM_DECREASE_SIZE(ptr, 2)
item_count = gf_bs_read_u16(bs);
} else {
ISOM_DECREASE_SIZE(ptr, 4)
item_count = gf_bs_read_u32(bs);
}
for (i = 0; i < item_count; i++) {
GF_ItemLocationEntry *location_entry = (GF_ItemLocationEntry *)gf_malloc(sizeof(GF_ItemLocationEntry));
if (!location_entry) return GF_OUT_OF_MEM;
gf_list_add(ptr->location_entries, location_entry);
if (ptr->version < 2) {
ISOM_DECREASE_SIZE(ptr, 2)
location_entry->item_ID = gf_bs_read_u16(bs);
} else {
ISOM_DECREASE_SIZE(ptr, 4)
location_entry->item_ID = gf_bs_read_u32(bs);
}
if (ptr->version == 1 || ptr->version == 2) {
ISOM_DECREASE_SIZE(ptr, 2)
location_entry->construction_method = gf_bs_read_u16(bs);
}
else {
location_entry->construction_method = 0;
}
ISOM_DECREASE_SIZE(ptr, (2 + ptr->base_offset_size) )
location_entry->data_reference_index = gf_bs_read_u16(bs);
location_entry->base_offset = gf_bs_read_int(bs, 8*ptr->base_offset_size);
#ifndef GPAC_DISABLE_ISOM_WRITE
location_entry->original_base_offset = location_entry->base_offset;
#endif
ISOM_DECREASE_SIZE(ptr, 2)
extent_count = gf_bs_read_u16(bs);
location_entry->extent_entries = gf_list_new();
for (j = 0; j < extent_count; j++) {
GF_ItemExtentEntry *extent_entry = (GF_ItemExtentEntry *)gf_malloc(sizeof(GF_ItemExtentEntry));
if (!extent_entry) return GF_OUT_OF_MEM;
gf_list_add(location_entry->extent_entries, extent_entry);
if ((ptr->version == 1 || ptr->version == 2) && ptr->index_size > 0) {
ISOM_DECREASE_SIZE(ptr, ptr->index_size)
extent_entry->extent_index = gf_bs_read_int(bs, 8 * ptr->index_size);
}
else {
extent_entry->extent_index = 0;
}
ISOM_DECREASE_SIZE(ptr, (ptr->offset_size+ptr->length_size) )
extent_entry->extent_offset = gf_bs_read_int(bs, 8*ptr->offset_size);
extent_entry->extent_length = gf_bs_read_int(bs, 8*ptr->length_size);
#ifndef GPAC_DISABLE_ISOM_WRITE
extent_entry->original_extent_offset = extent_entry->extent_offset;
#endif
}
}
return GF_OK;
} | 501 | True | 1 |
CVE-2021-40573 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/commit/b03c9f252526bb42fbd1b87b9f5e339c3cf2390a', 'name': 'https://github.com/gpac/gpac/commit/b03c9f252526bb42fbd1b87b9f5e339c3cf2390a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/issues/1891', 'name': 'https://github.com/gpac/gpac/issues/1891', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:1.0.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The binary MP4Box in Gpac 1.0.1 has a double-free vulnerability in the gf_list_del function in list.c, which allows attackers to cause a denial of service.'}] | 2022-01-14T16:37Z | 2022-01-13T19:15Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | jeanlf | 2021-08-30 15:55:13+02:00 | fixed #1890 | b03c9f252526bb42fbd1b87b9f5e339c3cf2390a | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | iloc_box_read | iloc_box_read( GF_Box * s , GF_BitStream * bs) | ['s', 'bs'] | GF_Err iloc_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 item_count, extent_count, i, j;
GF_ItemLocationBox *ptr = (GF_ItemLocationBox *)s;
ISOM_DECREASE_SIZE(ptr, 2)
ptr->offset_size = gf_bs_read_int(bs, 4);
ptr->length_size = gf_bs_read_int(bs, 4);
ptr->base_offset_size = gf_bs_read_int(bs, 4);
if (ptr->version == 1 || ptr->version == 2) {
ptr->index_size = gf_bs_read_int(bs, 4);
} else {
gf_bs_read_int(bs, 4);
}
if (ptr->version < 2) {
ISOM_DECREASE_SIZE(ptr, 2)
item_count = gf_bs_read_u16(bs);
} else {
ISOM_DECREASE_SIZE(ptr, 4)
item_count = gf_bs_read_u32(bs);
}
for (i = 0; i < item_count; i++) {
GF_ItemLocationEntry *location_entry = (GF_ItemLocationEntry *)gf_malloc(sizeof(GF_ItemLocationEntry));
if (!location_entry) return GF_OUT_OF_MEM;
gf_list_add(ptr->location_entries, location_entry);
if (ptr->version < 2) {
ISOM_DECREASE_SIZE(ptr, 2)
location_entry->item_ID = gf_bs_read_u16(bs);
} else {
ISOM_DECREASE_SIZE(ptr, 4)
location_entry->item_ID = gf_bs_read_u32(bs);
}
if (ptr->version == 1 || ptr->version == 2) {
ISOM_DECREASE_SIZE(ptr, 2)
location_entry->construction_method = gf_bs_read_u16(bs);
}
else {
location_entry->construction_method = 0;
}
ISOM_DECREASE_SIZE(ptr, (2 + ptr->base_offset_size) )
location_entry->data_reference_index = gf_bs_read_u16(bs);
location_entry->base_offset = gf_bs_read_int(bs, 8*ptr->base_offset_size);
#ifndef GPAC_DISABLE_ISOM_WRITE
location_entry->original_base_offset = location_entry->base_offset;
#endif
ISOM_DECREASE_SIZE(ptr, 2)
extent_count = gf_bs_read_u16(bs);
location_entry->extent_entries = gf_list_new();
for (j = 0; j < extent_count; j++) {
GF_ItemExtentEntry *extent_entry = (GF_ItemExtentEntry *)gf_malloc(sizeof(GF_ItemExtentEntry));
if (!extent_entry) return GF_OUT_OF_MEM;
gf_list_add(location_entry->extent_entries, extent_entry);
if ((ptr->version == 1 || ptr->version == 2) && ptr->index_size > 0) {
ISOM_DECREASE_SIZE(ptr, ptr->index_size)
extent_entry->extent_index = gf_bs_read_int(bs, 8 * ptr->index_size);
}
else {
extent_entry->extent_index = 0;
}
ISOM_DECREASE_SIZE(ptr, (ptr->offset_size+ptr->length_size) )
extent_entry->extent_offset = gf_bs_read_int(bs, 8*ptr->offset_size);
extent_entry->extent_length = gf_bs_read_int(bs, 8*ptr->length_size);
#ifndef GPAC_DISABLE_ISOM_WRITE
extent_entry->original_extent_offset = extent_entry->extent_offset;
#endif
}
}
return GF_OK;
} | 501 | True | 1 |
CVE-2021-40563 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/commit/5ce0c906ed8599d218036b18b78e8126a496f137', 'name': 'https://github.com/gpac/gpac/commit/5ce0c906ed8599d218036b18b78e8126a496f137', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/issues/1892', 'name': 'https://github.com/gpac/gpac/issues/1892', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.0.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'A Segmentation fault exists casued by null pointer dereference exists in Gpac through 1.0.1 via the naludmx_create_avc_decoder_config function in reframe_nalu.c when using mp4box, which causes a denial of service.'}] | 2022-01-14T13:44Z | 2022-01-12T22:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2021-08-30 16:06:09+02:00 | fixed #1892 | 5ce0c906ed8599d218036b18b78e8126a496f137 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | naludmx_queue_param_set | naludmx_queue_param_set( GF_NALUDmxCtx * ctx , char * data , u32 size , u32 ps_type , s32 ps_id) | ['ctx', 'data', 'size', 'ps_type', 'ps_id'] | static void naludmx_queue_param_set(GF_NALUDmxCtx *ctx, char *data, u32 size, u32 ps_type, s32 ps_id)
{
GF_List *list = NULL, *alt_list = NULL;
GF_NALUFFParam *sl;
u32 i, count;
u32 crc = gf_crc_32(data, size);
if (ctx->codecid==GF_CODECID_HEVC) {
switch (ps_type) {
case GF_HEVC_NALU_VID_PARAM:
if (!ctx->vps) ctx->vps = gf_list_new();
list = ctx->vps;
break;
case GF_HEVC_NALU_SEQ_PARAM:
list = ctx->sps;
break;
case GF_HEVC_NALU_PIC_PARAM:
list = ctx->pps;
break;
default:
assert(0);
return;
}
} else if (ctx->codecid==GF_CODECID_VVC) {
switch (ps_type) {
case GF_VVC_NALU_VID_PARAM:
if (!ctx->vps) ctx->vps = gf_list_new();
list = ctx->vps;
break;
case GF_VVC_NALU_SEQ_PARAM:
list = ctx->sps;
break;
case GF_VVC_NALU_PIC_PARAM:
list = ctx->pps;
break;
case GF_VVC_NALU_DEC_PARAM:
if (!ctx->vvc_dci) ctx->vvc_dci = gf_list_new();
list = ctx->vvc_dci;
break;
case GF_VVC_NALU_APS_PREFIX:
if (!ctx->vvc_aps_pre) ctx->vvc_aps_pre = gf_list_new();
list = ctx->vvc_aps_pre;
break;
default:
assert(0);
return;
}
} else {
switch (ps_type) {
case GF_AVC_NALU_SVC_SUBSEQ_PARAM:
case GF_AVC_NALU_SEQ_PARAM:
list = ctx->sps;
break;
case GF_AVC_NALU_PIC_PARAM:
list = ctx->pps;
alt_list = ctx->pps_svc;
break;
case GF_AVC_NALU_SEQ_PARAM_EXT:
if (!ctx->sps_ext) ctx->sps_ext = gf_list_new();
list = ctx->sps_ext;
break;
default:
assert(0);
return;
}
}
sl = NULL;
count = gf_list_count(list);
for (i=0; i<count; i++) {
sl = gf_list_get(list, i);
if (sl->id != ps_id) {
sl = NULL;
continue;
}
//same ID, same CRC, we don't change our state
if (sl->crc == crc) return;
break;
}
//handle alt PPS list for SVC
if (!sl && alt_list) {
count = gf_list_count(alt_list);
for (i=0; i<count; i++) {
sl = gf_list_get(alt_list, i);
if (sl->id != ps_id) {
sl = NULL;
continue;
}
//same ID, same CRC, we don't change our state
if (sl->crc == crc) return;
break;
}
}
if (sl) {
//otherwise we keep this new param set
sl->data = gf_realloc(sl->data, size);
memcpy(sl->data, data, size);
sl->size = size;
sl->crc = crc;
ctx->ps_modified = GF_TRUE;
return;
}
//TODO we might want to purge the list after a while !!
GF_SAFEALLOC(sl, GF_NALUFFParam);
if (!sl) return;
sl->data = gf_malloc(sizeof(char) * size);
if (!sl->data) {
gf_free(sl);
return;
}
memcpy(sl->data, data, size);
sl->size = size;
sl->id = ps_id;
sl->crc = crc;
ctx->ps_modified = GF_TRUE;
gf_list_add(list, sl);
} | 592 | True | 1 |
CVE-2021-40572 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/issues/1893', 'name': 'https://github.com/gpac/gpac/issues/1893', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/7bb1b4a4dd23c885f9db9f577dfe79ecc5433109', 'name': 'https://github.com/gpac/gpac/commit/7bb1b4a4dd23c885f9db9f577dfe79ecc5433109', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:1.0.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The binary MP4Box in Gpac 1.0.1 has a double-free bug in the av1dmx_finalize function in reframe_av1.c, which allows attackers to cause a denial of service.'}] | 2022-01-14T16:37Z | 2022-01-13T19:15Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | jeanlf | 2021-08-30 16:15:32+02:00 | fixed #1893 | 7bb1b4a4dd23c885f9db9f577dfe79ecc5433109 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_av1_reset_state | gf_av1_reset_state( AV1State * state , Bool is_destroy) | ['state', 'is_destroy'] | void gf_av1_reset_state(AV1State *state, Bool is_destroy)
{
GF_List *l1, *l2;
if (state->frame_state.header_obus) {
while (gf_list_count(state->frame_state.header_obus)) {
GF_AV1_OBUArrayEntry *a = (GF_AV1_OBUArrayEntry*)gf_list_pop_back(state->frame_state.header_obus);
if (a->obu) gf_free(a->obu);
gf_free(a);
}
}
if (state->frame_state.frame_obus) {
while (gf_list_count(state->frame_state.frame_obus)) {
GF_AV1_OBUArrayEntry *a = (GF_AV1_OBUArrayEntry*)gf_list_pop_back(state->frame_state.frame_obus);
if (a->obu) gf_free(a->obu);
gf_free(a);
}
}
l1 = state->frame_state.frame_obus;
l2 = state->frame_state.header_obus;
memset(&state->frame_state, 0, sizeof(AV1StateFrame));
state->frame_state.is_first_frame = GF_TRUE;
if (is_destroy) {
gf_list_del(l1);
gf_list_del(l2);
if (state->bs) {
if (gf_bs_get_position(state->bs)) {
u32 size;
gf_bs_get_content_no_truncate(state->bs, &state->frame_obus, &size, &state->frame_obus_alloc);
}
gf_bs_del(state->bs);
}
state->bs = NULL;
}
else {
state->frame_state.frame_obus = l1;
state->frame_state.header_obus = l2;
if (state->bs)
gf_bs_seek(state->bs, 0);
}
} | 278 | True | 1 |
CVE-2021-40574 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/gpac/gpac/issues/1897', 'name': 'https://github.com/gpac/gpac/issues/1897', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/30ac5e5236b790accd1f25347eebf2dc8c6c1bcb', 'name': 'https://github.com/gpac/gpac/commit/30ac5e5236b790accd1f25347eebf2dc8c6c1bcb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-415'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:1.0.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The binary MP4Box in Gpac 1.0.1 has a double-free vulnerability in the gf_text_get_utf8_line function in load_text.c, which allows attackers to cause a denial of service, even code execution and escalation of privileges.'}] | 2022-01-14T16:37Z | 2022-01-13T19:15Z | Double Free | The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations. | When a program calls free() twice with the same argument, the program's memory management data structures become corrupted. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack.
| https://cwe.mitre.org/data/definitions/415.html | 0 | jeanlf | 2021-08-30 16:57:38+02:00 | fixed #1897 | 30ac5e5236b790accd1f25347eebf2dc8c6c1bcb | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_text_get_utf8_line | gf_text_get_utf8_line( char * szLine , u32 lineSize , FILE * txt_in , s32 unicode_type) | ['szLine', 'lineSize', 'txt_in', 'unicode_type'] | char *gf_text_get_utf8_line(char *szLine, u32 lineSize, FILE *txt_in, s32 unicode_type)
{
u32 i, j, len;
char *sOK;
char szLineConv[1024];
unsigned short *sptr;
memset(szLine, 0, sizeof(char)*lineSize);
sOK = gf_fgets(szLine, lineSize, txt_in);
if (!sOK) return NULL;
if (unicode_type<=1) {
j=0;
len = (u32) strlen(szLine);
for (i=0; i<len; i++) {
if (!unicode_type && (szLine[i] & 0x80)) {
/*non UTF8 (likely some win-CP)*/
if ((szLine[i+1] & 0xc0) != 0x80) {
szLineConv[j] = 0xc0 | ( (szLine[i] >> 6) & 0x3 );
j++;
szLine[i] &= 0xbf;
}
/*UTF8 2 bytes char*/
else if ( (szLine[i] & 0xe0) == 0xc0) {
szLineConv[j] = szLine[i];
i++;
j++;
}
/*UTF8 3 bytes char*/
else if ( (szLine[i] & 0xf0) == 0xe0) {
szLineConv[j] = szLine[i];
i++;
j++;
szLineConv[j] = szLine[i];
i++;
j++;
}
/*UTF8 4 bytes char*/
else if ( (szLine[i] & 0xf8) == 0xf0) {
szLineConv[j] = szLine[i];
i++;
j++;
szLineConv[j] = szLine[i];
i++;
j++;
szLineConv[j] = szLine[i];
i++;
j++;
} else {
i+=1;
continue;
}
}
szLineConv[j] = szLine[i];
j++;
}
szLineConv[j] = 0;
strcpy(szLine, szLineConv);
return sOK;
}
#ifdef GPAC_BIG_ENDIAN
if (unicode_type==3)
#else
if (unicode_type==2)
#endif
{
i=0;
while (1) {
char c;
if (!szLine[i] && !szLine[i+1]) break;
c = szLine[i+1];
szLine[i+1] = szLine[i];
szLine[i] = c;
i+=2;
}
}
sptr = (u16 *)szLine;
i = (u32) gf_utf8_wcstombs(szLineConv, 1024, (const unsigned short **) &sptr);
szLineConv[i] = 0;
strcpy(szLine, szLineConv);
/*this is ugly indeed: since input is UTF16-LE, there are many chances the gf_fgets never reads the \0 after a \n*/
if (unicode_type==3) gf_fgetc(txt_in);
return sOK;
} | 491 | True | 1 |
CVE-2021-40564 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/issues/1898', 'name': 'https://github.com/gpac/gpac/issues/1898', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/cf6771c857eb9a290e2c19ddacfdd3ed98b27618', 'name': 'https://github.com/gpac/gpac/commit/cf6771c857eb9a290e2c19ddacfdd3ed98b27618', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.0.2', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'A Segmentation fault caused by null pointer dereference vulnerability eists in Gpac through 1.0.2 via the avc_parse_slice function in av_parsers.c when using mp4box, which causes a denial of service.'}] | 2022-01-14T13:45Z | 2022-01-12T22:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2021-08-30 17:09:02+02:00 | fixed #1898 | cf6771c857eb9a290e2c19ddacfdd3ed98b27618 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | avc_parse_slice | avc_parse_slice( GF_BitStream * bs , AVCState * avc , Bool svc_idr_flag , AVCSliceInfo * si) | ['bs', 'avc', 'svc_idr_flag', 'si'] | static s32 avc_parse_slice(GF_BitStream *bs, AVCState *avc, Bool svc_idr_flag, AVCSliceInfo *si)
{
s32 pps_id, num_ref_idx_l0_active_minus1 = 0, num_ref_idx_l1_active_minus1 = 0;
/*s->current_picture.reference= h->nal_ref_idc != 0;*/
gf_bs_read_ue_log(bs, "first_mb_in_slice");
si->slice_type = gf_bs_read_ue_log(bs, "slice_type");
if (si->slice_type > 9) return -1;
pps_id = gf_bs_read_ue_log(bs, "pps_id");
if (pps_id > 255) return -1;
si->pps = &avc->pps[pps_id];
if (!si->pps->slice_group_count) return -2;
si->sps = &avc->sps[si->pps->sps_id];
if (!si->sps->log2_max_frame_num) return -2;
avc->sps_active_idx = si->pps->sps_id;
avc->pps_active_idx = pps_id;
si->frame_num = gf_bs_read_int_log(bs, si->sps->log2_max_frame_num, "frame_num");
si->field_pic_flag = 0;
si->bottom_field_flag = 0;
if (!si->sps->frame_mbs_only_flag) {
si->field_pic_flag = gf_bs_read_int_log(bs, 1, "field_pic_flag");
if (si->field_pic_flag)
si->bottom_field_flag = gf_bs_read_int_log(bs, 1, "bottom_field_flag");
}
if ((si->nal_unit_type == GF_AVC_NALU_IDR_SLICE) || svc_idr_flag)
si->idr_pic_id = gf_bs_read_ue_log(bs, "idr_pic_id");
if (si->sps->poc_type == 0) {
si->poc_lsb = gf_bs_read_int_log(bs, si->sps->log2_max_poc_lsb, "poc_lsb");
if (si->pps->pic_order_present && !si->field_pic_flag) {
si->delta_poc_bottom = gf_bs_read_se_log(bs, "poc_lsb");
}
}
else if ((si->sps->poc_type == 1) && !si->sps->delta_pic_order_always_zero_flag) {
si->delta_poc[0] = gf_bs_read_se_log(bs, "delta_poc0");
if ((si->pps->pic_order_present == 1) && !si->field_pic_flag)
si->delta_poc[1] = gf_bs_read_se_log(bs, "delta_poc1");
}
if (si->pps->redundant_pic_cnt_present) {
si->redundant_pic_cnt = gf_bs_read_ue_log(bs, "redundant_pic_cnt");
}
if (si->slice_type % 5 == GF_AVC_TYPE_B) {
gf_bs_read_int_log(bs, 1, "direct_spatial_mv_pred_flag");
}
num_ref_idx_l0_active_minus1 = si->pps->num_ref_idx_l0_default_active_minus1;
num_ref_idx_l1_active_minus1 = si->pps->num_ref_idx_l1_default_active_minus1;
if (si->slice_type % 5 == GF_AVC_TYPE_P || si->slice_type % 5 == GF_AVC_TYPE_SP || si->slice_type % 5 == GF_AVC_TYPE_B) {
Bool num_ref_idx_active_override_flag = gf_bs_read_int_log(bs, 1, "num_ref_idx_active_override_flag");
if (num_ref_idx_active_override_flag) {
num_ref_idx_l0_active_minus1 = gf_bs_read_ue_log(bs, "num_ref_idx_l0_active_minus1");
if (si->slice_type % 5 == GF_AVC_TYPE_B) {
num_ref_idx_l1_active_minus1 = gf_bs_read_ue_log(bs, "num_ref_idx_l1_active_minus1");
}
}
}
if (si->nal_unit_type == 20 || si->nal_unit_type == 21) {
//ref_pic_list_mvc_modification(); /* specified in Annex H */
GF_LOG(GF_LOG_ERROR, GF_LOG_CODING, ("[avc-h264] unimplemented ref_pic_list_mvc_modification() in slide header\n"));
assert(0);
return -1;
}
else {
ref_pic_list_modification(bs, si->slice_type);
}
if ((si->pps->weighted_pred_flag && (si->slice_type % 5 == GF_AVC_TYPE_P || si->slice_type % 5 == GF_AVC_TYPE_SP))
|| (si->pps->weighted_bipred_idc == 1 && si->slice_type % 5 == GF_AVC_TYPE_B)) {
pred_weight_table(bs, si->slice_type, si->sps->ChromaArrayType, num_ref_idx_l0_active_minus1, num_ref_idx_l1_active_minus1);
}
if (si->nal_ref_idc != 0) {
dec_ref_pic_marking(bs, (si->nal_unit_type == GF_AVC_NALU_IDR_SLICE));
}
if (si->pps->entropy_coding_mode_flag && si->slice_type % 5 != GF_AVC_TYPE_I && si->slice_type % 5 != GF_AVC_TYPE_SI) {
gf_bs_read_ue_log(bs, "cabac_init_idc");
}
/*slice_qp_delta = */gf_bs_read_se(bs);
if (si->slice_type % 5 == GF_AVC_TYPE_SP || si->slice_type % 5 == GF_AVC_TYPE_SI) {
if (si->slice_type % 5 == GF_AVC_TYPE_SP) {
gf_bs_read_int_log(bs, 1, "sp_for_switch_flag");
}
gf_bs_read_se_log(bs, "slice_qs_delta");
}
if (si->pps->deblocking_filter_control_present_flag) {
if (gf_bs_read_ue_log(bs, "disable_deblocking_filter_idc") != 1) {
gf_bs_read_se_log(bs, "slice_alpha_c0_offset_div2");
gf_bs_read_se_log(bs, "slice_beta_offset_div2");
}
}
if (si->pps->slice_group_count > 1 && si->pps->mb_slice_group_map_type >= 3 && si->pps->mb_slice_group_map_type <= 5) {
gf_bs_read_int_log(bs, (u32)ceil(log1p((si->pps->pic_size_in_map_units_minus1 + 1) / (si->pps->slice_group_change_rate_minus1 + 1) ) / log(2)), "slice_group_change_cycle");
}
return 0;
} | 833 | True | 1 |
CVE-2021-40564 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/issues/1898', 'name': 'https://github.com/gpac/gpac/issues/1898', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/cf6771c857eb9a290e2c19ddacfdd3ed98b27618', 'name': 'https://github.com/gpac/gpac/commit/cf6771c857eb9a290e2c19ddacfdd3ed98b27618', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.0.2', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'A Segmentation fault caused by null pointer dereference vulnerability eists in Gpac through 1.0.2 via the avc_parse_slice function in av_parsers.c when using mp4box, which causes a denial of service.'}] | 2022-01-14T13:45Z | 2022-01-12T22:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2021-08-30 17:09:02+02:00 | fixed #1898 | cf6771c857eb9a290e2c19ddacfdd3ed98b27618 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_bs_read_ue_log_idx3 | gf_bs_read_ue_log_idx3( GF_BitStream * bs , const char * fname , s32 idx1 , s32 idx2 , s32 idx3) | ['bs', 'fname', 'idx1', 'idx2', 'idx3'] | u32 gf_bs_read_ue_log_idx3(GF_BitStream *bs, const char *fname, s32 idx1, s32 idx2, s32 idx3)
{
u32 val=0, code;
s32 nb_lead = -1;
u32 bits = 0;
for (code=0; !code; nb_lead++) {
if (nb_lead>=32) {
//gf_bs_read_int keeps returning 0 on EOS, so if no more bits available, rbsp was truncated otherwise code is broken in rbsp)
//we only test once nb_lead>=32 to avoid testing at each bit read
if (!gf_bs_available(bs)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CODING, ("[Core] exp-golomb read failed, not enough bits in bitstream !\n"));
} else {
GF_LOG(GF_LOG_ERROR, GF_LOG_CODING, ("[Core] corrupted exp-golomb code, %d leading zeros, max 31 allowed !\n", nb_lead));
}
return 0;
}
code = gf_bs_read_int(bs, 1);
bits++;
}
if (nb_lead) {
val = gf_bs_read_int(bs, nb_lead);
val += (1 << nb_lead) - 1;
bits += nb_lead;
}
if (fname) {
gf_bs_log_idx(bs, bits, fname, val, idx1, idx2, idx3);
}
return val;
} | 170 | True | 1 |
CVE-2021-40568 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/gpac/gpac/commit/f1ae01d745200a258cdf62622f71754c37cb6c30', 'name': 'https://github.com/gpac/gpac/commit/f1ae01d745200a258cdf62622f71754c37cb6c30', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/issues/1900', 'name': 'https://github.com/gpac/gpac/issues/1900', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.0.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'A buffer overflow vulnerability exists in Gpac through 1.0.1 via a malformed MP4 file in the svc_parse_slice function in av_parsers.c, which allows attackers to cause a denial of service, even code execution and escalation of privileges.'}] | 2022-01-14T16:33Z | 2022-01-13T18:15Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | jeanlf | 2021-08-30 17:20:00+02:00 | fixed #1900 | f1ae01d745200a258cdf62622f71754c37cb6c30 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_bs_read_ue_log_idx3 | gf_bs_read_ue_log_idx3( GF_BitStream * bs , const char * fname , s32 idx1 , s32 idx2 , s32 idx3) | ['bs', 'fname', 'idx1', 'idx2', 'idx3'] | u32 gf_bs_read_ue_log_idx3(GF_BitStream *bs, const char *fname, s32 idx1, s32 idx2, s32 idx3)
{
u32 val=0, code;
s32 nb_lead = -1;
u32 bits = 0;
for (code=0; !code; nb_lead++) {
if (nb_lead>=32) {
//gf_bs_read_int keeps returning 0 on EOS, so if no more bits available, rbsp was truncated otherwise code is broken in rbsp)
//we only test once nb_lead>=32 to avoid testing at each bit read
if (!gf_bs_available(bs)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CODING, ("[Core] exp-golomb read failed, not enough bits in bitstream !\n"));
} else {
GF_LOG(GF_LOG_ERROR, GF_LOG_CODING, ("[Core] corrupted exp-golomb code, %d leading zeros, max 31 allowed !\n", nb_lead));
}
return 0;
}
code = gf_bs_read_int(bs, 1);
bits++;
}
if (nb_lead) {
u32 leads=1;
val = gf_bs_read_int(bs, nb_lead);
leads <<= nb_lead;
leads -= 1;
val += leads;
// val += (1 << nb_lead) - 1;
bits += nb_lead;
}
if (fname) {
gf_bs_log_idx(bs, bits, fname, val, idx1, idx2, idx3);
}
return val;
} | 176 | True | 1 |
CVE-2021-40568 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/gpac/gpac/commit/f1ae01d745200a258cdf62622f71754c37cb6c30', 'name': 'https://github.com/gpac/gpac/commit/f1ae01d745200a258cdf62622f71754c37cb6c30', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/issues/1900', 'name': 'https://github.com/gpac/gpac/issues/1900', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.0.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'A buffer overflow vulnerability exists in Gpac through 1.0.1 via a malformed MP4 file in the svc_parse_slice function in av_parsers.c, which allows attackers to cause a denial of service, even code execution and escalation of privileges.'}] | 2022-01-14T16:33Z | 2022-01-13T18:15Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | jeanlf | 2021-08-30 17:20:00+02:00 | fixed #1900 | f1ae01d745200a258cdf62622f71754c37cb6c30 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | svc_parse_slice | svc_parse_slice( GF_BitStream * bs , AVCState * avc , AVCSliceInfo * si) | ['bs', 'avc', 'si'] | static s32 svc_parse_slice(GF_BitStream *bs, AVCState *avc, AVCSliceInfo *si)
{
s32 pps_id;
/*s->current_picture.reference= h->nal_ref_idc != 0;*/
gf_bs_read_ue_log(bs, "first_mb_in_slice");
si->slice_type = gf_bs_read_ue_log(bs, "slice_type");
if (si->slice_type > 9) return -1;
pps_id = gf_bs_read_ue_log(bs, "pps_id");
if (pps_id > 255)
return -1;
si->pps = &avc->pps[pps_id];
si->pps->id = pps_id;
if (!si->pps->slice_group_count)
return -2;
si->sps = &avc->sps[si->pps->sps_id + GF_SVC_SSPS_ID_SHIFT];
if (!si->sps->log2_max_frame_num)
return -2;
si->frame_num = gf_bs_read_int_log(bs, si->sps->log2_max_frame_num, "frame_num");
si->field_pic_flag = 0;
if (si->sps->frame_mbs_only_flag) {
/*s->picture_structure= PICT_FRAME;*/
}
else {
si->field_pic_flag = gf_bs_read_int_log(bs, 1, "field_pic_flag");
if (si->field_pic_flag) si->bottom_field_flag = gf_bs_read_int_log(bs, 1, "bottom_field_flag");
}
if (si->nal_unit_type == GF_AVC_NALU_IDR_SLICE || si->NalHeader.idr_pic_flag)
si->idr_pic_id = gf_bs_read_ue_log(bs, "idr_pic_id");
if (si->sps->poc_type == 0) {
si->poc_lsb = gf_bs_read_int_log(bs, si->sps->log2_max_poc_lsb, "poc_lsb");
if (si->pps->pic_order_present && !si->field_pic_flag) {
si->delta_poc_bottom = gf_bs_read_se_log(bs, "delta_poc_bottom");
}
}
else if ((si->sps->poc_type == 1) && !si->sps->delta_pic_order_always_zero_flag) {
si->delta_poc[0] = gf_bs_read_se_log(bs, "delta_poc0");
if ((si->pps->pic_order_present == 1) && !si->field_pic_flag)
si->delta_poc[1] = gf_bs_read_se_log(bs, "delta_poc1");
}
if (si->pps->redundant_pic_cnt_present) {
si->redundant_pic_cnt = gf_bs_read_ue_log(bs, "redundant_pic_cnt");
}
return 0;
} | 371 | True | 1 |
CVE-2021-40562 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/commit/5dd71c7201a3e5cf40732d585bfb21c906c171d3', 'name': 'https://github.com/gpac/gpac/commit/5dd71c7201a3e5cf40732d585bfb21c906c171d3', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/issues/1901', 'name': 'https://github.com/gpac/gpac/issues/1901', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-697'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.0.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'A Segmentation fault caused by a floating point exception exists in Gpac through 1.0.1 using mp4box via the naludmx_enqueue_or_dispatch function in reframe_nalu.c, which causes a denial of service.'}] | 2022-01-14T13:43Z | 2022-01-12T22:15Z | Incorrect Comparison | The software compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses. |
This weakness class covers several possibilities:
the comparison checks one factor incorrectly;
the comparison should consider multiple factors, but it does not check some of those factors at all;
the comparison checks the wrong factor.
| https://cwe.mitre.org/data/definitions/697.html | 0 | jeanlf | 2021-08-30 17:26:28+02:00 | fixed #1901 | 5dd71c7201a3e5cf40732d585bfb21c906c171d3 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | naludmx_create_avc_decoder_config | naludmx_create_avc_decoder_config( GF_NALUDmxCtx * ctx , u8 ** dsi , u32 * dsi_size , u8 ** dsi_enh , u32 * dsi_enh_size , u32 * max_width , u32 * max_height , u32 * max_enh_width , u32 * max_enh_height , GF_Fraction * sar) | ['ctx', 'dsi', 'dsi_size', 'dsi_enh', 'dsi_enh_size', 'max_width', 'max_height', 'max_enh_width', 'max_enh_height', 'sar'] | void naludmx_create_avc_decoder_config(GF_NALUDmxCtx *ctx, u8 **dsi, u32 *dsi_size, u8 **dsi_enh, u32 *dsi_enh_size, u32 *max_width, u32 *max_height, u32 *max_enh_width, u32 *max_enh_height, GF_Fraction *sar)
{
u32 i, count;
Bool first = GF_TRUE;
Bool first_svc = GF_TRUE;
GF_AVCConfig *cfg;
GF_AVCConfig *avcc;
GF_AVCConfig *svcc;
u32 max_w, max_h, max_ew, max_eh;
max_w = max_h = max_ew = max_eh = 0;
sar->num = sar->den = 0;
avcc = gf_odf_avc_cfg_new();
svcc = gf_odf_avc_cfg_new();
avcc->nal_unit_size = ctx->nal_length;
svcc->nal_unit_size = ctx->nal_length;
ctx->is_mvc = GF_FALSE;
count = gf_list_count(ctx->sps);
for (i=0; i<count; i++) {
Bool is_svc = GF_FALSE;
GF_NALUFFParam *sl = gf_list_get(ctx->sps, i);
AVC_SPS *sps = &ctx->avc_state->sps[sl->id];
u32 nal_type = sl->data[0] & 0x1F;
if ((sps->profile_idc == 118) || (sps->profile_idc == 128)) {
ctx->is_mvc = GF_TRUE;
}
if (ctx->explicit) {
cfg = svcc;
} else if (nal_type == GF_AVC_NALU_SVC_SUBSEQ_PARAM) {
cfg = svcc;
is_svc = GF_TRUE;
} else {
cfg = avcc;
}
if (first || (is_svc && first_svc) ) {
cfg->configurationVersion = 1;
cfg->profile_compatibility = sps->prof_compat;
cfg->AVCProfileIndication = sps->profile_idc;
cfg->AVCLevelIndication = sps->level_idc;
cfg->chroma_format = sps->chroma_format;
cfg->luma_bit_depth = 8 + sps->luma_bit_depth_m8;
cfg->chroma_bit_depth = 8 + sps->chroma_bit_depth_m8;
/*try to patch ?*/
if (!gf_avc_is_rext_profile(cfg->AVCProfileIndication)
&& ((cfg->chroma_format>1) || (cfg->luma_bit_depth>8) || (cfg->chroma_bit_depth>8))
) {
if ((cfg->luma_bit_depth>8) || (cfg->chroma_bit_depth>8)) {
cfg->AVCProfileIndication = 110;
} else {
cfg->AVCProfileIndication = (cfg->chroma_format==3) ? 244 : 122;
}
}
if (sps->vui_parameters_present_flag && sps->vui.par_num && sps->vui.par_den) {
sar->num = sps->vui.par_num;
sar->den = sps->vui.par_den;
}
ctx->interlaced = sps->frame_mbs_only_flag ? GF_FALSE : GF_TRUE;
/*disable frame rate scan, most bitstreams have wrong values there*/
if (first && (!ctx->fps.num || !ctx->fps.den) && sps->vui.timing_info_present_flag
/*if detected FPS is greater than 1000, assume wrong timing info*/
&& (sps->vui.time_scale <= 1000*sps->vui.num_units_in_tick)
) {
/*ISO/IEC 14496-10 n11084 Table E-6*/
/* not used : u8 DeltaTfiDivisorTable[] = {1,1,1,2,2,2,2,3,3,4,6}; */
u8 DeltaTfiDivisorIdx;
if (!sps->vui.pic_struct_present_flag) {
DeltaTfiDivisorIdx = 1 + (1 - ctx->avc_state->s_info.field_pic_flag);
} else {
if (!ctx->avc_state->sei.pic_timing.pic_struct)
DeltaTfiDivisorIdx = 2;
else if (ctx->avc_state->sei.pic_timing.pic_struct == 8)
DeltaTfiDivisorIdx = 6;
else
DeltaTfiDivisorIdx = (ctx->avc_state->sei.pic_timing.pic_struct+1) / 2;
}
if (!ctx->timescale) {
ctx->cur_fps.num = 2 * sps->vui.time_scale;
ctx->cur_fps.den = 2 * sps->vui.num_units_in_tick * DeltaTfiDivisorIdx;
if (!ctx->fps.num && ctx->dts==ctx->fps.den)
ctx->dts = ctx->cur_fps.den;
}
if (! sps->vui.fixed_frame_rate_flag)
GF_LOG(GF_LOG_INFO, GF_LOG_PARSER, ("[%s] Possible Variable Frame Rate: VUI \"fixed_frame_rate_flag\" absent\n", ctx->log_name));
}
ctx->fps = ctx->cur_fps;
}
first = GF_FALSE;
if (is_svc) {
first_svc = GF_FALSE;
if (sps->width > max_ew) max_ew = sps->width;
if (sps->height > max_eh) max_eh = sps->height;
} else {
if (sps->width > max_w) max_w = sps->width;
if (sps->height > max_h) max_h = sps->height;
}
if (!ctx->analyze)
gf_list_add(cfg->sequenceParameterSets, sl);
}
cfg = ctx->explicit ? svcc : avcc;
count = gf_list_count(ctx->sps_ext);
for (i=0; i<count; i++) {
GF_NALUFFParam *sl = gf_list_get(ctx->sps_ext, i);
if (!cfg->sequenceParameterSetExtensions) cfg->sequenceParameterSetExtensions = gf_list_new();
if (!ctx->analyze)
gf_list_add(cfg->sequenceParameterSetExtensions, sl);
}
cfg = ctx->explicit ? svcc : avcc;
count = gf_list_count(ctx->pps);
for (i=0; i<count; i++) {
GF_NALUFFParam *sl = gf_list_get(ctx->pps, i);
if (!ctx->analyze)
gf_list_add(cfg->pictureParameterSets, sl);
}
cfg = svcc;
count = gf_list_count(ctx->pps_svc);
for (i=0; i<count; i++) {
GF_NALUFFParam *sl = gf_list_get(ctx->pps_svc, i);
if (!ctx->analyze)
gf_list_add(cfg->pictureParameterSets, sl);
}
*dsi = *dsi_enh = NULL;
*dsi_size = *dsi_enh_size = 0;
if (ctx->explicit) {
gf_odf_avc_cfg_write(svcc, dsi, dsi_size);
} else {
gf_odf_avc_cfg_write(avcc, dsi, dsi_size);
if (gf_list_count(svcc->sequenceParameterSets) || svcc->sequenceParameterSetExtensions) {
gf_odf_avc_cfg_write(svcc, dsi_enh, dsi_enh_size);
}
}
gf_list_reset(avcc->sequenceParameterSets);
gf_list_reset(avcc->sequenceParameterSetExtensions);
gf_list_reset(avcc->pictureParameterSets);
gf_list_reset(svcc->sequenceParameterSets);
gf_list_reset(svcc->sequenceParameterSetExtensions);
gf_list_reset(svcc->pictureParameterSets);
gf_odf_avc_cfg_del(avcc);
gf_odf_avc_cfg_del(svcc);
*max_width = max_w;
*max_height = max_h;
*max_enh_width = max_ew;
*max_enh_height = max_eh;
} | 1131 | True | 1 |
CVE-2021-40565 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/issues/1902', 'name': 'https://github.com/gpac/gpac/issues/1902', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/893fb99b606eebfae46cde151846a980e689039b', 'name': 'https://github.com/gpac/gpac/commit/893fb99b606eebfae46cde151846a980e689039b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '1.0.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'A Segmentation fault caused by a null pointer dereference vulnerability exists in Gpac through 1.0.1 via the gf_avc_parse_nalu function in av_parsers.c when using mp4box, which causes a denial of service.'}] | 2022-01-14T13:46Z | 2022-01-12T22:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2021-08-30 17:29:13+02:00 | fixed #1902 | 893fb99b606eebfae46cde151846a980e689039b | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_avc_parse_nalu | gf_avc_parse_nalu( GF_BitStream * bs , AVCState * avc) | ['bs', 'avc'] | s32 gf_avc_parse_nalu(GF_BitStream *bs, AVCState *avc)
{
u8 idr_flag;
s32 slice, ret;
u32 nal_hdr;
AVCSliceInfo n_state;
gf_bs_enable_emulation_byte_removal(bs, GF_TRUE);
nal_hdr = gf_bs_read_u8(bs);
slice = 0;
memcpy(&n_state, &avc->s_info, sizeof(AVCSliceInfo));
avc->last_nal_type_parsed = n_state.nal_unit_type = nal_hdr & 0x1F;
n_state.nal_ref_idc = (nal_hdr >> 5) & 0x3;
idr_flag = 0;
switch (n_state.nal_unit_type) {
case GF_AVC_NALU_ACCESS_UNIT:
case GF_AVC_NALU_END_OF_SEQ:
case GF_AVC_NALU_END_OF_STREAM:
ret = 1;
break;
case GF_AVC_NALU_SVC_SLICE:
SVC_ReadNal_header_extension(bs, &n_state.NalHeader);
// slice buffer - read the info and compare.
/*ret = */svc_parse_slice(bs, avc, &n_state);
if (avc->s_info.nal_ref_idc) {
n_state.poc_lsb_prev = avc->s_info.poc_lsb;
n_state.poc_msb_prev = avc->s_info.poc_msb;
}
avc_compute_poc(&n_state);
if (avc->s_info.poc != n_state.poc) {
memcpy(&avc->s_info, &n_state, sizeof(AVCSliceInfo));
return 1;
}
memcpy(&avc->s_info, &n_state, sizeof(AVCSliceInfo));
return 0;
case GF_AVC_NALU_SVC_PREFIX_NALU:
SVC_ReadNal_header_extension(bs, &n_state.NalHeader);
return 0;
case GF_AVC_NALU_IDR_SLICE:
case GF_AVC_NALU_NON_IDR_SLICE:
case GF_AVC_NALU_DP_A_SLICE:
case GF_AVC_NALU_DP_B_SLICE:
case GF_AVC_NALU_DP_C_SLICE:
slice = 1;
/* slice buffer - read the info and compare.*/
ret = avc_parse_slice(bs, avc, idr_flag, &n_state);
if (ret < 0) return ret;
ret = 0;
if (
((avc->s_info.nal_unit_type > GF_AVC_NALU_IDR_SLICE) || (avc->s_info.nal_unit_type < GF_AVC_NALU_NON_IDR_SLICE))
&& (avc->s_info.nal_unit_type != GF_AVC_NALU_SVC_SLICE)
) {
break;
}
if (avc->s_info.frame_num != n_state.frame_num) {
ret = 1;
break;
}
if (avc->s_info.field_pic_flag != n_state.field_pic_flag) {
ret = 1;
break;
}
if ((avc->s_info.nal_ref_idc != n_state.nal_ref_idc) &&
(!avc->s_info.nal_ref_idc || !n_state.nal_ref_idc)) {
ret = 1;
break;
}
assert(avc->s_info.sps);
if (avc->s_info.sps->poc_type == n_state.sps->poc_type) {
if (!avc->s_info.sps->poc_type) {
if (!n_state.bottom_field_flag && (avc->s_info.poc_lsb != n_state.poc_lsb)) {
ret = 1;
break;
}
if (avc->s_info.delta_poc_bottom != n_state.delta_poc_bottom) {
ret = 1;
break;
}
}
else if (avc->s_info.sps->poc_type == 1) {
if (avc->s_info.delta_poc[0] != n_state.delta_poc[0]) {
ret = 1;
break;
}
if (avc->s_info.delta_poc[1] != n_state.delta_poc[1]) {
ret = 1;
break;
}
}
}
if (n_state.nal_unit_type == GF_AVC_NALU_IDR_SLICE) {
if (avc->s_info.nal_unit_type != GF_AVC_NALU_IDR_SLICE) { /*IdrPicFlag differs in value*/
ret = 1;
break;
}
else if (avc->s_info.idr_pic_id != n_state.idr_pic_id) { /*both IDR and idr_pic_id differs*/
ret = 1;
break;
}
}
break;
case GF_AVC_NALU_SEQ_PARAM:
avc->last_ps_idx = gf_avc_read_sps_bs_internal(bs, avc, 0, NULL, nal_hdr);
if (avc->last_ps_idx < 0) return -1;
return 0;
case GF_AVC_NALU_PIC_PARAM:
avc->last_ps_idx = gf_avc_read_pps_bs_internal(bs, avc, nal_hdr);
if (avc->last_ps_idx < 0) return -1;
return 0;
case GF_AVC_NALU_SVC_SUBSEQ_PARAM:
avc->last_ps_idx = gf_avc_read_sps_bs_internal(bs, avc, 1, NULL, nal_hdr);
if (avc->last_ps_idx < 0) return -1;
return 0;
case GF_AVC_NALU_SEQ_PARAM_EXT:
avc->last_ps_idx = (s32) gf_bs_read_ue(bs);
if (avc->last_ps_idx < 0) return -1;
return 0;
case GF_AVC_NALU_SEI:
case GF_AVC_NALU_FILLER_DATA:
return 0;
default:
if (avc->s_info.nal_unit_type <= GF_AVC_NALU_IDR_SLICE) ret = 1;
//To detect change of AU when multiple sps and pps in stream
else if ((nal_hdr & 0x1F) == GF_AVC_NALU_SEI && avc->s_info.nal_unit_type == GF_AVC_NALU_SVC_SLICE)
ret = 1;
else if ((nal_hdr & 0x1F) == GF_AVC_NALU_SEQ_PARAM && avc->s_info.nal_unit_type == GF_AVC_NALU_SVC_SLICE)
ret = 1;
else
ret = 0;
break;
}
/* save _prev values */
if (ret && avc->s_info.sps) {
n_state.frame_num_offset_prev = avc->s_info.frame_num_offset;
if ((avc->s_info.sps->poc_type != 2) || (avc->s_info.nal_ref_idc != 0))
n_state.frame_num_prev = avc->s_info.frame_num;
if (avc->s_info.nal_ref_idc) {
n_state.poc_lsb_prev = avc->s_info.poc_lsb;
n_state.poc_msb_prev = avc->s_info.poc_msb;
}
}
if (slice)
avc_compute_poc(&n_state);
memcpy(&avc->s_info, &n_state, sizeof(AVCSliceInfo));
return ret;
} | 928 | True | 1 |
CVE-2021-40576 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/commit/ad18ece95fa064efc0995c4ab2c985f77fb166ec', 'name': 'https://github.com/gpac/gpac/commit/ad18ece95fa064efc0995c4ab2c985f77fb166ec', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/issues/1904', 'name': 'https://github.com/gpac/gpac/issues/1904', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:1.0.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The binary MP4Box in Gpac 1.0.1 has a null pointer dereference vulnerability in the gf_isom_get_payt_count function in hint_track.c, which allows attackers to cause a denial of service.'}] | 2022-01-14T16:38Z | 2022-01-13T19:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2021-09-01 13:45:04+02:00 | fixed #1904 | ad18ece95fa064efc0995c4ab2c985f77fb166ec | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | GetHintFormat | GetHintFormat( GF_TrackBox * trak) | ['trak'] | u32 GetHintFormat(GF_TrackBox *trak)
{
GF_HintMediaHeaderBox *hmhd = (GF_HintMediaHeaderBox *)trak->Media->information->InfoHeader;
if (hmhd->type != GF_ISOM_BOX_TYPE_HMHD)
return 0;
if (!hmhd || !hmhd->subType) {
GF_Box *a = (GF_Box *)gf_list_get(trak->Media->information->sampleTable->SampleDescription->child_boxes, 0);
if (!hmhd) return a ? a->type : 0;
if (a) hmhd->subType = a->type;
return hmhd->subType;
}
return hmhd->subType;
} | 108 | True | 1 |
CVE-2021-40575 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/issues/1905', 'name': 'https://github.com/gpac/gpac/issues/1905', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/5f2c2a16d30229b6241f02fa28e3d6b810d64858', 'name': 'https://github.com/gpac/gpac/commit/5f2c2a16d30229b6241f02fa28e3d6b810d64858', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:1.0.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The binary MP4Box in Gpac 1.0.1 has a null pointer dereference vulnerability in the mpgviddmx_process function in reframe_mpgvid.c, which allows attackers to cause a denial of service. This vulnerability is possibly due to an incomplete fix for CVE-2021-40566.'}] | 2022-01-14T16:38Z | 2022-01-13T19:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2021-09-01 13:50:54+02:00 | fixed #1905 | 5f2c2a16d30229b6241f02fa28e3d6b810d64858 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | mpgviddmx_process | mpgviddmx_process( GF_Filter * filter) | ['filter'] | GF_Err mpgviddmx_process(GF_Filter *filter)
{
GF_MPGVidDmxCtx *ctx = gf_filter_get_udta(filter);
GF_FilterPacket *pck, *dst_pck;
u64 byte_offset;
s64 vosh_start = -1;
s64 vosh_end = -1;
GF_Err e;
char *data;
u8 *start;
u32 pck_size;
s32 remain;
//always reparse duration
if (!ctx->duration.num)
mpgviddmx_check_dur(filter, ctx);
pck = gf_filter_pid_get_packet(ctx->ipid);
if (!pck) {
if (gf_filter_pid_is_eos(ctx->ipid)) {
mpgviddmx_enqueue_or_dispatch(ctx, NULL, GF_TRUE, GF_TRUE);
if (ctx->opid)
gf_filter_pid_set_eos(ctx->opid);
if (ctx->src_pck) gf_filter_pck_unref(ctx->src_pck);
ctx->src_pck = NULL;
return GF_EOS;
}
return GF_OK;
}
data = (char *) gf_filter_pck_get_data(pck, &pck_size);
byte_offset = gf_filter_pck_get_byte_offset(pck);
start = data;
remain = pck_size;
//input pid sets some timescale - we flushed pending data , update cts
if (!ctx->resume_from && ctx->timescale) {
u64 ts = gf_filter_pck_get_cts(pck);
if (ts != GF_FILTER_NO_TS) {
if (!ctx->cts || !ctx->recompute_cts)
ctx->cts = ts;
}
ts = gf_filter_pck_get_dts(pck);
if (ts != GF_FILTER_NO_TS) {
if (!ctx->dts || !ctx->recompute_cts)
ctx->dts = ts;
if (!ctx->prev_dts) ctx->prev_dts = ts;
else if (ctx->prev_dts != ts) {
u64 diff = ts;
diff -= ctx->prev_dts;
if (!ctx->cur_fps.den) ctx->cur_fps.den = (u32) diff;
else if (ctx->cur_fps.den > diff)
ctx->cur_fps.den = (u32) diff;
}
}
gf_filter_pck_get_framing(pck, &ctx->input_is_au_start, &ctx->input_is_au_end);
//this will force CTS recomput of each frame
if (ctx->recompute_cts) ctx->input_is_au_start = GF_FALSE;
if (ctx->src_pck) gf_filter_pck_unref(ctx->src_pck);
ctx->src_pck = pck;
gf_filter_pck_ref_props(&ctx->src_pck);
}
//we stored some data to find the complete vosh, aggregate this packet with current one
if (!ctx->resume_from && ctx->hdr_store_size) {
if (ctx->hdr_store_alloc < ctx->hdr_store_size + pck_size) {
ctx->hdr_store_alloc = ctx->hdr_store_size + pck_size;
ctx->hdr_store = gf_realloc(ctx->hdr_store, sizeof(char)*ctx->hdr_store_alloc);
}
memcpy(ctx->hdr_store + ctx->hdr_store_size, data, sizeof(char)*pck_size);
if (byte_offset != GF_FILTER_NO_BO) {
if (byte_offset >= ctx->hdr_store_size)
byte_offset -= ctx->hdr_store_size;
else
byte_offset = GF_FILTER_NO_BO;
}
ctx->hdr_store_size += pck_size;
start = data = ctx->hdr_store;
remain = pck_size = ctx->hdr_store_size;
}
if (ctx->resume_from) {
if (gf_filter_pid_would_block(ctx->opid))
return GF_OK;
//resume from data copied internally
if (ctx->hdr_store_size) {
assert(ctx->resume_from <= ctx->hdr_store_size);
start = data = ctx->hdr_store + ctx->resume_from;
remain = pck_size = ctx->hdr_store_size - ctx->resume_from;
} else {
assert(remain >= (s32) ctx->resume_from);
start += ctx->resume_from;
remain -= ctx->resume_from;
}
ctx->resume_from = 0;
}
if (!ctx->bs) {
ctx->bs = gf_bs_new(start, remain, GF_BITSTREAM_READ);
} else {
gf_bs_reassign_buffer(ctx->bs, start, remain);
}
if (!ctx->vparser) {
ctx->vparser = gf_m4v_parser_bs_new(ctx->bs, ctx->is_mpg12);
}
while (remain) {
Bool full_frame;
u8 *pck_data;
s32 current;
u8 sc_type, forced_sc_type=0;
Bool sc_type_forced = GF_FALSE;
Bool skip_pck = GF_FALSE;
u8 ftype;
u32 tinc;
u64 size=0;
u64 fstart;
Bool is_coded;
u32 bytes_from_store = 0;
u32 hdr_offset = 0;
Bool copy_last_bytes = GF_FALSE;
//not enough bytes to parse start code
if (remain<5) {
memcpy(ctx->hdr_store, start, remain);
ctx->bytes_in_header = remain;
break;
}
current = -1;
//we have some potential bytes of a start code in the store, copy some more bytes and check if valid start code.
//if not, dispatch these bytes as continuation of the data
if (ctx->bytes_in_header) {
memcpy(ctx->hdr_store + ctx->bytes_in_header, start, 8 - ctx->bytes_in_header);
current = mpgviddmx_next_start_code(ctx->hdr_store, 8);
//no start code in stored buffer
if ((current<0) || (current >= (s32) ctx->bytes_in_header) ) {
if (ctx->opid) {
dst_pck = gf_filter_pck_new_alloc(ctx->opid, ctx->bytes_in_header, &pck_data);
if (!dst_pck) return GF_OUT_OF_MEM;
if (ctx->src_pck) gf_filter_pck_merge_properties(ctx->src_pck, dst_pck);
gf_filter_pck_set_cts(dst_pck, GF_FILTER_NO_TS);
gf_filter_pck_set_dts(dst_pck, GF_FILTER_NO_TS);
memcpy(pck_data, ctx->hdr_store, ctx->bytes_in_header);
gf_filter_pck_set_framing(dst_pck, GF_FALSE, GF_FALSE);
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset - ctx->bytes_in_header);
}
mpgviddmx_enqueue_or_dispatch(ctx, dst_pck, GF_FALSE, GF_FALSE);
}
if (current<0) current = -1;
else current -= ctx->bytes_in_header;
ctx->bytes_in_header = 0;
} else {
//we have a valid start code, check which byte in our store or in the packet payload is the start code type
//and remember its location to reinit the parser from there
hdr_offset = 4 - ctx->bytes_in_header + current;
//bytes still to dispatch
bytes_from_store = ctx->bytes_in_header;
ctx->bytes_in_header = 0;
if (!hdr_offset) {
forced_sc_type = ctx->hdr_store[current+3];
} else {
forced_sc_type = start[hdr_offset-1];
}
sc_type_forced = GF_TRUE;
}
}
//no starcode in store, look for startcode in packet
if (current == -1) {
//locate next start code
current = mpgviddmx_next_start_code(start, remain);
//no start code, dispatch the block
if (current<0) {
u8 b3, b2, b1;
if (! ctx->frame_started) {
GF_LOG(GF_LOG_DEBUG, GF_LOG_MEDIA, ("[MPGVid] no start code in block and no frame started, discarding data\n" ));
break;
}
size = remain;
b3 = start[remain-3];
b2 = start[remain-2];
b1 = start[remain-1];
//we may have a startcode at the end of the packet, store it and don't dispatch the last 3 bytes !
if (!b1 || !b2 || !b3) {
copy_last_bytes = GF_TRUE;
assert(size >= 3);
size -= 3;
ctx->bytes_in_header = 3;
}
dst_pck = gf_filter_pck_new_alloc(ctx->opid, (u32) size, &pck_data);
if (!dst_pck) return GF_OUT_OF_MEM;
if (ctx->src_pck) gf_filter_pck_merge_properties(ctx->src_pck, dst_pck);
memcpy(pck_data, start, (size_t) size);
gf_filter_pck_set_framing(dst_pck, GF_FALSE, GF_FALSE);
gf_filter_pck_set_cts(dst_pck, GF_FILTER_NO_TS);
gf_filter_pck_set_dts(dst_pck, GF_FILTER_NO_TS);
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset);
}
mpgviddmx_enqueue_or_dispatch(ctx, dst_pck, GF_FALSE, GF_FALSE);
if (copy_last_bytes) {
memcpy(ctx->hdr_store, start+remain-3, 3);
}
break;
}
}
assert(current>=0);
//if we are in the middle of parsing the vosh, skip over bytes remaining from previous obj not parsed
if ((vosh_start>=0) && current) {
assert(remain>=current);
start += current;
remain -= current;
current = 0;
}
//also skip if no output pid
if (!ctx->opid && current) {
assert(remain>=current);
start += current;
remain -= current;
current = 0;
}
//dispatch remaining bytes
if (current>0) {
//flush remaining
dst_pck = gf_filter_pck_new_alloc(ctx->opid, current, &pck_data);
if (!dst_pck) return GF_OUT_OF_MEM;
if (ctx->src_pck) gf_filter_pck_merge_properties(ctx->src_pck, dst_pck);
gf_filter_pck_set_cts(dst_pck, GF_FILTER_NO_TS);
gf_filter_pck_set_dts(dst_pck, GF_FILTER_NO_TS);
gf_filter_pck_set_framing(dst_pck, GF_FALSE, GF_TRUE);
//bytes were partly in store, partly in packet
if (bytes_from_store) {
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset - bytes_from_store);
}
assert(bytes_from_store>=(u32) current);
bytes_from_store -= current;
memcpy(pck_data, ctx->hdr_store, current);
} else {
//bytes were only in packet
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset);
}
memcpy(pck_data, start, current);
assert(remain>=current);
start += current;
remain -= current;
current = 0;
}
gf_filter_pck_set_carousel_version(dst_pck, 1);
mpgviddmx_enqueue_or_dispatch(ctx, dst_pck, GF_FALSE, GF_FALSE);
}
//parse headers
//we have a start code loaded, eg the data packet does not have a full start code at the beginning
if (sc_type_forced) {
gf_bs_reassign_buffer(ctx->bs, start + hdr_offset, remain - hdr_offset);
sc_type = forced_sc_type;
} else {
gf_bs_reassign_buffer(ctx->bs, start, remain);
gf_bs_read_int(ctx->bs, 24);
sc_type = gf_bs_read_int(ctx->bs, 8);
}
if (ctx->is_mpg12) {
switch (sc_type) {
case M2V_SEQ_START_CODE:
case M2V_EXT_START_CODE:
gf_bs_reassign_buffer(ctx->bs, start, remain);
e = gf_m4v_parse_config(ctx->vparser, &ctx->dsi);
//not enough data, accumulate until we can parse the full header
if (e==GF_EOS) {
if (vosh_start<0) vosh_start = 0;
if (data == ctx->hdr_store) {
memmove(ctx->hdr_store, start, remain);
ctx->hdr_store_size = remain;
} else {
if (ctx->hdr_store_alloc < ctx->hdr_store_size + pck_size - vosh_start) {
ctx->hdr_store_alloc = (u32) (ctx->hdr_store_size + pck_size - vosh_start);
ctx->hdr_store = gf_realloc(ctx->hdr_store, sizeof(char)*ctx->hdr_store_alloc);
}
memcpy(ctx->hdr_store + ctx->hdr_store_size, data + vosh_start, (size_t) (pck_size - vosh_start) );
ctx->hdr_store_size += pck_size - (u32) vosh_start;
}
gf_filter_pid_drop_packet(ctx->ipid);
return GF_OK;
} else if (e != GF_OK) {
GF_LOG(GF_LOG_ERROR, GF_LOG_MEDIA, ("[MPGVid] Failed to parse VOS header: %s\n", gf_error_to_string(e) ));
} else {
mpgviddmx_check_pid(filter, ctx, 0, NULL);
}
break;
case M2V_PIC_START_CODE:
break;
default:
break;
}
} else {
u8 PL;
switch (sc_type) {
case M4V_VOS_START_CODE:
ctx->dsi.VideoPL = (u8) gf_bs_read_u8(ctx->bs);
vosh_start = start - (u8 *)data;
skip_pck = GF_TRUE;
assert(remain>=5);
start += 5;
remain -= 5;
break;
case M4V_VOL_START_CODE:
gf_bs_reassign_buffer(ctx->bs, start, remain);
PL = ctx->dsi.VideoPL;
e = gf_m4v_parse_config(ctx->vparser, &ctx->dsi);
ctx->dsi.VideoPL = PL;
//not enough data, accumulate until we can parse the full header
if (e==GF_EOS) {
if (vosh_start<0) vosh_start = 0;
if (data == ctx->hdr_store) {
memmove(ctx->hdr_store, start, remain);
ctx->hdr_store_size = remain;
} else {
if (ctx->hdr_store_alloc < ctx->hdr_store_size + pck_size - vosh_start) {
ctx->hdr_store_alloc = (u32) (ctx->hdr_store_size + pck_size - (u32) vosh_start);
ctx->hdr_store = gf_realloc(ctx->hdr_store, sizeof(char)*ctx->hdr_store_alloc);
}
memcpy(ctx->hdr_store + ctx->hdr_store_size, data + vosh_start, (size_t) (pck_size - vosh_start) );
ctx->hdr_store_size += pck_size - (u32) vosh_start;
}
gf_filter_pid_drop_packet(ctx->ipid);
return GF_OK;
} else if (e != GF_OK) {
GF_LOG(GF_LOG_ERROR, GF_LOG_MEDIA, ("[MPGVid] Failed to parse VOS header: %s\n", gf_error_to_string(e) ));
} else {
u32 obj_size = (u32) gf_m4v_get_object_start(ctx->vparser);
if (vosh_start<0) vosh_start = 0;
vosh_end = start - (u8 *)data + obj_size;
vosh_end -= vosh_start;
mpgviddmx_check_pid(filter, ctx,(u32) vosh_end, data+vosh_start);
skip_pck = GF_TRUE;
assert(remain>=(s32) obj_size);
start += obj_size;
remain -= obj_size;
}
break;
case M4V_VOP_START_CODE:
case M4V_GOV_START_CODE:
break;
case M4V_VO_START_CODE:
case M4V_VISOBJ_START_CODE:
default:
if (vosh_start>=0) {
skip_pck = GF_TRUE;
assert(remain>=4);
start += 4;
remain -= 4;
}
break;
}
}
if (skip_pck) {
continue;
}
if (!ctx->opid) {
assert(remain>=4);
start += 4;
remain -= 4;
continue;
}
if (!ctx->is_playing) {
ctx->resume_from = (u32) ((char *)start - (char *)data);
return GF_OK;
}
//at this point, we no longer reaggregate packets
ctx->hdr_store_size = 0;
if (ctx->in_seek) {
u64 nb_frames_at_seek = (u64) (ctx->start_range * ctx->cur_fps.num);
if (ctx->cts + ctx->cur_fps.den >= nb_frames_at_seek) {
//u32 samples_to_discard = (ctx->cts + ctx->dts_inc) - nb_samples_at_seek;
ctx->in_seek = GF_FALSE;
}
}
//may happen that after all our checks, only 4 bytes are left, continue to store these 4 bytes
if (remain<5)
continue;
//good to go
gf_m4v_parser_reset(ctx->vparser, sc_type_forced ? forced_sc_type + 1 : 0);
size = 0;
e = gf_m4v_parse_frame(ctx->vparser, &ctx->dsi, &ftype, &tinc, &size, &fstart, &is_coded);
//true if we strip VO and VISOBJ assert(!fstart);
//we skipped bytes already in store + end of start code present in packet, so the size of the first object
//needs adjustement
if (bytes_from_store) {
size += bytes_from_store + hdr_offset;
}
if ((e == GF_EOS) && !ctx->input_is_au_end) {
u8 b3 = start[remain-3];
u8 b2 = start[remain-2];
u8 b1 = start[remain-1];
//we may have a startcode at the end of the packet, store it and don't dispatch the last 3 bytes !
if (!b1 || !b2 || !b3) {
copy_last_bytes = GF_TRUE;
assert(size >= 3);
size -= 3;
ctx->bytes_in_header = 3;
}
full_frame = GF_FALSE;
} else {
full_frame = GF_TRUE;
}
if (!is_coded) {
/*if prev is B and we're parsing a packed bitstream discard n-vop*/
if (ctx->forced_packed && ctx->b_frames) {
ctx->is_packed = GF_TRUE;
assert(remain>=size);
start += size;
remain -= (s32) size;
continue;
}
/*policy is to import at variable frame rate, skip*/
if (ctx->vfr) {
ctx->is_vfr = GF_TRUE;
mpgviddmx_update_time(ctx);
assert(remain>=size);
start += size;
remain -= (s32) size;
continue;
}
/*policy is to keep non coded frame (constant frame rate), add*/
}
if (ftype==2) {
//count number of B-frames since last ref
ctx->b_frames++;
ctx->nb_b++;
} else {
//flush all pending packets
mpgviddmx_enqueue_or_dispatch(ctx, NULL, GF_TRUE, GF_FALSE);
//remeber the CTS of the last ref
ctx->last_ref_cts = ctx->cts;
if (ctx->max_b < ctx->b_frames) ctx->max_b = ctx->b_frames;
ctx->b_frames = 0;
if (ftype)
ctx->nb_p++;
else
ctx->nb_i++;
}
ctx->nb_frames++;
dst_pck = gf_filter_pck_new_alloc(ctx->opid, (u32) size, &pck_data);
if (!dst_pck) return GF_OUT_OF_MEM;
if (ctx->src_pck) gf_filter_pck_merge_properties(ctx->src_pck, dst_pck);
//bytes come from both our store and the data packet
if (bytes_from_store) {
memcpy(pck_data, ctx->hdr_store+current, bytes_from_store);
assert(size >= bytes_from_store);
size -= bytes_from_store;
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset - bytes_from_store);
}
memcpy(pck_data + bytes_from_store, start, (size_t) size);
} else {
//bytes only come the data packet
memcpy(pck_data, start, (size_t) size);
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset + start - (u8 *) data);
}
}
assert(pck_data[0] == 0);
assert(pck_data[1] == 0);
assert(pck_data[2] == 0x01);
gf_filter_pck_set_framing(dst_pck, GF_TRUE, (full_frame || ctx->input_is_au_end) ? GF_TRUE : GF_FALSE);
gf_filter_pck_set_cts(dst_pck, ctx->cts);
gf_filter_pck_set_dts(dst_pck, ctx->dts);
if (ctx->input_is_au_start) {
ctx->input_is_au_start = GF_FALSE;
} else {
//we use the carousel flag temporarly to indicate the cts must be recomputed
gf_filter_pck_set_carousel_version(dst_pck, 1);
}
gf_filter_pck_set_sap(dst_pck, ftype ? GF_FILTER_SAP_NONE : GF_FILTER_SAP_1);
gf_filter_pck_set_duration(dst_pck, ctx->cur_fps.den);
if (ctx->in_seek) gf_filter_pck_set_seek_flag(dst_pck, GF_TRUE);
ctx->frame_started = GF_TRUE;
mpgviddmx_enqueue_or_dispatch(ctx, dst_pck, GF_FALSE, GF_FALSE);
mpgviddmx_update_time(ctx);
if (!full_frame) {
if (copy_last_bytes) {
memcpy(ctx->hdr_store, start+remain-3, 3);
}
break;
}
assert(remain>=size);
start += size;
remain -= (s32) size;
}
gf_filter_pid_drop_packet(ctx->ipid);
return GF_OK;
} | 3013 | True | 1 |
CVE-2021-4043 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://huntr.dev/bounties/d7a534cb-df7a-48ba-8ce3-46b1551a9c47', 'name': 'https://huntr.dev/bounties/d7a534cb-df7a-48ba-8ce3-46b1551a9c47', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/64a2e1b799352ac7d7aad1989bc06e7b0f2b01db', 'name': 'https://github.com/gpac/gpac/commit/64a2e1b799352ac7d7aad1989bc06e7b0f2b01db', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.1.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'NULL Pointer Dereference in GitHub repository gpac/gpac prior to 1.1.0.'}] | 2022-02-09T03:13Z | 2022-02-04T23:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2022-02-01 15:28:23+01:00 | fixed #2092 | 64a2e1b799352ac7d7aad1989bc06e7b0f2b01db | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gitn_box_del | gitn_box_del( GF_Box * s) | ['s'] |
void gitn_box_del(GF_Box *s)
{
u32 i;
GroupIdToNameBox *ptr = (GroupIdToNameBox *)s;
if (ptr == NULL) return;
for (i=0; i<ptr->nb_entries; i++) {
if (ptr->entries[i].name) gf_free(ptr->entries[i].name);
}
if (ptr->entries) gf_free(ptr->entries);
gf_free(ptr); | 87 | True | 1 |
CVE-2022-1035 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://huntr.dev/bounties/851942a4-1d64-4553-8fdc-9fccd167864b', 'name': 'https://huntr.dev/bounties/851942a4-1d64-4553-8fdc-9fccd167864b', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/3718d583c6ade191dc7979c64f48c001ca6f0243', 'name': 'https://github.com/gpac/gpac/commit/3718d583c6ade191dc7979c64f48c001ca6f0243', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Segmentation Fault caused by MP4Box -lsr in GitHub repository gpac/gpac prior to 2.1.0-DEV.'}] | 2022-03-28T17:10Z | 2022-03-21T13:15Z | Insufficient Information | There is insufficient information about the issue to classify it; details are unkown or unspecified. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | jeanlf | 2022-03-17 12:00:55+01:00 | fixed #2146 | 3718d583c6ade191dc7979c64f48c001ca6f0243 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_dump_vrml_simple_field | gf_dump_vrml_simple_field( GF_SceneDumper * sdump , GF_FieldInfo field , GF_Node * parent) | ['sdump', 'field', 'parent'] | static void gf_dump_vrml_simple_field(GF_SceneDumper *sdump, GF_FieldInfo field, GF_Node *parent)
{
u32 i, sf_type;
GF_ChildNodeItem *list;
void *slot_ptr;
switch (field.fieldType) {
case GF_SG_VRML_SFNODE:
assert ( *(GF_Node **)field.far_ptr);
gf_dump_vrml_node(sdump, *(GF_Node **)field.far_ptr, 0, NULL);
return;
case GF_SG_VRML_MFNODE:
list = * ((GF_ChildNodeItem **) field.far_ptr);
assert( list );
sdump->indent++;
while (list) {
gf_dump_vrml_node(sdump, list->node, 1, NULL);
list = list->next;
}
sdump->indent--;
return;
case GF_SG_VRML_SFCOMMANDBUFFER:
return;
}
if (gf_sg_vrml_is_sf_field(field.fieldType)) {
if (sdump->XMLDump) StartAttribute(sdump, "value");
gf_dump_vrml_sffield(sdump, field.fieldType, field.far_ptr, 0, parent);
if (sdump->XMLDump) EndAttribute(sdump);
} else {
GenMFField *mffield;
mffield = (GenMFField *) field.far_ptr;
sf_type = gf_sg_vrml_get_sf_type(field.fieldType);
if (!sdump->XMLDump) {
gf_fprintf(sdump->trace, "[");
} else if (sf_type==GF_SG_VRML_SFSTRING) {
gf_fprintf(sdump->trace, " value=\'");
} else {
StartAttribute(sdump, "value");
}
for (i=0; i<mffield->count; i++) {
if (i) gf_fprintf(sdump->trace, " ");
gf_sg_vrml_mf_get_item(field.far_ptr, field.fieldType, &slot_ptr, i);
/*this is to cope with single MFString which shall appear as SF in XMT*/
gf_dump_vrml_sffield(sdump, sf_type, slot_ptr, 1, parent);
}
if (!sdump->XMLDump) {
gf_fprintf(sdump->trace, "]");
} else if (sf_type==GF_SG_VRML_SFSTRING) {
gf_fprintf(sdump->trace, "\'");
} else {
EndAttribute(sdump);
}
}
} | 361 | True | 1 |
CVE-2022-1222 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/commit/7f060bbb72966cae80d6fee338d0b07fa3fc06e1', 'name': 'https://github.com/gpac/gpac/commit/7f060bbb72966cae80d6fee338d0b07fa3fc06e1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://huntr.dev/bounties/f8cb85b8-7ff3-47f1-a9a6-7080eb371a3d', 'name': 'https://huntr.dev/bounties/f8cb85b8-7ff3-47f1-a9a6-7080eb371a3d', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-835'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Inf loop in GitHub repository gpac/gpac prior to 2.1.0-DEV.'}] | 2022-04-11T17:04Z | 2022-04-04T10:15Z | Loop with Unreachable Exit Condition ('Infinite Loop') | The program contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. | If the loop can be influenced by an attacker, this weakness could allow attackers to consume excessive resources such as CPU or memory.
| https://cwe.mitre.org/data/definitions/835.html | 0 | jeanlf | 2022-03-31 13:57:05+02:00 | fixed #2159 | 7f060bbb72966cae80d6fee338d0b07fa3fc06e1 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | avi_parse_input_file | avi_parse_input_file( avi_t * AVI , int getIndex) | ['AVI', 'getIndex'] | int avi_parse_input_file(avi_t *AVI, int getIndex)
{
int i, rate, scale, idx_type;
s64 n;
unsigned char *hdrl_data;
u64 header_offset=0;
int hdrl_len=0;
int nvi, nai[AVI_MAX_TRACKS], ioff;
u64 tot[AVI_MAX_TRACKS];
u32 j;
int lasttag = 0;
int vids_strh_seen = 0;
int vids_strf_seen = 0;
int auds_strh_seen = 0;
// int auds_strf_seen = 0;
int num_stream = 0;
char data[256];
s64 oldpos=-1, newpos=-1;
int aud_chunks = 0;
if (!AVI) {
AVI_errno = AVI_ERR_OPEN;
return 0;
}
/* Read first 12 bytes and check that this is an AVI file */
if (avi_read(AVI->fdes,data,12) != 12 )
ERR_EXIT(AVI_ERR_READ)
if (strnicmp(data ,"RIFF",4) !=0 || strnicmp(data+8,"AVI ",4) !=0 )
ERR_EXIT(AVI_ERR_NO_AVI)
/* Go through the AVI file and extract the header list,
the start position of the 'movi' list and an optionally
present idx1 tag */
hdrl_data = 0;
while(1)
{
if( avi_read(AVI->fdes,data,8) != 8 ) break; /* We assume it's EOF */
newpos = gf_ftell(AVI->fdes);
if(oldpos==newpos) {
/* This is a broken AVI stream... */
return -1;
}
oldpos=newpos;
n = str2ulong((unsigned char *)data+4);
n = PAD_EVEN(n);
if(strnicmp(data,"LIST",4) == 0)
{
if( avi_read(AVI->fdes,data,4) != 4 ) ERR_EXIT(AVI_ERR_READ)
n -= 4;
if(strnicmp(data,"hdrl",4) == 0)
{
hdrl_len = (u32) n;
hdrl_data = (unsigned char *) gf_malloc((u32)n);
if(hdrl_data==0) ERR_EXIT(AVI_ERR_NO_MEM);
// offset of header
header_offset = gf_ftell(AVI->fdes);
if( avi_read(AVI->fdes,(char *)hdrl_data, (u32) n) != n ) ERR_EXIT(AVI_ERR_READ)
}
else if(strnicmp(data,"movi",4) == 0)
{
AVI->movi_start = gf_ftell(AVI->fdes);
if (gf_fseek(AVI->fdes,n,SEEK_CUR)==(u64)-1) break;
}
else if (gf_fseek(AVI->fdes,n,SEEK_CUR)==(u64)-1) break;
}
else if(strnicmp(data,"idx1",4) == 0)
{
/* n must be a multiple of 16, but the reading does not
break if this is not the case */
AVI->n_idx = AVI->max_idx = (u32) (n/16);
AVI->idx = (unsigned char((*)[16]) ) gf_malloc((u32)n);
if(AVI->idx==0) ERR_EXIT(AVI_ERR_NO_MEM)
if(avi_read(AVI->fdes, (char *) AVI->idx, (u32) n) != n ) {
gf_free( AVI->idx);
AVI->idx=NULL;
AVI->n_idx = 0;
}
}
else
gf_fseek(AVI->fdes,n,SEEK_CUR);
}
if(!hdrl_data ) ERR_EXIT(AVI_ERR_NO_HDRL)
if(!AVI->movi_start) ERR_EXIT(AVI_ERR_NO_MOVI)
/* Interpret the header list */
for(i=0; i<hdrl_len;)
{
/* List tags are completly ignored */
#ifdef DEBUG_ODML
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] TAG %c%c%c%c\n", (hdrl_data+i)[0], (hdrl_data+i)[1], (hdrl_data+i)[2], (hdrl_data+i)[3]));
#endif
if(strnicmp((char *)hdrl_data+i,"LIST",4)==0) {
i+= 12;
continue;
}
n = str2ulong(hdrl_data+i+4);
n = PAD_EVEN(n);
/* Interpret the tag and its args */
if(strnicmp((char *)hdrl_data+i,"strh",4)==0)
{
i += 8;
#ifdef DEBUG_ODML
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] TAG %c%c%c%c\n", (hdrl_data+i)[0], (hdrl_data+i)[1], (hdrl_data+i)[2], (hdrl_data+i)[3]));
#endif
if(strnicmp((char *)hdrl_data+i,"vids",4) == 0 && !vids_strh_seen)
{
memcpy(AVI->compressor,hdrl_data+i+4,4);
AVI->compressor[4] = 0;
// ThOe
AVI->v_codech_off = header_offset + i+4;
scale = str2ulong(hdrl_data+i+20);
rate = str2ulong(hdrl_data+i+24);
if(scale!=0) AVI->fps = (double)rate/(double)scale;
AVI->video_frames = str2ulong(hdrl_data+i+32);
AVI->video_strn = num_stream;
AVI->max_len = 0;
vids_strh_seen = 1;
lasttag = 1; /* vids */
memcpy(&AVI->video_stream_header, hdrl_data + i,
sizeof(alAVISTREAMHEADER));
}
else if (strnicmp ((char *)hdrl_data+i,"auds",4) ==0 && ! auds_strh_seen)
{
//inc audio tracks
AVI->aptr=AVI->anum;
++AVI->anum;
if(AVI->anum > AVI_MAX_TRACKS) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[avilib] error - only %d audio tracks supported\n", AVI_MAX_TRACKS));
return(-1);
}
AVI->track[AVI->aptr].audio_bytes = str2ulong(hdrl_data+i+32)*avi_sampsize(AVI, 0);
AVI->track[AVI->aptr].audio_strn = num_stream;
// if samplesize==0 -> vbr
AVI->track[AVI->aptr].a_vbr = !str2ulong(hdrl_data+i+44);
AVI->track[AVI->aptr].padrate = str2ulong(hdrl_data+i+24);
memcpy(&AVI->stream_headers[AVI->aptr], hdrl_data + i,
sizeof(alAVISTREAMHEADER));
// auds_strh_seen = 1;
lasttag = 2; /* auds */
// ThOe
AVI->track[AVI->aptr].a_codech_off = header_offset + i;
}
else if (strnicmp ((char*)hdrl_data+i,"iavs",4) ==0 && ! auds_strh_seen) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[avilib] AVILIB: error - DV AVI Type 1 no supported\n"));
return (-1);
}
else
lasttag = 0;
num_stream++;
}
else if(strnicmp((char*)hdrl_data+i,"dmlh",4) == 0) {
AVI->total_frames = str2ulong(hdrl_data+i+8);
#ifdef DEBUG_ODML
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] real number of frames %d\n", AVI->total_frames));
#endif
i += 8;
}
else if(strnicmp((char *)hdrl_data+i,"strf",4)==0)
{
i += 8;
if(lasttag == 1)
{
alBITMAPINFOHEADER bih;
memcpy(&bih, hdrl_data + i, sizeof(alBITMAPINFOHEADER));
AVI->bitmap_info_header = (alBITMAPINFOHEADER *)
gf_malloc(str2ulong((unsigned char *)&bih.bi_size));
if (AVI->bitmap_info_header != NULL)
memcpy(AVI->bitmap_info_header, hdrl_data + i,
str2ulong((unsigned char *)&bih.bi_size));
AVI->width = str2ulong(hdrl_data+i+4);
AVI->height = str2ulong(hdrl_data+i+8);
vids_strf_seen = 1;
//ThOe
AVI->v_codecf_off = header_offset + i+16;
memcpy(AVI->compressor2, hdrl_data+i+16, 4);
AVI->compressor2[4] = 0;
if (n>40) {
AVI->extradata_size = (u32) (n - 40);
AVI->extradata = gf_malloc(sizeof(u8)* AVI->extradata_size);
memcpy(AVI->extradata, hdrl_data + i + 40, AVI->extradata_size);
}
}
else if(lasttag == 2)
{
alWAVEFORMATEX *wfe;
char *nwfe;
int wfes;
if ((u32) (hdrl_len - i) < sizeof(alWAVEFORMATEX))
wfes = hdrl_len - i;
else
wfes = sizeof(alWAVEFORMATEX);
wfe = (alWAVEFORMATEX *)gf_malloc(sizeof(alWAVEFORMATEX));
if (wfe != NULL) {
memset(wfe, 0, sizeof(alWAVEFORMATEX));
memcpy(wfe, hdrl_data + i, wfes);
if (str2ushort((unsigned char *)&wfe->cb_size) != 0) {
nwfe = (char *)
gf_realloc(wfe, sizeof(alWAVEFORMATEX) +
str2ushort((unsigned char *)&wfe->cb_size));
if (nwfe != 0) {
s64 lpos = gf_ftell(AVI->fdes);
gf_fseek(AVI->fdes, header_offset + i + sizeof(alWAVEFORMATEX),
SEEK_SET);
wfe = (alWAVEFORMATEX *)nwfe;
nwfe = &nwfe[sizeof(alWAVEFORMATEX)];
avi_read(AVI->fdes, nwfe,
str2ushort((unsigned char *)&wfe->cb_size));
gf_fseek(AVI->fdes, lpos, SEEK_SET);
}
}
AVI->wave_format_ex[AVI->aptr] = wfe;
}
AVI->track[AVI->aptr].a_fmt = str2ushort(hdrl_data+i );
//ThOe
AVI->track[AVI->aptr].a_codecf_off = header_offset + i;
AVI->track[AVI->aptr].a_chans = str2ushort(hdrl_data+i+2);
AVI->track[AVI->aptr].a_rate = str2ulong (hdrl_data+i+4);
//ThOe: read mp3bitrate
AVI->track[AVI->aptr].mp3rate = 8*str2ulong(hdrl_data+i+8)/1000;
//:ThOe
AVI->track[AVI->aptr].a_bits = str2ushort(hdrl_data+i+14);
// auds_strf_seen = 1;
}
}
else if(strnicmp((char*)hdrl_data+i,"indx",4) == 0) {
char *a;
if(lasttag == 1) // V I D E O
{
a = (char*)hdrl_data+i;
AVI->video_superindex = (avisuperindex_chunk *) gf_malloc (sizeof (avisuperindex_chunk));
memset(AVI->video_superindex, 0, sizeof (avisuperindex_chunk));
memcpy (AVI->video_superindex->fcc, a, 4);
a += 4;
AVI->video_superindex->dwSize = str2ulong((unsigned char *)a);
a += 4;
AVI->video_superindex->wLongsPerEntry = str2ushort((unsigned char *)a);
a += 2;
AVI->video_superindex->bIndexSubType = *a;
a += 1;
AVI->video_superindex->bIndexType = *a;
a += 1;
AVI->video_superindex->nEntriesInUse = str2ulong((unsigned char *)a);
a += 4;
memcpy (AVI->video_superindex->dwChunkId, a, 4);
a += 4;
// 3 * reserved
a += 4;
a += 4;
a += 4;
if (AVI->video_superindex->bIndexSubType != 0) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[avilib] Invalid Header, bIndexSubType != 0\n"));
}
AVI->video_superindex->aIndex = (avisuperindex_entry*)
gf_malloc (AVI->video_superindex->wLongsPerEntry * AVI->video_superindex->nEntriesInUse * sizeof (u32));
// position of ix## chunks
for (j=0; j<AVI->video_superindex->nEntriesInUse; ++j) {
AVI->video_superindex->aIndex[j].qwOffset = str2ullong ((unsigned char*)a);
a += 8;
AVI->video_superindex->aIndex[j].dwSize = str2ulong ((unsigned char*)a);
a += 4;
AVI->video_superindex->aIndex[j].dwDuration = str2ulong ((unsigned char*)a);
a += 4;
#ifdef DEBUG_ODML
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] [%d] 0x%llx 0x%lx %lu\n", j,
(unsigned int long)AVI->video_superindex->aIndex[j].qwOffset,
(unsigned long)AVI->video_superindex->aIndex[j].dwSize,
(unsigned long)AVI->video_superindex->aIndex[j].dwDuration));
#endif
}
#ifdef DEBUG_ODML
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] FOURCC \"%c%c%c%c\"\n", AVI->video_superindex->fcc[0], AVI->video_superindex->fcc[1],
AVI->video_superindex->fcc[2], AVI->video_superindex->fcc[3]));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] LEN \"%ld\"\n", (long)AVI->video_superindex->dwSize));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] wLongsPerEntry \"%d\"\n", AVI->video_superindex->wLongsPerEntry));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] bIndexSubType \"%d\"\n", AVI->video_superindex->bIndexSubType));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] bIndexType \"%d\"\n", AVI->video_superindex->bIndexType));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] nEntriesInUse \"%ld\"\n", (long)AVI->video_superindex->nEntriesInUse));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] dwChunkId \"%c%c%c%c\"\n", AVI->video_superindex->dwChunkId[0], AVI->video_superindex->dwChunkId[1],
AVI->video_superindex->dwChunkId[2], AVI->video_superindex->dwChunkId[3]));
#endif
AVI->is_opendml = 1;
}
else if(lasttag == 2) // A U D I O
{
a = (char*) hdrl_data+i;
AVI->track[AVI->aptr].audio_superindex = (avisuperindex_chunk *) gf_malloc (sizeof (avisuperindex_chunk));
memcpy (AVI->track[AVI->aptr].audio_superindex->fcc, a, 4);
a += 4;
AVI->track[AVI->aptr].audio_superindex->dwSize = str2ulong((unsigned char*)a);
a += 4;
AVI->track[AVI->aptr].audio_superindex->wLongsPerEntry = str2ushort((unsigned char*)a);
a += 2;
AVI->track[AVI->aptr].audio_superindex->bIndexSubType = *a;
a += 1;
AVI->track[AVI->aptr].audio_superindex->bIndexType = *a;
a += 1;
AVI->track[AVI->aptr].audio_superindex->nEntriesInUse = str2ulong((unsigned char*)a);
a += 4;
memcpy (AVI->track[AVI->aptr].audio_superindex->dwChunkId, a, 4);
a += 4;
// 3 * reserved
a += 4;
a += 4;
a += 4;
if (AVI->track[AVI->aptr].audio_superindex->bIndexSubType != 0) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[avilib] Invalid Header, bIndexSubType != 0\n"));
}
AVI->track[AVI->aptr].audio_superindex->aIndex = (avisuperindex_entry*)
gf_malloc (AVI->track[AVI->aptr].audio_superindex->wLongsPerEntry *
AVI->track[AVI->aptr].audio_superindex->nEntriesInUse * sizeof (u32));
// position of ix## chunks
for (j=0; j<AVI->track[AVI->aptr].audio_superindex->nEntriesInUse; ++j) {
AVI->track[AVI->aptr].audio_superindex->aIndex[j].qwOffset = str2ullong ((unsigned char*)a);
a += 8;
AVI->track[AVI->aptr].audio_superindex->aIndex[j].dwSize = str2ulong ((unsigned char*)a);
a += 4;
AVI->track[AVI->aptr].audio_superindex->aIndex[j].dwDuration = str2ulong ((unsigned char*)a);
a += 4;
#ifdef DEBUG_ODML
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] [%d] 0x%llx 0x%lx %lu\n", j,
(unsigned int long)AVI->track[AVI->aptr].audio_superindex->aIndex[j].qwOffset,
(unsigned long)AVI->track[AVI->aptr].audio_superindex->aIndex[j].dwSize,
(unsigned long)AVI->track[AVI->aptr].audio_superindex->aIndex[j].dwDuration));
#endif
}
AVI->track[AVI->aptr].audio_superindex->stdindex = NULL;
#ifdef DEBUG_ODML
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] FOURCC \"%.4s\"\n", AVI->track[AVI->aptr].audio_superindex->fcc));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] LEN \"%ld\"\n", (long)AVI->track[AVI->aptr].audio_superindex->dwSize));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] wLongsPerEntry \"%d\"\n", AVI->track[AVI->aptr].audio_superindex->wLongsPerEntry));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] bIndexSubType \"%d\"\n", AVI->track[AVI->aptr].audio_superindex->bIndexSubType));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] bIndexType \"%d\"\n", AVI->track[AVI->aptr].audio_superindex->bIndexType));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] nEntriesInUse \"%ld\"\n", (long)AVI->track[AVI->aptr].audio_superindex->nEntriesInUse));
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] dwChunkId \"%.4s\"\n", AVI->track[AVI->aptr].audio_superindex->dwChunkId[0]));
#endif
}
i += 8;
}
else if((strnicmp((char*)hdrl_data+i,"JUNK",4) == 0) ||
(strnicmp((char*)hdrl_data+i,"strn",4) == 0) ||
(strnicmp((char*)hdrl_data+i,"vprp",4) == 0)) {
i += 8;
// do not reset lasttag
} else
{
i += 8;
lasttag = 0;
}
//GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] adding %ld bytes\n", (int int)n));
i += (u32) n;
}
gf_free(hdrl_data);
if(!vids_strh_seen || !vids_strf_seen) ERR_EXIT(AVI_ERR_NO_VIDS)
AVI->video_tag[0] = AVI->video_strn/10 + '0';
AVI->video_tag[1] = AVI->video_strn%10 + '0';
AVI->video_tag[2] = 'd';
AVI->video_tag[3] = 'b';
/* Audio tag is set to "99wb" if no audio present */
if(!AVI->track[0].a_chans) AVI->track[0].audio_strn = 99;
{
int tk=0;
for(j=0; j<AVI->anum+1; ++j) {
if (j == AVI->video_strn) continue;
AVI->track[tk].audio_tag[0] = j/10 + '0';
AVI->track[tk].audio_tag[1] = j%10 + '0';
AVI->track[tk].audio_tag[2] = 'w';
AVI->track[tk].audio_tag[3] = 'b';
++tk;
}
}
gf_fseek(AVI->fdes,AVI->movi_start,SEEK_SET);
if(!getIndex) return(0);
/* if the file has an idx1, check if this is relative
to the start of the file or to the start of the movi list */
idx_type = 0;
if(AVI->idx)
{
s64 pos, len;
/* Search the first videoframe in the idx1 and look where
it is in the file */
for(i=0; i<AVI->n_idx; i++)
if( strnicmp((char *)AVI->idx[i],(char *)AVI->video_tag,3)==0 ) break;
if(i>=AVI->n_idx) ERR_EXIT(AVI_ERR_NO_VIDS)
pos = str2ulong(AVI->idx[i]+ 8);
len = str2ulong(AVI->idx[i]+12);
gf_fseek(AVI->fdes,pos,SEEK_SET);
if(avi_read(AVI->fdes,data,8)!=8) ERR_EXIT(AVI_ERR_READ)
if( strnicmp(data,(char *)AVI->idx[i],4)==0 && str2ulong((unsigned char *)data+4)==len )
{
idx_type = 1; /* Index from start of file */
}
else
{
gf_fseek(AVI->fdes,pos+AVI->movi_start-4,SEEK_SET);
if(avi_read(AVI->fdes,data,8)!=8) ERR_EXIT(AVI_ERR_READ)
if( strnicmp(data,(char *)AVI->idx[i],4)==0 && str2ulong((unsigned char *)data+4)==len )
{
idx_type = 2; /* Index from start of movi list */
}
}
/* idx_type remains 0 if neither of the two tests above succeeds */
}
if(idx_type == 0 && !AVI->is_opendml && !AVI->total_frames)
{
/* we must search through the file to get the index */
gf_fseek(AVI->fdes, AVI->movi_start, SEEK_SET);
AVI->n_idx = 0;
while(1)
{
if( avi_read(AVI->fdes,data,8) != 8 ) break;
n = str2ulong((unsigned char *)data+4);
/* The movi list may contain sub-lists, ignore them */
if(strnicmp(data,"LIST",4)==0)
{
gf_fseek(AVI->fdes,4,SEEK_CUR);
continue;
}
/* Check if we got a tag ##db, ##dc or ##wb */
if( ( (data[2]=='d' || data[2]=='D') &&
(data[3]=='b' || data[3]=='B' || data[3]=='c' || data[3]=='C') )
|| ( (data[2]=='w' || data[2]=='W') &&
(data[3]=='b' || data[3]=='B') ) )
{
u64 __pos = gf_ftell(AVI->fdes) - 8;
avi_add_index_entry(AVI,(unsigned char *)data,0,__pos,n);
}
gf_fseek(AVI->fdes,PAD_EVEN(n),SEEK_CUR);
}
idx_type = 1;
}
// ************************
// OPENDML
// ************************
// read extended index chunks
if (AVI->is_opendml) {
u64 offset = 0;
hdrl_len = 4+4+2+1+1+4+4+8+4;
char *en, *chunk_start;
int k = 0;
u32 audtr = 0;
u32 nrEntries = 0;
AVI->video_index = NULL;
nvi = 0;
for(audtr=0; audtr<AVI->anum; ++audtr) {
nai[audtr] = 0;
tot[audtr] = 0;
}
// ************************
// VIDEO
// ************************
for (j=0; j<AVI->video_superindex->nEntriesInUse; j++) {
// read from file
chunk_start = en = (char*) gf_malloc ((u32) (AVI->video_superindex->aIndex[j].dwSize+hdrl_len) );
if (gf_fseek(AVI->fdes, AVI->video_superindex->aIndex[j].qwOffset, SEEK_SET) == (u64)-1) {
gf_free(chunk_start);
continue;
}
if (avi_read(AVI->fdes, en, (u32) (AVI->video_superindex->aIndex[j].dwSize+hdrl_len) ) <= 0) {
gf_free(chunk_start);
continue;
}
nrEntries = str2ulong((unsigned char*)en + 12);
#ifdef DEBUG_ODML
//GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] [%d:0] Video nrEntries %ld\n", j, nrEntries));
#endif
offset = str2ullong((unsigned char*)en + 20);
// skip header
en += hdrl_len;
nvi += nrEntries;
AVI->video_index = (video_index_entry *) gf_realloc (AVI->video_index, nvi * sizeof (video_index_entry));
if (!AVI->video_index) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[avilib] out of mem (size = %ld)\n", nvi * sizeof (video_index_entry)));
exit(1);
}
while (k < nvi) {
AVI->video_index[k].pos = offset + str2ulong((unsigned char*)en);
en += 4;
AVI->video_index[k].len = str2ulong_len((unsigned char*)en);
AVI->video_index[k].key = str2ulong_key((unsigned char*)en);
en += 4;
// completely empty chunk
if (AVI->video_index[k].pos-offset == 0 && AVI->video_index[k].len == 0) {
k--;
nvi--;
}
#ifdef DEBUG_ODML
/*
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] [%d] POS 0x%llX len=%d key=%s offset (%llx) (%ld)\n", k,
AVI->video_index[k].pos,
(int)AVI->video_index[k].len,
AVI->video_index[k].key?"yes":"no ", offset,
AVI->video_superindex->aIndex[j].dwSize));
*/
#endif
k++;
}
gf_free(chunk_start);
}
AVI->video_frames = nvi;
// this should deal with broken 'rec ' odml files.
if (AVI->video_frames == 0) {
AVI->is_opendml=0;
goto multiple_riff;
}
// ************************
// AUDIO
// ************************
for(audtr=0; audtr<AVI->anum; ++audtr) {
k = 0;
if (!AVI->track[audtr].audio_superindex) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[avilib] (%s) cannot read audio index for track %d\n", __FILE__, audtr));
continue;
}
for (j=0; j<AVI->track[audtr].audio_superindex->nEntriesInUse; j++) {
// read from file
chunk_start = en = (char*)gf_malloc ((u32) (AVI->track[audtr].audio_superindex->aIndex[j].dwSize+hdrl_len));
if (gf_fseek(AVI->fdes, AVI->track[audtr].audio_superindex->aIndex[j].qwOffset, SEEK_SET) == (u64)-1) {
gf_free(chunk_start);
continue;
}
if (avi_read(AVI->fdes, en, (u32) (AVI->track[audtr].audio_superindex->aIndex[j].dwSize+hdrl_len)) <= 0) {
gf_free(chunk_start);
continue;
}
nrEntries = str2ulong((unsigned char*)en + 12);
//if (nrEntries > 50) nrEntries = 2; // XXX
#ifdef DEBUG_ODML
//GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] [%d:%d] Audio nrEntries %ld\n", j, audtr, nrEntries));
#endif
offset = str2ullong((unsigned char*)en + 20);
// skip header
en += hdrl_len;
nai[audtr] += nrEntries;
AVI->track[audtr].audio_index = (audio_index_entry *) gf_realloc (AVI->track[audtr].audio_index, nai[audtr] * sizeof (audio_index_entry));
while (k < nai[audtr]) {
AVI->track[audtr].audio_index[k].pos = offset + str2ulong((unsigned char*)en);
en += 4;
AVI->track[audtr].audio_index[k].len = str2ulong_len((unsigned char*)en);
en += 4;
AVI->track[audtr].audio_index[k].tot = tot[audtr];
tot[audtr] += AVI->track[audtr].audio_index[k].len;
#ifdef DEBUG_ODML
/*
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] [%d:%d] POS 0x%llX len=%d offset (%llx) (%ld)\n", k, audtr,
AVI->track[audtr].audio_index[k].pos,
(int)AVI->track[audtr].audio_index[k].len,
offset, AVI->track[audtr].audio_superindex->aIndex[j].dwSize));
*/
#endif
++k;
}
gf_free(chunk_start);
}
AVI->track[audtr].audio_chunks = nai[audtr];
AVI->track[audtr].audio_bytes = tot[audtr];
}
} // is opendml
else if (AVI->total_frames && !AVI->is_opendml && idx_type==0) {
// *********************
// MULTIPLE RIFF CHUNKS (and no index)
// *********************
multiple_riff:
gf_fseek(AVI->fdes, AVI->movi_start, SEEK_SET);
AVI->n_idx = 0;
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] Reconstructing index..."));
// Number of frames; only one audio track supported
nvi = AVI->video_frames = AVI->total_frames;
nai[0] = AVI->track[0].audio_chunks = AVI->total_frames;
for(j=1; j<AVI->anum; ++j) AVI->track[j].audio_chunks = 0;
AVI->video_index = (video_index_entry *) gf_malloc(nvi*sizeof(video_index_entry));
if(AVI->video_index==0) ERR_EXIT(AVI_ERR_NO_MEM);
for(j=0; j<AVI->anum; ++j) {
if(AVI->track[j].audio_chunks) {
AVI->track[j].audio_index = (audio_index_entry *) gf_malloc((nai[j]+1)*sizeof(audio_index_entry));
memset(AVI->track[j].audio_index, 0, (nai[j]+1)*(sizeof(audio_index_entry)));
if(AVI->track[j].audio_index==0) ERR_EXIT(AVI_ERR_NO_MEM);
}
}
nvi = 0;
for(j=0; j<AVI->anum; ++j) {
nai[j] = 0;
tot[j] = 0;
}
aud_chunks = AVI->total_frames;
while(1)
{
if (nvi >= AVI->total_frames) break;
if( avi_read(AVI->fdes,data,8) != 8 ) break;
n = str2ulong((unsigned char *)data+4);
j=0;
if (aud_chunks - nai[j] -1 <= 0) {
aud_chunks += AVI->total_frames;
AVI->track[j].audio_index = (audio_index_entry *)
gf_realloc( AVI->track[j].audio_index, (aud_chunks+1)*sizeof(audio_index_entry));
if (!AVI->track[j].audio_index) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[avilib] Internal error in avilib -- no mem\n"));
AVI_errno = AVI_ERR_NO_MEM;
return -1;
}
}
/* Check if we got a tag ##db, ##dc or ##wb */
// VIDEO
if(
(data[0]=='0' || data[1]=='0') &&
(data[2]=='d' || data[2]=='D') &&
(data[3]=='b' || data[3]=='B' || data[3]=='c' || data[3]=='C') ) {
AVI->video_index[nvi].key = 0x0;
AVI->video_index[nvi].pos = gf_ftell(AVI->fdes);
AVI->video_index[nvi].len = (u32) n;
/*
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] Frame %ld pos %"LLD" len %"LLD" key %ld\n",
nvi, AVI->video_index[nvi].pos, AVI->video_index[nvi].len, (long)AVI->video_index[nvi].key));
*/
nvi++;
gf_fseek(AVI->fdes,PAD_EVEN(n),SEEK_CUR);
}
//AUDIO
else if(
(data[0]=='0' || data[1]=='1') &&
(data[2]=='w' || data[2]=='W') &&
(data[3]=='b' || data[3]=='B') ) {
AVI->track[j].audio_index[nai[j]].pos = gf_ftell(AVI->fdes);
AVI->track[j].audio_index[nai[j]].len = (u32) n;
AVI->track[j].audio_index[nai[j]].tot = tot[j];
tot[j] += AVI->track[j].audio_index[nai[j]].len;
nai[j]++;
gf_fseek(AVI->fdes,PAD_EVEN(n),SEEK_CUR);
}
else {
gf_fseek(AVI->fdes,-4,SEEK_CUR);
}
}
if (nvi < AVI->total_frames) {
GF_LOG(GF_LOG_WARNING, GF_LOG_CONTAINER, ("[avilib] Uh? Some frames seems missing (%ld/%d)\n",
nvi, AVI->total_frames));
}
AVI->video_frames = nvi;
AVI->track[0].audio_chunks = nai[0];
for(j=0; j<AVI->anum; ++j) AVI->track[j].audio_bytes = tot[j];
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[avilib] done. nvi=%ld nai=%ld tot=%ld\n", nvi, nai[0], tot[0]));
} // total_frames but no indx chunk (xawtv does this)
else
{
// ******************
// NO OPENDML
// ******************
/* Now generate the video index and audio index arrays */
nvi = 0;
for(j=0; j<AVI->anum; ++j) nai[j] = 0;
for(i=0; i<AVI->n_idx; i++) {
if(strnicmp((char *)AVI->idx[i],AVI->video_tag,3) == 0) nvi++;
for(j=0; j<AVI->anum; ++j) if(strnicmp((char *)AVI->idx[i], AVI->track[j].audio_tag,4) == 0) nai[j]++;
}
AVI->video_frames = nvi;
for(j=0; j<AVI->anum; ++j) AVI->track[j].audio_chunks = nai[j];
if(AVI->video_frames==0) ERR_EXIT(AVI_ERR_NO_VIDS);
AVI->video_index = (video_index_entry *) gf_malloc(nvi*sizeof(video_index_entry));
if(AVI->video_index==0) ERR_EXIT(AVI_ERR_NO_MEM);
for(j=0; j<AVI->anum; ++j) {
if(AVI->track[j].audio_chunks) {
AVI->track[j].audio_index = (audio_index_entry *) gf_malloc((nai[j]+1)*sizeof(audio_index_entry));
memset(AVI->track[j].audio_index, 0, (nai[j]+1)*(sizeof(audio_index_entry)));
if(AVI->track[j].audio_index==0) ERR_EXIT(AVI_ERR_NO_MEM);
}
}
nvi = 0;
for(j=0; j<AVI->anum; ++j) {
nai[j] = 0;
tot[j] = 0;
}
ioff = idx_type == 1 ? 8 : (u32)AVI->movi_start+4;
for(i=0; i<AVI->n_idx; i++) {
//video
if(strnicmp((char *)AVI->idx[i],AVI->video_tag,3) == 0) {
AVI->video_index[nvi].key = str2ulong(AVI->idx[i]+ 4);
AVI->video_index[nvi].pos = str2ulong(AVI->idx[i]+ 8)+ioff;
AVI->video_index[nvi].len = str2ulong(AVI->idx[i]+12);
nvi++;
}
//audio
for(j=0; j<AVI->anum; ++j) {
if(strnicmp((char *)AVI->idx[i],AVI->track[j].audio_tag,4) == 0) {
AVI->track[j].audio_index[nai[j]].pos = str2ulong(AVI->idx[i]+ 8)+ioff;
AVI->track[j].audio_index[nai[j]].len = str2ulong(AVI->idx[i]+12);
AVI->track[j].audio_index[nai[j]].tot = tot[j];
tot[j] += AVI->track[j].audio_index[nai[j]].len;
nai[j]++;
}
}
}
for(j=0; j<AVI->anum; ++j) AVI->track[j].audio_bytes = tot[j];
} // is no opendml
/* Reposition the file */
gf_fseek(AVI->fdes,AVI->movi_start,SEEK_SET);
AVI->video_pos = 0;
return(0);
} | 6253 | True | 1 |
CVE-2022-29340 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/issues/2163', 'name': 'https://github.com/gpac/gpac/issues/2163', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/37592ad86c6ca934d34740012213e467acc4a3b0', 'name': 'https://github.com/gpac/gpac/commit/37592ad86c6ca934d34740012213e467acc4a3b0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2022-04-12', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'GPAC 2.1-DEV-rev87-g053aae8-master. has a Null Pointer Dereference vulnerability in gf_isom_parse_movie_boxes_internal due to improper return value handling of GF_SKIP_BOX, which causes a Denial of Service. This vulnerability was fixed in commit 37592ad.'}] | 2022-05-13T18:28Z | 2022-05-05T13:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2022-04-12 10:35:52+02:00 | fixed #2163 | 37592ad86c6ca934d34740012213e467acc4a3b0 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_isom_box_parse_ex | gf_isom_box_parse_ex( GF_Box ** outBox , GF_BitStream * bs , u32 parent_type , Bool is_root_box , u64 parent_size) | ['outBox', 'bs', 'parent_type', 'is_root_box', 'parent_size'] | GF_Err gf_isom_box_parse_ex(GF_Box **outBox, GF_BitStream *bs, u32 parent_type, Bool is_root_box, u64 parent_size)
{
u32 type, uuid_type, hdr_size, restore_type;
u64 size, start, comp_start, end;
char uuid[16];
GF_Err e;
GF_BitStream *uncomp_bs = NULL;
u8 *uncomp_data = NULL;
u32 compressed_size=0;
GF_Box *newBox;
Bool skip_logs = (gf_bs_get_cookie(bs) & GF_ISOM_BS_COOKIE_NO_LOGS ) ? GF_TRUE : GF_FALSE;
Bool is_special = GF_TRUE;
if ((bs == NULL) || (outBox == NULL) ) return GF_BAD_PARAM;
*outBox = NULL;
if (gf_bs_available(bs) < 8) {
return GF_ISOM_INCOMPLETE_FILE;
}
comp_start = start = gf_bs_get_position(bs);
uuid_type = 0;
size = (u64) gf_bs_read_u32(bs);
hdr_size = 4;
/*fix for some boxes found in some old hinted files*/
if ((size >= 2) && (size <= 4)) {
size = 4;
type = GF_ISOM_BOX_TYPE_VOID;
} else {
type = gf_bs_read_u32(bs);
hdr_size += 4;
/*no size means till end of file - EXCEPT FOR some old QuickTime boxes...*/
if (type == GF_ISOM_BOX_TYPE_TOTL)
size = 12;
if (!size) {
if (is_root_box) {
if (!skip_logs) {
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[iso file] Warning Read Box type %s (0x%08X) size 0 reading till the end of file\n", gf_4cc_to_str(type), type));
}
size = gf_bs_available(bs) + 8;
} else {
if (!skip_logs) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Read Box type %s (0x%08X) at position "LLU" has size 0 but is not at root/file level. Forbidden, skipping end of parent box !\n", gf_4cc_to_str(type), type, start));
return GF_SKIP_BOX;
}
return GF_OK;
}
}
if (is_root_box && (size>=8)) {
Bool do_uncompress = GF_FALSE;
u8 *compb = NULL;
u32 osize = 0;
u32 otype = type;
if (type==GF_4CC('!', 'm', 'o', 'f')) {
do_uncompress = GF_TRUE;
type = GF_ISOM_BOX_TYPE_MOOF;
}
else if (type==GF_4CC('!', 'm', 'o', 'v')) {
do_uncompress = GF_TRUE;
type = GF_ISOM_BOX_TYPE_MOOV;
}
else if (type==GF_4CC('!', 's', 'i', 'x')) {
do_uncompress = GF_TRUE;
type = GF_ISOM_BOX_TYPE_SIDX;
}
else if (type==GF_4CC('!', 's', 's', 'x')) {
do_uncompress = GF_TRUE;
type = GF_ISOM_BOX_TYPE_SSIX;
}
if (do_uncompress) {
compb = gf_malloc((u32) (size-8));
compressed_size = (u32) (size - 8);
gf_bs_read_data(bs, compb, compressed_size);
e = gf_gz_decompress_payload(compb, compressed_size, &uncomp_data, &osize);
if (e) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Failed to uncompress payload for box type %s (0x%08X)\n", gf_4cc_to_str(otype), otype));
return e;
}
//keep size as complete box size for tests below
size = osize + 8;
uncomp_bs = gf_bs_new(uncomp_data, osize, GF_BITSTREAM_READ);
bs = uncomp_bs;
start = 0;
gf_free(compb);
}
}
}
/*handle uuid*/
memset(uuid, 0, 16);
if (type == GF_ISOM_BOX_TYPE_UUID ) {
if (gf_bs_available(bs) < 16) {
return GF_ISOM_INCOMPLETE_FILE;
}
gf_bs_read_data(bs, uuid, 16);
hdr_size += 16;
uuid_type = gf_isom_solve_uuid_box(uuid);
}
//handle large box
if (size == 1) {
if (gf_bs_available(bs) < 8) {
return GF_ISOM_INCOMPLETE_FILE;
}
size = gf_bs_read_u64(bs);
hdr_size += 8;
}
if (!skip_logs)
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[iso file] Read Box type %s size "LLD" start "LLD"\n", gf_4cc_to_str(type), size, start));
if ( size < hdr_size ) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Box %s size "LLD" less than box header size %d\n", gf_4cc_to_str(type), size, hdr_size));
return GF_ISOM_INVALID_FILE;
}
//if parent size is given, make sure box fits within parent
if (parent_size && (parent_size<size)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Box %s size "LLU" is larger than remaining parent size "LLU"\n", gf_4cc_to_str(type), size, parent_size ));
return GF_ISOM_INVALID_FILE;
}
restore_type = 0;
if ((parent_type==GF_ISOM_BOX_TYPE_STSD) && (type==GF_QT_SUBTYPE_RAW) ) {
u64 cookie = gf_bs_get_cookie(bs);
restore_type = type;
if (cookie & GF_ISOM_BS_COOKIE_VISUAL_TRACK)
type = GF_QT_SUBTYPE_RAW_VID;
else
type = GF_QT_SUBTYPE_RAW_AUD;
}
//some special boxes (references and track groups) are handled by a single generic box with an associated ref/group type
if (parent_type && (parent_type == GF_ISOM_BOX_TYPE_TREF)) {
newBox = gf_isom_box_new(GF_ISOM_BOX_TYPE_REFT);
if (!newBox) return GF_OUT_OF_MEM;
((GF_TrackReferenceTypeBox*)newBox)->reference_type = type;
} else if (parent_type && (parent_type == GF_ISOM_BOX_TYPE_IREF)) {
newBox = gf_isom_box_new(GF_ISOM_BOX_TYPE_REFI);
if (!newBox) return GF_OUT_OF_MEM;
((GF_ItemReferenceTypeBox*)newBox)->reference_type = type;
} else if (parent_type && (parent_type == GF_ISOM_BOX_TYPE_TRGR)) {
newBox = gf_isom_box_new(GF_ISOM_BOX_TYPE_TRGT);
if (!newBox) return GF_OUT_OF_MEM;
((GF_TrackGroupTypeBox*)newBox)->group_type = type;
} else if (parent_type && (parent_type == GF_ISOM_BOX_TYPE_GRPL)) {
newBox = gf_isom_box_new(GF_ISOM_BOX_TYPE_GRPT);
if (!newBox) return GF_OUT_OF_MEM;
((GF_EntityToGroupTypeBox*)newBox)->grouping_type = type;
} else {
//OK, create the box based on the type
is_special = GF_FALSE;
newBox = gf_isom_box_new_ex(uuid_type ? uuid_type : type, parent_type, skip_logs, is_root_box);
if (!newBox) return GF_OUT_OF_MEM;
}
//OK, init and read this box
if (type==GF_ISOM_BOX_TYPE_UUID && !is_special) {
memcpy(((GF_UUIDBox *)newBox)->uuid, uuid, 16);
((GF_UUIDBox *)newBox)->internal_4cc = uuid_type;
}
if (!newBox->type) newBox->type = type;
if (restore_type)
newBox->type = restore_type;
end = gf_bs_available(bs);
if (size - hdr_size > end ) {
newBox->size = size - hdr_size - end;
*outBox = newBox;
return GF_ISOM_INCOMPLETE_FILE;
}
newBox->size = size - hdr_size;
e = gf_isom_full_box_read(newBox, bs);
if (!e) e = gf_isom_box_read(newBox, bs);
if (e) {
if (gf_opts_get_bool("core", "no-check"))
e = GF_OK;
}
newBox->size = size;
end = gf_bs_get_position(bs);
if (uncomp_bs) {
gf_free(uncomp_data);
gf_bs_del(uncomp_bs);
if (e) {
gf_isom_box_del(newBox);
*outBox = NULL;
return e;
}
//move size to real bitstream offsets for tests below
size -= 8;
//remember compressed vs real size info for moof in order to properly recompute data_offset/base_data_offset
if (type==GF_ISOM_BOX_TYPE_MOOF) {
((GF_MovieFragmentBox *)newBox)->compressed_diff = (s32)size - (s32)compressed_size;
}
//remember compressed vs real size info for moov in order to properly recompute chunk offset
else if (type==GF_ISOM_BOX_TYPE_MOOV) {
((GF_MovieBox *)newBox)->compressed_diff = (s32)size - (s32)compressed_size;
((GF_MovieBox *)newBox)->file_offset = comp_start;
}
//remember compressed vs real size info for dump
else if (type==GF_ISOM_BOX_TYPE_SIDX) {
((GF_SegmentIndexBox *)newBox)->compressed_diff = (s32)size - (s32)compressed_size;
}
//remember compressed vs real size info for dump
else if (type==GF_ISOM_BOX_TYPE_SSIX) {
((GF_SubsegmentIndexBox *)newBox)->compressed_diff = (s32)size - (s32)compressed_size;
}
newBox->internal_flags = GF_ISOM_BOX_COMPRESSED;
}
if (e && (e != GF_ISOM_INCOMPLETE_FILE)) {
gf_isom_box_del(newBox);
*outBox = NULL;
if (!skip_logs) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Read Box \"%s\" (start "LLU") failed (%s) - skipping\n", gf_4cc_to_str(type), start, gf_error_to_string(e)));
}
//we don't try to reparse known boxes that have been failing (too dangerous)
return e;
}
if (end-start > size) {
if (!skip_logs) {
GF_LOG(GF_LOG_WARNING, GF_LOG_CONTAINER, ("[iso file] Box \"%s\" size "LLU" (start "LLU") invalid (read "LLU")\n", gf_4cc_to_str(type), size, start, (end-start) ));
}
/*let's still try to load the file since no error was notified*/
gf_bs_seek(bs, start+size);
} else if (end-start < size) {
u32 to_skip = (u32) (size-(end-start));
if (!skip_logs) {
if ((to_skip!=4) || gf_bs_peek_bits(bs, 32, 0)) {
GF_LOG(GF_LOG_WARNING, GF_LOG_CONTAINER, ("[iso file] Box \"%s\" (start "LLU") has %u extra bytes\n", gf_4cc_to_str(type), start, to_skip));
unused_bytes += to_skip;
}
}
gf_bs_skip_bytes(bs, to_skip);
}
*outBox = newBox;
return e;
} | 1499 | True | 1 |
CVE-2022-29340 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/issues/2163', 'name': 'https://github.com/gpac/gpac/issues/2163', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/37592ad86c6ca934d34740012213e467acc4a3b0', 'name': 'https://github.com/gpac/gpac/commit/37592ad86c6ca934d34740012213e467acc4a3b0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2022-04-12', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'GPAC 2.1-DEV-rev87-g053aae8-master. has a Null Pointer Dereference vulnerability in gf_isom_parse_movie_boxes_internal due to improper return value handling of GF_SKIP_BOX, which causes a Denial of Service. This vulnerability was fixed in commit 37592ad.'}] | 2022-05-13T18:28Z | 2022-05-05T13:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2022-04-12 10:35:52+02:00 | fixed #2163 | 37592ad86c6ca934d34740012213e467acc4a3b0 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_isom_parse_movie_boxes_internal | gf_isom_parse_movie_boxes_internal( GF_ISOFile * mov , u32 * boxType , u64 * bytesMissing , Bool progressive_mode) | ['mov', 'boxType', 'bytesMissing', 'progressive_mode'] | static GF_Err gf_isom_parse_movie_boxes_internal(GF_ISOFile *mov, u32 *boxType, u64 *bytesMissing, Bool progressive_mode)
{
GF_Box *a;
u64 totSize, mdat_end=0;
GF_Err e = GF_OK;
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
if (mov->single_moof_mode && mov->single_moof_state == 2) {
return e;
}
/*restart from where we stopped last*/
totSize = mov->current_top_box_start;
if (mov->bytes_removed) {
assert(totSize >= mov->bytes_removed);
totSize -= mov->bytes_removed;
}
gf_bs_seek(mov->movieFileMap->bs, totSize);
#endif
/*while we have some data, parse our boxes*/
while (gf_bs_available(mov->movieFileMap->bs)) {
*bytesMissing = 0;
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
mov->current_top_box_start = gf_bs_get_position(mov->movieFileMap->bs) + mov->bytes_removed;
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[iso file] Parsing a top-level box at position %d\n", mov->current_top_box_start));
#endif
e = gf_isom_parse_root_box(&a, mov->movieFileMap->bs, boxType, bytesMissing, progressive_mode);
if (e >= 0) {
} else if (e == GF_ISOM_INCOMPLETE_FILE) {
/*our mdat is uncomplete, only valid for READ ONLY files...*/
if (mov->openMode != GF_ISOM_OPEN_READ) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Incomplete MDAT while file is not read-only\n"));
return GF_ISOM_INVALID_FILE;
}
if ((mov->openMode == GF_ISOM_OPEN_READ) && !progressive_mode) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Incomplete file while reading for dump - aborting parsing\n"));
break;
}
return e;
} else {
return e;
}
switch (a->type) {
/*MOOV box*/
case GF_ISOM_BOX_TYPE_MOOV:
if (mov->moov) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Duplicate MOOV detected!\n"));
gf_isom_box_del(a);
return GF_ISOM_INVALID_FILE;
}
mov->moov = (GF_MovieBox *)a;
mov->original_moov_offset = mov->current_top_box_start;
/*set our pointer to the movie*/
mov->moov->mov = mov;
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
if (mov->moov->mvex) mov->moov->mvex->mov = mov;
#ifdef GF_ENABLE_CTRN
if (! (mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG)) {
gf_isom_setup_traf_inheritance(mov);
}
#endif
#endif
e = gf_list_add(mov->TopBoxes, a);
if (e) return e;
totSize += a->size;
if (!mov->moov->mvhd) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Missing MovieHeaderBox\n"));
return GF_ISOM_INVALID_FILE;
}
if (mov->meta) {
gf_isom_meta_restore_items_ref(mov, mov->meta);
}
//dump senc info in dump mode
if (mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG) {
u32 k;
for (k=0; k<gf_list_count(mov->moov->trackList); k++) {
GF_TrackBox *trak = (GF_TrackBox *)gf_list_get(mov->moov->trackList, k);
if (trak->sample_encryption) {
e = senc_Parse(mov->movieFileMap->bs, trak, NULL, trak->sample_encryption);
if (e) return e;
}
}
} else {
u32 k;
for (k=0; k<gf_list_count(mov->moov->trackList); k++) {
GF_TrackBox *trak = (GF_TrackBox *)gf_list_get(mov->moov->trackList, k);
if (trak->Media->information->sampleTable->sampleGroups) {
convert_compact_sample_groups(trak->Media->information->sampleTable->child_boxes, trak->Media->information->sampleTable->sampleGroups);
}
}
}
if (mdat_end && mov->signal_frag_bounds && !(mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG) ) {
gf_isom_push_mdat_end(mov, mdat_end);
mdat_end=0;
}
break;
/*META box*/
case GF_ISOM_BOX_TYPE_META:
if (mov->meta) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Duplicate META detected!\n"));
gf_isom_box_del(a);
return GF_ISOM_INVALID_FILE;
}
mov->meta = (GF_MetaBox *)a;
mov->original_meta_offset = mov->current_top_box_start;
e = gf_list_add(mov->TopBoxes, a);
if (e) {
return e;
}
totSize += a->size;
gf_isom_meta_restore_items_ref(mov, mov->meta);
break;
/*we only keep the MDAT in READ for dump purposes*/
case GF_ISOM_BOX_TYPE_MDAT:
if (!mov->first_data_toplevel_offset) {
mov->first_data_toplevel_offset = mov->current_top_box_start;
mov->first_data_toplevel_size = a->size;
}
totSize += a->size;
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
if (mov->emsgs) {
gf_isom_box_array_del(mov->emsgs);
mov->emsgs = NULL;
}
#endif
if (mov->openMode == GF_ISOM_OPEN_READ) {
if (!mov->mdat) {
mov->mdat = (GF_MediaDataBox *) a;
e = gf_list_add(mov->TopBoxes, mov->mdat);
if (e) {
return e;
}
}
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
else if (mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG) gf_list_add(mov->TopBoxes, a);
#endif
else gf_isom_box_del(a); //in other modes we don't care
if (mov->signal_frag_bounds && !(mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG) ) {
mdat_end = gf_bs_get_position(mov->movieFileMap->bs);
if (mov->moov) {
gf_isom_push_mdat_end(mov, mdat_end);
mdat_end=0;
}
}
}
/*if we don't have any MDAT yet, create one (edit-write mode)
We only work with one mdat, but we're puting it at the place
of the first mdat found when opening a file for editing*/
else if (!mov->mdat && (mov->openMode != GF_ISOM_OPEN_READ) && (mov->openMode != GF_ISOM_OPEN_KEEP_FRAGMENTS)) {
gf_isom_box_del(a);
mov->mdat = (GF_MediaDataBox *) gf_isom_box_new(GF_ISOM_BOX_TYPE_MDAT);
if (!mov->mdat) return GF_OUT_OF_MEM;
e = gf_list_add(mov->TopBoxes, mov->mdat);
if (e) {
return e;
}
} else {
gf_isom_box_del(a);
}
break;
case GF_ISOM_BOX_TYPE_FTYP:
/*ONE AND ONLY ONE FTYP*/
if (mov->brand) {
gf_isom_box_del(a);
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Duplicate 'ftyp' detected!\n"));
return GF_ISOM_INVALID_FILE;
}
mov->brand = (GF_FileTypeBox *)a;
totSize += a->size;
e = gf_list_add(mov->TopBoxes, a);
if (e) return e;
break;
case GF_ISOM_BOX_TYPE_OTYP:
/*ONE AND ONLY ONE FTYP*/
if (mov->otyp) {
gf_isom_box_del(a);
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Duplicate 'otyp' detected!\n"));
return GF_ISOM_INVALID_FILE;
}
if (mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG) {
mov->otyp = (GF_Box *)a;
totSize += a->size;
e = gf_list_add(mov->TopBoxes, a);
if (e) return e;
} else {
GF_FileTypeBox *brand = (GF_FileTypeBox *) gf_isom_box_find_child(a->child_boxes, GF_ISOM_BOX_TYPE_FTYP);
if (brand) {
s32 pos;
gf_list_del_item(a->child_boxes, brand);
pos = gf_list_del_item(mov->TopBoxes, mov->brand);
gf_isom_box_del((GF_Box *) mov->brand);
mov->brand = brand;
if (pos<0) pos=0;
gf_list_insert(mov->TopBoxes, brand, pos);
}
gf_isom_box_del(a);
}
break;
case GF_ISOM_BOX_TYPE_PDIN:
/*ONE AND ONLY ONE PDIN*/
if (mov->pdin) {
gf_isom_box_del(a);
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Duplicate 'pdin'' detected!\n"));
return GF_ISOM_INVALID_FILE;
}
mov->pdin = (GF_ProgressiveDownloadBox *) a;
totSize += a->size;
e = gf_list_add(mov->TopBoxes, a);
if (e) return e;
break;
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
case GF_ISOM_BOX_TYPE_STYP:
{
u32 brand = ((GF_FileTypeBox *)a)->majorBrand;
switch (brand) {
case GF_ISOM_BRAND_SISX:
case GF_ISOM_BRAND_RISX:
case GF_ISOM_BRAND_SSSS:
mov->is_index_segment = GF_TRUE;
break;
default:
break;
}
}
/*fall-through*/
case GF_ISOM_BOX_TYPE_SIDX:
case GF_ISOM_BOX_TYPE_SSIX:
if (mov->moov && !mov->first_data_toplevel_offset) {
mov->first_data_toplevel_offset = mov->current_top_box_start;
mov->first_data_toplevel_size = a->size;
}
totSize += a->size;
if (mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG) {
e = gf_list_add(mov->TopBoxes, a);
if (e) return e;
} else if (mov->signal_frag_bounds && !(mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG) && (mov->openMode!=GF_ISOM_OPEN_KEEP_FRAGMENTS)
) {
if (a->type==GF_ISOM_BOX_TYPE_SIDX) {
if (mov->root_sidx) gf_isom_box_del( (GF_Box *) mov->root_sidx);
mov->root_sidx = (GF_SegmentIndexBox *) a;
mov->sidx_start_offset = mov->current_top_box_start;
mov->sidx_end_offset = gf_bs_get_position(mov->movieFileMap->bs);
}
else if (a->type==GF_ISOM_BOX_TYPE_STYP) {
mov->styp_start_offset = mov->current_top_box_start;
if (mov->seg_styp) gf_isom_box_del(mov->seg_styp);
mov->seg_styp = a;
} else if (a->type==GF_ISOM_BOX_TYPE_SSIX) {
if (mov->seg_ssix) gf_isom_box_del(mov->seg_ssix);
mov->seg_ssix = a;
} else {
gf_isom_box_del(a);
}
gf_isom_push_mdat_end(mov, mov->current_top_box_start);
} else if (!mov->NextMoofNumber && (a->type==GF_ISOM_BOX_TYPE_SIDX)) {
if (mov->main_sidx) gf_isom_box_del( (GF_Box *) mov->main_sidx);
mov->main_sidx = (GF_SegmentIndexBox *) a;
mov->main_sidx_end_pos = mov->current_top_box_start + a->size;
} else {
gf_isom_box_del(a);
}
break;
case GF_ISOM_BOX_TYPE_MOOF:
//no support for inplace rewrite for fragmented files
gf_isom_disable_inplace_rewrite(mov);
if (!mov->moov) {
GF_LOG(mov->moof ? GF_LOG_DEBUG : GF_LOG_WARNING, GF_LOG_CONTAINER, ("[iso file] Movie fragment but no moov (yet) - possibly broken parsing!\n"));
}
if (mov->single_moof_mode) {
mov->single_moof_state++;
if (mov->single_moof_state > 1) {
gf_isom_box_del(a);
return GF_OK;
}
}
((GF_MovieFragmentBox *)a)->mov = mov;
totSize += a->size;
mov->moof = (GF_MovieFragmentBox *) a;
/*some smooth streaming streams contain a SDTP under the TRAF: this is incorrect, convert it*/
FixTrackID(mov);
if (! (mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG)) {
FixSDTPInTRAF(mov->moof);
} else {
u32 k;
for (k=0; k<gf_list_count(mov->moof->TrackList); k++) {
GF_TrackFragmentBox *traf = (GF_TrackFragmentBox *)gf_list_get(mov->moof->TrackList, k);
if (traf->sampleGroups) {
convert_compact_sample_groups(traf->child_boxes, traf->sampleGroups);
}
}
}
/*read & debug: store at root level*/
if (mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG) {
u32 k;
gf_list_add(mov->TopBoxes, a);
/*also update pointers to trex for debug*/
if (mov->moov) {
for (k=0; k<gf_list_count(mov->moof->TrackList); k++) {
GF_TrackFragmentBox *traf = gf_list_get(mov->moof->TrackList, k);
if (traf->tfhd && mov->moov->mvex && mov->moov->mvex->TrackExList) {
GF_TrackBox *trak = gf_isom_get_track_from_id(mov->moov, traf->tfhd->trackID);
u32 j=0;
while ((traf->trex = (GF_TrackExtendsBox*)gf_list_enum(mov->moov->mvex->TrackExList, &j))) {
if (traf->trex->trackID == traf->tfhd->trackID) {
if (!traf->trex->track) traf->trex->track = trak;
break;
}
traf->trex = NULL;
}
}
//we should only parse senc/psec when no saiz/saio is present, otherwise we fetch the info directly
if (traf->trex && traf->tfhd && traf->trex->track && traf->sample_encryption) {
GF_TrackBox *trak = GetTrackbyID(mov->moov, traf->tfhd->trackID);
if (trak) {
trak->current_traf_stsd_idx = traf->tfhd->sample_desc_index ? traf->tfhd->sample_desc_index : traf->trex->def_sample_desc_index;
e = senc_Parse(mov->movieFileMap->bs, trak, traf, traf->sample_encryption);
if (e) return e;
trak->current_traf_stsd_idx = 0;
}
}
}
} else {
for (k=0; k<gf_list_count(mov->moof->TrackList); k++) {
GF_TrackFragmentBox *traf = gf_list_get(mov->moof->TrackList, k);
if (traf->sample_encryption) {
e = senc_Parse(mov->movieFileMap->bs, NULL, traf, traf->sample_encryption);
if (e) return e;
}
}
}
} else if (mov->openMode==GF_ISOM_OPEN_KEEP_FRAGMENTS) {
mov->NextMoofNumber = mov->moof->mfhd->sequence_number+1;
mov->moof = NULL;
gf_isom_box_del(a);
} else {
/*merge all info*/
e = MergeFragment((GF_MovieFragmentBox *)a, mov);
gf_isom_box_del(a);
if (e) return e;
}
//done with moov
if (mov->root_sidx) {
gf_isom_box_del((GF_Box *) mov->root_sidx);
mov->root_sidx = NULL;
}
if (mov->root_ssix) {
gf_isom_box_del(mov->seg_ssix);
mov->root_ssix = NULL;
}
if (mov->seg_styp) {
gf_isom_box_del(mov->seg_styp);
mov->seg_styp = NULL;
}
mov->sidx_start_offset = 0;
mov->sidx_end_offset = 0;
mov->styp_start_offset = 0;
break;
#endif
case GF_ISOM_BOX_TYPE_UNKNOWN:
{
GF_UnknownBox *box = (GF_UnknownBox*)a;
if (box->original_4cc == GF_ISOM_BOX_TYPE_JP) {
u8 *c = (u8 *) box->data;
if ((box->dataSize==4) && (GF_4CC(c[0],c[1],c[2],c[3])==(u32)0x0D0A870A))
mov->is_jp2 = 1;
gf_isom_box_del(a);
} else {
e = gf_list_add(mov->TopBoxes, a);
if (e) return e;
}
}
break;
case GF_ISOM_BOX_TYPE_PRFT:
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
if (!(mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG)) {
//keep the last one read
if (mov->last_producer_ref_time)
gf_isom_box_del(a);
else
mov->last_producer_ref_time = (GF_ProducerReferenceTimeBox *)a;
break;
}
#endif
//fallthrough
case GF_ISOM_BOX_TYPE_EMSG:
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
if (! (mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG)) {
if (!mov->emsgs) mov->emsgs = gf_list_new();
gf_list_add(mov->emsgs, a);
break;
}
#endif
case GF_ISOM_BOX_TYPE_MFRA:
case GF_ISOM_BOX_TYPE_MFRO:
//only keep for dump mode, otherwise we ignore these boxes and we don't want to carry them over in non-fragmented file
if (! (mov->FragmentsFlags & GF_ISOM_FRAG_READ_DEBUG)) {
totSize += a->size;
gf_isom_box_del(a);
break;
}
default:
totSize += a->size;
e = gf_list_add(mov->TopBoxes, a);
if (e) return e;
break;
}
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
/*remember where we left, in case we append an entire number of movie fragments*/
mov->current_top_box_start = gf_bs_get_position(mov->movieFileMap->bs) + mov->bytes_removed;
#endif
}
/*we need at least moov or meta*/
if (!mov->moov && !mov->meta
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
&& !mov->moof && !mov->is_index_segment
#endif
) {
return GF_ISOM_INCOMPLETE_FILE;
}
/*we MUST have movie header*/
if (!gf_opts_get_bool("core", "no-check")) {
if (mov->moov && !mov->moov->mvhd) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Missing MVHD in MOOV!\n"));
return GF_ISOM_INVALID_FILE;
}
/*we MUST have meta handler*/
if (mov->meta && !mov->meta->handler) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Missing handler in META!\n"));
return GF_ISOM_INVALID_FILE;
}
}
#ifndef GPAC_DISABLE_ISOM_WRITE
if (mov->moov) {
/*set the default interleaving time*/
mov->interleavingTime = mov->moov->mvhd->timeScale;
#ifndef GPAC_DISABLE_ISOM_FRAGMENTS
/*in edit mode with successfully loaded fragments, delete all fragment signaling since
file is no longer fragmented*/
if ((mov->openMode > GF_ISOM_OPEN_READ) && (mov->openMode != GF_ISOM_OPEN_KEEP_FRAGMENTS) && mov->moov->mvex) {
gf_isom_box_del_parent(&mov->moov->child_boxes, (GF_Box *)mov->moov->mvex);
mov->moov->mvex = NULL;
}
#endif
}
//create a default mdat if none was found
if (!mov->mdat && (mov->openMode != GF_ISOM_OPEN_READ) && (mov->openMode != GF_ISOM_OPEN_KEEP_FRAGMENTS)) {
mov->mdat = (GF_MediaDataBox *) gf_isom_box_new(GF_ISOM_BOX_TYPE_MDAT);
if (!mov->mdat) return GF_OUT_OF_MEM;
e = gf_list_add(mov->TopBoxes, mov->mdat);
if (e) return e;
}
#endif /*GPAC_DISABLE_ISOM_WRITE*/
return GF_OK;
} | 2810 | True | 1 |
CVE-2022-29339 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/gpac/gpac/issues/2165', 'name': 'https://github.com/gpac/gpac/issues/2165', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/9ea93a2ec8f555ceed1ee27294cf94822f14f10f', 'name': 'https://github.com/gpac/gpac/commit/9ea93a2ec8f555ceed1ee27294cf94822f14f10f', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-617'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2022-04-12', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In GPAC 2.1-DEV-rev87-g053aae8-master, function BS_ReadByte() in utils/bitstream.c has a failed assertion, which causes a Denial of Service. This vulnerability was fixed in commit 9ea93a2.'}] | 2022-05-13T18:24Z | 2022-05-05T13:15Z | Reachable Assertion | The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary. |
While assertion is good for catching logic errors and reducing the chances of reaching more serious vulnerability conditions, it can still lead to a denial of service.
For example, if a server handles multiple simultaneous connections, and an assert() occurs in one single connection that causes all other connections to be dropped, this is a reachable assertion that leads to a denial of service.
| https://cwe.mitre.org/data/definitions/617.html | 0 | jeanlf | 2022-04-12 10:56:15+02:00 | fixed #2165 | 9ea93a2ec8f555ceed1ee27294cf94822f14f10f | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | BS_ReadByte | BS_ReadByte( GF_BitStream * bs) | ['bs'] | static u8 BS_ReadByte(GF_BitStream *bs)
{
Bool is_eos;
if (bs->bsmode == GF_BITSTREAM_READ) {
u8 res;
if (bs->position >= bs->size) {
if (bs->EndOfStream) bs->EndOfStream(bs->par);
if (!bs->overflow_state) bs->overflow_state = 1;
return 0;
}
res = bs->original[bs->position++];
if (bs->remove_emul_prevention_byte) {
if ((bs->nb_zeros==2) && (res==0x03) && (bs->position<bs->size) && (bs->original[bs->position]<0x04)) {
bs->nb_zeros = 0;
res = bs->original[bs->position++];
}
if (!res) bs->nb_zeros++;
else bs->nb_zeros = 0;
}
return res;
}
if (bs->cache_write)
bs_flush_write_cache(bs);
is_eos = gf_feof(bs->stream);
/*we are in FILE mode, test for end of file*/
if (!is_eos || bs->cache_read) {
u8 res;
Bool loc_eos=GF_FALSE;
assert(bs->position<=bs->size);
bs->position++;
res = gf_bs_load_byte(bs, &loc_eos);
if (loc_eos) goto bs_eof;
if (bs->remove_emul_prevention_byte) {
if ((bs->nb_zeros==2) && (res==0x03) && (bs->position<bs->size)) {
u8 next = gf_bs_load_byte(bs, &loc_eos);
if (next < 0x04) {
bs->nb_zeros = 0;
res = next;
bs->position++;
} else {
gf_bs_seek(bs, bs->position);
}
}
if (!res) bs->nb_zeros++;
else bs->nb_zeros = 0;
}
return res;
}
bs_eof:
if (bs->EndOfStream) {
bs->EndOfStream(bs->par);
if (!bs->overflow_state) bs->overflow_state = 1;
} else {
GF_LOG(GF_LOG_ERROR, GF_LOG_CORE, ("[BS] Attempt to overread bitstream\n"));
}
assert(bs->position <= 1+bs->size);
return 0;
} | 402 | True | 1 |
CVE-2022-1441 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/gpac/gpac/commit/3dbe11b37d65c8472faf0654410068e5500b3adb', 'name': 'https://github.com/gpac/gpac/commit/3dbe11b37d65c8472faf0654410068e5500b3adb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/issues/2175', 'name': 'https://github.com/gpac/gpac/issues/2175', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:2.0.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'MP4Box is a component of GPAC-2.0.0, which is a widely-used third-party package on RPM Fusion. When MP4Box tries to parse a MP4 file, it calls the function `diST_box_read()` to read from video. In this function, it allocates a buffer `str` with fixed length. However, content read from `bs` is controllable by user, so is the length, which causes a buffer overflow.'}] | 2022-05-05T19:57Z | 2022-04-25T17:15Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | jeanlf | 2022-04-19 09:15:58+02:00 | fixed #2175 | 3dbe11b37d65c8472faf0654410068e5500b3adb | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | diST_box_read | diST_box_read( GF_Box * s , GF_BitStream * bs) | ['s', 'bs'] | GF_Err diST_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 i;
char str[1024];
GF_DIMSScriptTypesBox *p = (GF_DIMSScriptTypesBox *)s;
i=0;
str[0]=0;
while (1) {
str[i] = gf_bs_read_u8(bs);
if (!str[i]) break;
i++;
}
ISOM_DECREASE_SIZE(p, i);
p->content_script_types = gf_strdup(str);
return GF_OK;
} | 90 | True | 1 |
CVE-2022-1795 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://huntr.dev/bounties/9c312763-41a6-4fc7-827b-269eb86efcbc', 'name': 'https://huntr.dev/bounties/9c312763-41a6-4fc7-827b-269eb86efcbc', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/c535bad50d5812d27ee5b22b54371bddec411514', 'name': 'https://github.com/gpac/gpac/commit/c535bad50d5812d27ee5b22b54371bddec411514', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.1.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Use After Free in GitHub repository gpac/gpac prior to v2.1.0-DEV.'}] | 2022-05-26T03:12Z | 2022-05-18T15:15Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | jeanlf | 2022-05-18 11:49:49+02:00 | fixed #2194 | c535bad50d5812d27ee5b22b54371bddec411514 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | BM_ParseGlobalQuantizer | BM_ParseGlobalQuantizer( GF_BifsDecoder * codec , GF_BitStream * bs , GF_List * com_list) | ['codec', 'bs', 'com_list'] | static GF_Err BM_ParseGlobalQuantizer(GF_BifsDecoder *codec, GF_BitStream *bs, GF_List *com_list)
{
GF_Node *node;
GF_Command *com;
GF_CommandField *inf;
node = gf_bifs_dec_node(codec, bs, NDT_SFWorldNode);
if (!node) return GF_NON_COMPLIANT_BITSTREAM;
/*reset global QP*/
if (codec->scenegraph->global_qp) {
gf_node_unregister(codec->scenegraph->global_qp, NULL);
}
codec->ActiveQP = NULL;
codec->scenegraph->global_qp = NULL;
if (gf_node_get_tag(node) != TAG_MPEG4_QuantizationParameter) {
gf_node_unregister(node, NULL);
return GF_NON_COMPLIANT_BITSTREAM;
}
/*register global QP*/
codec->ActiveQP = (M_QuantizationParameter *) node;
codec->ActiveQP->isLocal = 0;
codec->scenegraph->global_qp = node;
/*register TWICE: once for the command, and for the scenegraph globalQP*/
node->sgprivate->num_instances = 2;
com = gf_sg_command_new(codec->current_graph, GF_SG_GLOBAL_QUANTIZER);
inf = gf_sg_command_field_new(com);
inf->new_node = node;
inf->field_ptr = &inf->new_node;
inf->fieldType = GF_SG_VRML_SFNODE;
gf_list_add(com_list, com);
return GF_OK;
} | 186 | True | 1 |
CVE-2022-2453 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://huntr.dev/bounties/c8c964de-046a-41b2-9ff5-e25cfdb36b5a', 'name': 'https://huntr.dev/bounties/c8c964de-046a-41b2-9ff5-e25cfdb36b5a', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/gpac/gpac/commit/dc7de8d3d604426c7a6e628d90cb9fb88e7b4c2c', 'name': 'https://github.com/gpac/gpac/commit/dc7de8d3d604426c7a6e628d90cb9fb88e7b4c2c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | nan | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Use After Free in GitHub repository gpac/gpac prior to 2.1-DEV.'}] | 2022-07-26T15:17Z | 2022-07-19T14:15Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | jeanlf | 2022-07-12 17:57:03+02:00 | fixed #2212 | dc7de8d3d604426c7a6e628d90cb9fb88e7b4c2c | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | BD_DecMFFieldVec | BD_DecMFFieldVec( GF_BifsDecoder * codec , GF_BitStream * bs , GF_Node * node , GF_FieldInfo * field , Bool is_mem_com) | ['codec', 'bs', 'node', 'field', 'is_mem_com'] | GF_Err BD_DecMFFieldVec(GF_BifsDecoder * codec, GF_BitStream *bs, GF_Node *node, GF_FieldInfo *field, Bool is_mem_com)
{
GF_Err e;
u32 NbBits, nbFields;
u32 i;
GF_ChildNodeItem *last;
u8 qp_local, qp_on, initial_qp;
GF_FieldInfo sffield;
memset(&sffield, 0, sizeof(GF_FieldInfo));
sffield.fieldIndex = field->fieldIndex;
sffield.fieldType = gf_sg_vrml_get_sf_type(field->fieldType);
sffield.NDTtype = field->NDTtype;
sffield.name = field->name;
initial_qp = qp_local = qp_on = 0;
//vector description - alloc the MF size before
NbBits = gf_bs_read_int(bs, 5);
nbFields = gf_bs_read_int(bs, NbBits);
if (codec->ActiveQP) {
initial_qp = 1;
/*this is for QP 14*/
gf_bifs_dec_qp14_set_length(codec, nbFields);
}
if (field->fieldType != GF_SG_VRML_MFNODE) {
e = gf_sg_vrml_mf_alloc(field->far_ptr, field->fieldType, nbFields);
if (e) return e;
for (i=0; i<nbFields; i++) {
e = gf_sg_vrml_mf_get_item(field->far_ptr, field->fieldType, & sffield.far_ptr, i);
if (e) return e;
e = gf_bifs_dec_sf_field(codec, bs, node, &sffield, GF_FALSE);
if (e) return e;
}
} else {
last = NULL;
for (i=0; i<nbFields; i++) {
GF_Node *new_node = gf_bifs_dec_node(codec, bs, field->NDTtype);
if (new_node) {
e = gf_node_register(new_node, is_mem_com ? NULL : node);
if (e) return e;
if (node) {
/*special case for QP, register as the current QP*/
if (gf_node_get_tag(new_node) == TAG_MPEG4_QuantizationParameter) {
qp_local = ((M_QuantizationParameter *)new_node)->isLocal;
/*we have a QP in the same scope, remove previous
NB: we assume this is the right behavior, the spec doesn't say
whether QP is cumulative or not*/
if (qp_on) gf_bifs_dec_qp_remove(codec, GF_FALSE);
e = gf_bifs_dec_qp_set(codec, new_node);
if (e) return e;
qp_on = 1;
if (qp_local) qp_local = 2;
if (codec->force_keep_qp) {
e = gf_node_list_add_child_last(field->far_ptr, new_node, &last);
if (e) return e;
} else {
gf_node_register(new_node, NULL);
gf_node_unregister(new_node, node);
}
} else {
e = gf_node_list_add_child_last(field->far_ptr, new_node, &last);
if (e) return e;
}
}
/*proto coding*/
else if (codec->pCurrentProto) {
/*TO DO: what happens if this is a QP node on the interface ?*/
e = gf_node_list_add_child_last( (GF_ChildNodeItem **)field->far_ptr, new_node, &last);
if (e) return e;
}
} else {
return codec->LastError ? codec->LastError : GF_NON_COMPLIANT_BITSTREAM;
}
}
/*according to the spec, the QP applies to the current node itself, not just children.
If IsLocal is TRUE remove the node*/
if (qp_on && qp_local) {
if (qp_local == 2) {
// qp_local = 1;
} else {
//ask to get rid of QP and reactivate if we had a QP when entering the node
gf_bifs_dec_qp_remove(codec, initial_qp);
// qp_local = 0;
}
}
}
/*finally delete the QP if any (local or not) as we get out of this node*/
if (qp_on) gf_bifs_dec_qp_remove(codec, GF_TRUE);
return GF_OK;
} | 527 | True | 1 |
CVE-2022-2549 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/gpac/gpac/commit/0102c5d4db7fdbf08b5b591b2a6264de33867a07', 'name': 'https://github.com/gpac/gpac/commit/0102c5d4db7fdbf08b5b591b2a6264de33867a07', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://huntr.dev/bounties/c93083dc-177c-4ba0-ba83-9d7fb29a5537', 'name': 'https://huntr.dev/bounties/c93083dc-177c-4ba0-ba83-9d7fb29a5537', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | nan | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'NULL Pointer Dereference in GitHub repository gpac/gpac prior to v2.1.0-DEV.'}] | 2022-08-03T16:37Z | 2022-07-27T15:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2022-07-24 11:30:34+02:00 | fixed #2232 | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_dump_vrml_dyn_field | gf_dump_vrml_dyn_field( GF_SceneDumper * sdump , GF_Node * node , GF_FieldInfo field , Bool has_sublist) | ['sdump', 'node', 'field', 'has_sublist'] | static void gf_dump_vrml_dyn_field(GF_SceneDumper *sdump, GF_Node *node, GF_FieldInfo field, Bool has_sublist)
{
u32 i, sf_type;
void *slot_ptr;
if (gf_sg_vrml_is_sf_field(field.fieldType)) {
DUMP_IND(sdump);
if (sdump->XMLDump) {
if (sdump->X3DDump) {
gf_fprintf(sdump->trace, "<field name=\"%s\" type=\"%s\" accessType=\"%s\"",
field.name, gf_sg_vrml_get_field_type_name(field.fieldType), gf_sg_vrml_get_event_type_name(field.eventType, 1));
} else {
gf_fprintf(sdump->trace, "<field name=\"%s\" type=\"%s\" vrml97Hint=\"%s\"",
field.name, GetXMTFieldTypeName(field.fieldType), gf_sg_vrml_get_event_type_name(field.eventType, 0));
}
if ((field.eventType == GF_SG_EVENT_FIELD) || (field.eventType == GF_SG_EVENT_EXPOSED_FIELD)) {
if (field.fieldType == GF_SG_VRML_SFNODE) {
if (!sdump->X3DDump) {
gf_fprintf(sdump->trace, ">\n");
sdump->indent++;
gf_fprintf(sdump->trace, "<node>");
gf_dump_vrml_node(sdump, field.far_ptr ? *(GF_Node **)field.far_ptr : NULL, 0, NULL);
gf_fprintf(sdump->trace, "</node>");
sdump->indent--;
if (!has_sublist)
gf_fprintf(sdump->trace, "</field>\n");
} else {
if (field.far_ptr) {
gf_fprintf(sdump->trace, ">\n");
gf_dump_vrml_node(sdump, *(GF_Node **)field.far_ptr, 0, NULL);
gf_fprintf(sdump->trace, "</field>\n");
} else {
gf_fprintf(sdump->trace, "/>\n");
}
}
DUMP_IND(sdump);
} else {
if (sdump->X3DDump) {
gf_fprintf(sdump->trace, " value=\"");
} else {
gf_fprintf(sdump->trace, " %s=\"", GetXMTFieldTypeValueName(field.fieldType));
}
if (field.far_ptr)
gf_dump_vrml_sffield(sdump, field.fieldType, field.far_ptr, 0, node);
if (has_sublist)
gf_fprintf(sdump->trace, "\">\n");
else
gf_fprintf(sdump->trace, "\"/>\n");
}
} else {
gf_fprintf(sdump->trace, "/>\n");
}
} else {
gf_fprintf(sdump->trace, "%s %s %s", gf_sg_vrml_get_event_type_name(field.eventType, sdump->X3DDump), gf_sg_vrml_get_field_type_name(field.fieldType), field.name);
if ((field.eventType==GF_SG_EVENT_FIELD) || (field.eventType==GF_SG_EVENT_EXPOSED_FIELD)) {
gf_fprintf(sdump->trace, " ");
if (field.fieldType == GF_SG_VRML_SFNODE) {
gf_dump_vrml_node(sdump, field.far_ptr ? *(GF_Node **)field.far_ptr : NULL, 0, NULL);
} else if (field.far_ptr) {
gf_dump_vrml_simple_field(sdump, field, node);
}
}
gf_fprintf(sdump->trace, "\n");
}
} else if (field.far_ptr) {
GenMFField *mffield = (GenMFField *) field.far_ptr;
sf_type = gf_sg_vrml_get_sf_type(field.fieldType);
DUMP_IND(sdump);
if (!sdump->XMLDump) {
gf_fprintf(sdump->trace, "%s %s %s", gf_sg_vrml_get_event_type_name(field.eventType, sdump->X3DDump), gf_sg_vrml_get_field_type_name(field.fieldType), field.name);
if ((field.eventType==GF_SG_EVENT_FIELD) || (field.eventType==GF_SG_EVENT_EXPOSED_FIELD)) {
gf_fprintf(sdump->trace, " [");
if (sf_type == GF_SG_VRML_SFNODE) {
GF_ChildNodeItem *l = *(GF_ChildNodeItem **)field.far_ptr;
gf_fprintf(sdump->trace, "\n");
sdump->indent++;
while (l) {
gf_dump_vrml_node(sdump, l->node, 1, NULL);
l = l->next;
}
sdump->indent--;
DUMP_IND(sdump);
} else {
for (i=0; i<mffield->count; i++) {
if (i) gf_fprintf(sdump->trace, " ");
if (field.fieldType != GF_SG_VRML_MFNODE) {
gf_sg_vrml_mf_get_item(field.far_ptr, field.fieldType, &slot_ptr, i);
gf_dump_vrml_sffield(sdump, sf_type, slot_ptr, (mffield->count>1) ? 1 : 0, node);
}
}
}
gf_fprintf(sdump->trace, "]");
}
gf_fprintf(sdump->trace, "\n");
} else {
if (sdump->X3DDump) {
gf_fprintf(sdump->trace, "<field name=\"%s\" type=\"%s\" accessType=\"%s\"",
field.name, gf_sg_vrml_get_field_type_name(field.fieldType), gf_sg_vrml_get_event_type_name(field.eventType, 1));
} else {
gf_fprintf(sdump->trace, "<field name=\"%s\" type=\"%s\" vrml97Hint=\"%s\"",
field.name, GetXMTFieldTypeName(field.fieldType), gf_sg_vrml_get_event_type_name(field.eventType, 0));
}
if ((field.eventType==GF_SG_EVENT_FIELD) || (field.eventType==GF_SG_EVENT_EXPOSED_FIELD)) {
if (sf_type == GF_SG_VRML_SFNODE) {
GF_ChildNodeItem *list = *(GF_ChildNodeItem **)field.far_ptr;
gf_fprintf(sdump->trace, ">\n");
sdump->indent++;
if (!sdump->X3DDump) gf_fprintf(sdump->trace, "<nodes>");
while (list) {
gf_dump_vrml_node(sdump, list->node, 1, NULL);
list = list->next;
}
if (!sdump->X3DDump) gf_fprintf(sdump->trace, "</nodes>");
sdump->indent++;
DUMP_IND(sdump);
if (!has_sublist)
gf_fprintf(sdump->trace, "</field>\n");
} else {
if (sdump->X3DDump) {
gf_fprintf(sdump->trace, " value=\"");
} else {
gf_fprintf(sdump->trace, " %s=\"", GetXMTFieldTypeValueName(field.fieldType));
}
for (i=0; i<mffield->count; i++) {
if (i) gf_fprintf(sdump->trace, " ");
if (field.fieldType != GF_SG_VRML_MFNODE) {
gf_sg_vrml_mf_get_item(field.far_ptr, field.fieldType, &slot_ptr, i);
gf_dump_vrml_sffield(sdump, sf_type, slot_ptr, (mffield->count>1) ? 1 : 0, node);
}
}
if (has_sublist)
gf_fprintf(sdump->trace, "\">\n");
else
gf_fprintf(sdump->trace, "\"/>\n");
}
} else {
gf_fprintf(sdump->trace, "/>\n");
}
}
}
} | 1154 | True | 1 |
CVE-2022-2549 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/gpac/gpac/commit/0102c5d4db7fdbf08b5b591b2a6264de33867a07', 'name': 'https://github.com/gpac/gpac/commit/0102c5d4db7fdbf08b5b591b2a6264de33867a07', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://huntr.dev/bounties/c93083dc-177c-4ba0-ba83-9d7fb29a5537', 'name': 'https://huntr.dev/bounties/c93083dc-177c-4ba0-ba83-9d7fb29a5537', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | nan | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'NULL Pointer Dereference in GitHub repository gpac/gpac prior to v2.1.0-DEV.'}] | 2022-08-03T16:37Z | 2022-07-27T15:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2022-07-24 11:30:34+02:00 | fixed #2232 | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_dump_vrml_field | gf_dump_vrml_field( GF_SceneDumper * sdump , GF_Node * node , GF_FieldInfo field) | ['sdump', 'node', 'field'] | static void gf_dump_vrml_field(GF_SceneDumper *sdump, GF_Node *node, GF_FieldInfo field)
{
u32 i, sf_type;
Bool needs_field_container;
GF_ChildNodeItem *list;
void *slot_ptr;
switch (field.fieldType) {
case GF_SG_VRML_SFNODE:
assert ( *(GF_Node **)field.far_ptr);
if (sdump->XMLDump) {
if (!sdump->X3DDump) {
StartElement(sdump, (char *) field.name);
EndElementHeader(sdump, 1);
sdump->indent++;
}
} else {
StartAttribute(sdump, field.name);
}
gf_dump_vrml_node(sdump, *(GF_Node **)field.far_ptr, 0, NULL);
if (sdump->XMLDump) {
if (!sdump->X3DDump) {
sdump->indent--;
EndElement(sdump, (char *) field.name, 1);
}
} else {
EndAttribute(sdump);
}
return;
case GF_SG_VRML_MFNODE:
needs_field_container = 0;
if (sdump->XMLDump && sdump->X3DDump) {
u32 count, nb_ndt;
GF_FieldInfo info;
if (!strcmp(field.name, "children")) {
needs_field_container = 0;
} else {
nb_ndt = 0;
count = gf_node_get_field_count(node);
for (i=0; i<count; i++) {
gf_node_get_field(node, i, &info);
if ((info.eventType==GF_SG_EVENT_IN) || (info.eventType==GF_SG_EVENT_OUT)) continue;
if (info.NDTtype==field.NDTtype) nb_ndt++;
}
needs_field_container = (nb_ndt>1) ? 1 : 0;
}
}
#ifndef GPAC_DISABLE_X3D
if (!sdump->X3DDump) {
if (gf_node_get_tag(node)==TAG_X3D_Switch) field.name = "choice";
}
#endif
list = * ((GF_ChildNodeItem **) field.far_ptr);
assert(list);
if (!sdump->XMLDump || !sdump->X3DDump) StartList(sdump, field.name);
sdump->indent++;
while (list) {
gf_dump_vrml_node(sdump, list->node, 1, needs_field_container ? (char *) field.name : NULL);
list = list->next;
}
sdump->indent--;
if (!sdump->XMLDump || !sdump->X3DDump) EndList(sdump, field.name);
return;
case GF_SG_VRML_SFCOMMANDBUFFER:
{
SFCommandBuffer *cb = (SFCommandBuffer *)field.far_ptr;
StartElement(sdump, (char *) field.name);
EndElementHeader(sdump, 1);
sdump->indent++;
if (!gf_list_count(cb->commandList)) {
/*the arch does not allow for that (we would need a codec and so on, or decompress the command list
in all cases...)*/
if (sdump->trace && cb->bufferSize) {
if (sdump->XMLDump) gf_fprintf(sdump->trace, "<!--SFCommandBuffer cannot be dumped while playing - use MP4Box instead-->\n");
else gf_fprintf(sdump->trace, "#SFCommandBuffer cannot be dumped while playing - use MP4Box instead\n");
}
} else {
gf_sm_dump_command_list(sdump, cb->commandList, sdump->indent, 0);
}
sdump->indent--;
EndElement(sdump, (char *) field.name, 1);
}
return;
case GF_SG_VRML_MFATTRREF:
if (sdump->XMLDump) {
MFAttrRef *ar = (MFAttrRef *)field.far_ptr;
StartElement(sdump, (char *) field.name);
EndElementHeader(sdump, 1);
sdump->indent++;
for (i=0; i<ar->count; i++) {
if (ar->vals[i].node) {
GF_FieldInfo pinfo;
DUMP_IND(sdump);
gf_node_get_field(ar->vals[i].node, ar->vals[i].fieldIndex, &pinfo);
gf_fprintf(sdump->trace, "<store node=\"");
scene_dump_vrml_id(sdump, ar->vals[i].node);
gf_fprintf(sdump->trace, "\" field=\"%s\"/>\n", pinfo.name);
}
}
sdump->indent--;
EndElement(sdump, (char *) field.name, 1);
return;
}
break;
}
if (gf_sg_vrml_is_sf_field(field.fieldType)) {
StartAttribute(sdump, field.name);
gf_dump_vrml_sffield(sdump, field.fieldType, field.far_ptr, 0, node);
EndAttribute(sdump);
} else {
GenMFField *mffield = (GenMFField *) field.far_ptr;
sf_type = gf_sg_vrml_get_sf_type(field.fieldType);
if (sdump->XMLDump && sdump->X3DDump) {
switch (sf_type) {
case GF_SG_VRML_SFSTRING:
case GF_SG_VRML_SFSCRIPT:
case GF_SG_VRML_SFURL:
gf_fprintf(sdump->trace, " %s=\'", (char *) field.name);
break;
default:
StartAttribute(sdump, field.name);
break;
}
} else {
StartAttribute(sdump, field.name);
}
if (!sdump->XMLDump) gf_fprintf(sdump->trace, "[");
if (mffield) {
for (i=0; i<mffield->count; i++) {
if (i) gf_fprintf(sdump->trace, " ");
gf_sg_vrml_mf_get_item(field.far_ptr, field.fieldType, &slot_ptr, i);
gf_dump_vrml_sffield(sdump, sf_type, slot_ptr, 1, node);
}
}
if (!sdump->XMLDump) gf_fprintf(sdump->trace, "]");
if (sdump->XMLDump && sdump->X3DDump) {
switch (sf_type) {
case GF_SG_VRML_SFSTRING:
case GF_SG_VRML_SFSCRIPT:
case GF_SG_VRML_SFURL:
gf_fprintf(sdump->trace, "\'");
break;
default:
EndAttribute(sdump);
break;
}
} else {
EndAttribute(sdump);
}
}
} | 1023 | True | 1 |
CVE-2022-2549 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/gpac/gpac/commit/0102c5d4db7fdbf08b5b591b2a6264de33867a07', 'name': 'https://github.com/gpac/gpac/commit/0102c5d4db7fdbf08b5b591b2a6264de33867a07', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://huntr.dev/bounties/c93083dc-177c-4ba0-ba83-9d7fb29a5537', 'name': 'https://huntr.dev/bounties/c93083dc-177c-4ba0-ba83-9d7fb29a5537', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | nan | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'NULL Pointer Dereference in GitHub repository gpac/gpac prior to v2.1.0-DEV.'}] | 2022-08-03T16:37Z | 2022-07-27T15:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2022-07-24 11:30:34+02:00 | fixed #2232 | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_dump_vrml_proto_field | gf_dump_vrml_proto_field( GF_SceneDumper * sdump , GF_Node * node , GF_FieldInfo field) | ['sdump', 'node', 'field'] | static void gf_dump_vrml_proto_field(GF_SceneDumper *sdump, GF_Node *node, GF_FieldInfo field)
{
u32 i, sf_type;
void *slot_ptr;
DUMP_IND(sdump);
gf_fprintf(sdump->trace, "<fieldValue name=\"%s\" ", field.name);
if (gf_sg_vrml_is_sf_field(field.fieldType)) {
if (field.fieldType == GF_SG_VRML_SFNODE) {
gf_fprintf(sdump->trace, ">\n");
sdump->indent++;
if (!sdump->X3DDump) gf_fprintf(sdump->trace, "<node>");
gf_dump_vrml_node(sdump, field.far_ptr ? *(GF_Node **)field.far_ptr : NULL, 0, NULL);
if (!sdump->X3DDump) gf_fprintf(sdump->trace, "</node>");
sdump->indent--;
DUMP_IND(sdump);
gf_fprintf(sdump->trace, "</fieldValue>\n");
} else {
if (sdump->X3DDump) {
gf_fprintf(sdump->trace, " value=\"");
} else {
gf_fprintf(sdump->trace, " %s=\"", GetXMTFieldTypeValueName(field.fieldType));
}
gf_dump_vrml_sffield(sdump, field.fieldType, field.far_ptr, 0, node);
gf_fprintf(sdump->trace, "\"/>\n");
}
} else {
GenMFField *mffield = (GenMFField *) field.far_ptr;
sf_type = gf_sg_vrml_get_sf_type(field.fieldType);
if ((field.eventType==GF_SG_EVENT_FIELD) || (field.eventType==GF_SG_EVENT_EXPOSED_FIELD)) {
if (sf_type == GF_SG_VRML_SFNODE) {
GF_ChildNodeItem *list = *(GF_ChildNodeItem **)field.far_ptr;
gf_fprintf(sdump->trace, ">\n");
sdump->indent++;
if (!sdump->X3DDump) gf_fprintf(sdump->trace, "<nodes>");
while (list) {
gf_dump_vrml_node(sdump, list->node, 1, NULL);
list = list->next;
}
if (!sdump->X3DDump) gf_fprintf(sdump->trace, "</nodes>");
sdump->indent--;
DUMP_IND(sdump);
gf_fprintf(sdump->trace, "</fieldValue>\n");
} else {
if (sdump->X3DDump) {
gf_fprintf(sdump->trace, " value=\"");
} else {
gf_fprintf(sdump->trace, " %s=\"", GetXMTFieldTypeValueName(field.fieldType));
}
if (mffield) {
for (i=0; i<mffield->count; i++) {
if (i) gf_fprintf(sdump->trace, " ");
if (field.fieldType != GF_SG_VRML_MFNODE) {
gf_sg_vrml_mf_get_item(field.far_ptr, field.fieldType, &slot_ptr, i);
gf_dump_vrml_sffield(sdump, sf_type, slot_ptr, (mffield->count>1) ? 1 : 0, node);
}
}
}
gf_fprintf(sdump->trace, "\"/>\n");
}
}
}
} | 505 | True | 1 |
CVE-2022-2549 | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | nan | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/gpac/gpac/commit/0102c5d4db7fdbf08b5b591b2a6264de33867a07', 'name': 'https://github.com/gpac/gpac/commit/0102c5d4db7fdbf08b5b591b2a6264de33867a07', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://huntr.dev/bounties/c93083dc-177c-4ba0-ba83-9d7fb29a5537', 'name': 'https://huntr.dev/bounties/c93083dc-177c-4ba0-ba83-9d7fb29a5537', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Issue Tracking', 'Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | nan | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:gpac:gpac:*:*:*:*:*:*:*:*', 'versionEndIncluding': '2.0.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'NULL Pointer Dereference in GitHub repository gpac/gpac prior to v2.1.0-DEV.'}] | 2022-08-03T16:37Z | 2022-07-27T15:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | jeanlf | 2022-07-24 11:30:34+02:00 | fixed #2232 | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | False | gpac/gpac | Modular Multimedia framework for packaging, streaming and playing your favorite content. | 2014-05-03 11:29:57 | 2022-08-01 15:00:31 | http://gpac.io | gpac | 1911.0 | 427.0 | gf_dump_vrml_simple_field | gf_dump_vrml_simple_field( GF_SceneDumper * sdump , GF_FieldInfo field , GF_Node * parent) | ['sdump', 'field', 'parent'] | static void gf_dump_vrml_simple_field(GF_SceneDumper *sdump, GF_FieldInfo field, GF_Node *parent)
{
u32 i, sf_type;
GF_ChildNodeItem *list;
void *slot_ptr;
switch (field.fieldType) {
case GF_SG_VRML_SFNODE:
gf_dump_vrml_node(sdump, field.far_ptr ? *(GF_Node **)field.far_ptr : NULL, 0, NULL);
return;
case GF_SG_VRML_MFNODE:
list = * ((GF_ChildNodeItem **) field.far_ptr);
assert( list );
sdump->indent++;
while (list) {
gf_dump_vrml_node(sdump, list->node, 1, NULL);
list = list->next;
}
sdump->indent--;
return;
case GF_SG_VRML_SFCOMMANDBUFFER:
return;
}
if (gf_sg_vrml_is_sf_field(field.fieldType)) {
if (sdump->XMLDump) StartAttribute(sdump, "value");
gf_dump_vrml_sffield(sdump, field.fieldType, field.far_ptr, 0, parent);
if (sdump->XMLDump) EndAttribute(sdump);
} else {
GenMFField *mffield;
mffield = (GenMFField *) field.far_ptr;
sf_type = gf_sg_vrml_get_sf_type(field.fieldType);
if (!sdump->XMLDump) {
gf_fprintf(sdump->trace, "[");
} else if (sf_type==GF_SG_VRML_SFSTRING) {
gf_fprintf(sdump->trace, " value=\'");
} else {
StartAttribute(sdump, "value");
}
for (i=0; i<mffield->count; i++) {
if (i) gf_fprintf(sdump->trace, " ");
gf_sg_vrml_mf_get_item(field.far_ptr, field.fieldType, &slot_ptr, i);
/*this is to cope with single MFString which shall appear as SF in XMT*/
gf_dump_vrml_sffield(sdump, sf_type, slot_ptr, 1, parent);
}
if (!sdump->XMLDump) {
gf_fprintf(sdump->trace, "]");
} else if (sf_type==GF_SG_VRML_SFSTRING) {
gf_fprintf(sdump->trace, "\'");
} else {
EndAttribute(sdump);
}
}
} | 355 | True | 1 |
CVE-2018-13785 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 6.5 | MEDIUM | 2.8 | 3.6 | False | [{'url': 'https://sourceforge.net/p/libpng/bugs/278/', 'name': 'https://sourceforge.net/p/libpng/bugs/278/', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/glennrp/libpng/commit/8a05766cb74af05c04c53e6c9d60c13fc4d59bf2', 'name': 'https://github.com/glennrp/libpng/commit/8a05766cb74af05c04c53e6c9d60c13fc4d59bf2', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3712-1/', 'name': 'USN-3712-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securitytracker.com/id/1041889', 'name': '1041889', 'refsource': 'SECTRACK', 'tags': ['Broken Link', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/105599', 'name': '105599', 'refsource': 'BID', 'tags': ['Broken Link', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.netapp.com/advisory/ntap-20181018-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20181018-0001/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3008', 'name': 'RHSA-2018:3008', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3007', 'name': 'RHSA-2018:3007', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3003', 'name': 'RHSA-2018:3003', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3002', 'name': 'RHSA-2018:3002', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3001', 'name': 'RHSA-2018:3001', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3000', 'name': 'RHSA-2018:3000', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3534', 'name': 'RHSA-2018:3534', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3533', 'name': 'RHSA-2018:3533', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3672', 'name': 'RHSA-2018:3672', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3671', 'name': 'RHSA-2018:3671', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3779', 'name': 'RHSA-2018:3779', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3852', 'name': 'RHSA-2018:3852', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201908-10', 'name': 'GLSA-201908-10', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-369'}, {'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libpng:libpng:1.6.34:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:17.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jdk:11.0.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jre:11.0.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jdk:1.8.0:update181:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jdk:1.7.0:update191:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jdk:1.6.0:update201:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jre:1.6.0:update201:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jre:1.7.0:update191:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jre:1.8.0:update181:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In libpng 1.6.34, a wrong calculation of row_factor in the png_check_chunk_length function (pngrutil.c) may trigger an integer overflow and resultant divide-by-zero while processing a crafted PNG file, leading to a denial of service.'}] | 2022-06-27T17:35Z | 2018-07-09T13:29Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Cosmin Truta | 2018-06-17 22:56:29-04:00 | [libpng16] Fix the calculation of row_factor in png_check_chunk_length
(Bug report by Thuan Pham, SourceForge issue #278) | 8a05766cb74af05c04c53e6c9d60c13fc4d59bf2 | False | glennrp/libpng | LIBPNG: Portable Network Graphics support, official libpng repository | 2012-03-19 20:01:17 | 2022-07-28 20:21:39 | http://libpng.sf.net | glennrp | 880.0 | 473.0 | png_check_chunk_length | png_check_chunk_length( png_const_structrp png_ptr , const png_uint_32 length) | ['png_ptr', 'length'] | png_check_chunk_length(png_const_structrp png_ptr, const png_uint_32 length)
{
png_alloc_size_t limit = PNG_UINT_31_MAX;
# ifdef PNG_SET_USER_LIMITS_SUPPORTED
if (png_ptr->user_chunk_malloc_max > 0 &&
png_ptr->user_chunk_malloc_max < limit)
limit = png_ptr->user_chunk_malloc_max;
# elif PNG_USER_CHUNK_MALLOC_MAX > 0
if (PNG_USER_CHUNK_MALLOC_MAX < limit)
limit = PNG_USER_CHUNK_MALLOC_MAX;
# endif
if (png_ptr->chunk_name == png_IDAT)
{
png_alloc_size_t idat_limit = PNG_UINT_31_MAX;
size_t row_factor =
(png_ptr->width * png_ptr->channels * (png_ptr->bit_depth > 8? 2: 1)
+ 1 + (png_ptr->interlaced? 6: 0));
if (png_ptr->height > PNG_UINT_32_MAX/row_factor)
idat_limit=PNG_UINT_31_MAX;
else
idat_limit = png_ptr->height * row_factor;
row_factor = row_factor > 32566? 32566 : row_factor;
idat_limit += 6 + 5*(idat_limit/row_factor+1); /* zlib+deflate overhead */
idat_limit=idat_limit < PNG_UINT_31_MAX? idat_limit : PNG_UINT_31_MAX;
limit = limit < idat_limit? idat_limit : limit;
}
if (length > limit)
{
png_debug2(0," length = %lu, limit = %lu",
(unsigned long)length,(unsigned long)limit);
png_chunk_error(png_ptr, "chunk data is too large");
}
} | 199 | True | 1 |
CVE-2018-13785 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 6.5 | MEDIUM | 2.8 | 3.6 | False | [{'url': 'https://sourceforge.net/p/libpng/bugs/278/', 'name': 'https://sourceforge.net/p/libpng/bugs/278/', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/glennrp/libpng/commit/8a05766cb74af05c04c53e6c9d60c13fc4d59bf2', 'name': 'https://github.com/glennrp/libpng/commit/8a05766cb74af05c04c53e6c9d60c13fc4d59bf2', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3712-1/', 'name': 'USN-3712-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securitytracker.com/id/1041889', 'name': '1041889', 'refsource': 'SECTRACK', 'tags': ['Broken Link', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/105599', 'name': '105599', 'refsource': 'BID', 'tags': ['Broken Link', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.netapp.com/advisory/ntap-20181018-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20181018-0001/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3008', 'name': 'RHSA-2018:3008', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3007', 'name': 'RHSA-2018:3007', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3003', 'name': 'RHSA-2018:3003', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3002', 'name': 'RHSA-2018:3002', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3001', 'name': 'RHSA-2018:3001', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3000', 'name': 'RHSA-2018:3000', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3534', 'name': 'RHSA-2018:3534', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3533', 'name': 'RHSA-2018:3533', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3672', 'name': 'RHSA-2018:3672', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3671', 'name': 'RHSA-2018:3671', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3779', 'name': 'RHSA-2018:3779', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3852', 'name': 'RHSA-2018:3852', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201908-10', 'name': 'GLSA-201908-10', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-369'}, {'lang': 'en', 'value': 'CWE-190'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libpng:libpng:1.6.34:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:17.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jdk:11.0.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jre:11.0.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jdk:1.8.0:update181:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jdk:1.7.0:update191:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jdk:1.6.0:update201:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jre:1.6.0:update201:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jre:1.7.0:update191:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:oracle:jre:1.8.0:update181:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In libpng 1.6.34, a wrong calculation of row_factor in the png_check_chunk_length function (pngrutil.c) may trigger an integer overflow and resultant divide-by-zero while processing a crafted PNG file, leading to a denial of service.'}] | 2022-06-27T17:35Z | 2018-07-09T13:29Z | Divide By Zero | The product divides a value by zero. | This weakness typically occurs when an unexpected value is provided to the product, or if an error occurs that is not properly detected. It frequently occurs in calculations involving physical dimensions such as size, length, width, and height.
| https://cwe.mitre.org/data/definitions/369.html | 0 | Cosmin Truta | 2018-06-17 22:56:29-04:00 | [libpng16] Fix the calculation of row_factor in png_check_chunk_length
(Bug report by Thuan Pham, SourceForge issue #278) | 8a05766cb74af05c04c53e6c9d60c13fc4d59bf2 | False | glennrp/libpng | LIBPNG: Portable Network Graphics support, official libpng repository | 2012-03-19 20:01:17 | 2022-07-28 20:21:39 | http://libpng.sf.net | glennrp | 880.0 | 473.0 | png_check_chunk_length | png_check_chunk_length( png_const_structrp png_ptr , const png_uint_32 length) | ['png_ptr', 'length'] | png_check_chunk_length(png_const_structrp png_ptr, const png_uint_32 length)
{
png_alloc_size_t limit = PNG_UINT_31_MAX;
# ifdef PNG_SET_USER_LIMITS_SUPPORTED
if (png_ptr->user_chunk_malloc_max > 0 &&
png_ptr->user_chunk_malloc_max < limit)
limit = png_ptr->user_chunk_malloc_max;
# elif PNG_USER_CHUNK_MALLOC_MAX > 0
if (PNG_USER_CHUNK_MALLOC_MAX < limit)
limit = PNG_USER_CHUNK_MALLOC_MAX;
# endif
if (png_ptr->chunk_name == png_IDAT)
{
png_alloc_size_t idat_limit = PNG_UINT_31_MAX;
size_t row_factor =
(png_ptr->width * png_ptr->channels * (png_ptr->bit_depth > 8? 2: 1)
+ 1 + (png_ptr->interlaced? 6: 0));
if (png_ptr->height > PNG_UINT_32_MAX/row_factor)
idat_limit=PNG_UINT_31_MAX;
else
idat_limit = png_ptr->height * row_factor;
row_factor = row_factor > 32566? 32566 : row_factor;
idat_limit += 6 + 5*(idat_limit/row_factor+1); /* zlib+deflate overhead */
idat_limit=idat_limit < PNG_UINT_31_MAX? idat_limit : PNG_UINT_31_MAX;
limit = limit < idat_limit? idat_limit : limit;
}
if (length > limit)
{
png_debug2(0," length = %lu, limit = %lu",
(unsigned long)length,(unsigned long)limit);
png_chunk_error(png_ptr, "chunk data is too large");
}
} | 199 | True | 1 |
CVE-2018-14043 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/Monetra/mstdlib/issues/2', 'name': 'https://github.com/Monetra/mstdlib/issues/2', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'name': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-732'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:monetra:mstdlib:1.2.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'mstdlib (aka the M Standard Library for C) 1.2.0 has incorrect file access control in situations where M_fs_perms_can_access attempts to delete an existing file (that lacks public read/write access) during a copy operation, related to fs/m_fs.c and fs/m_fs_path.c. An attacker could create the file and then would have access to the data.'}] | 2019-10-03T00:03Z | 2018-07-13T14:29Z | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | When a resource is given a permissions setting that provides access to a wider range of actors than required, it could lead to the exposure of sensitive information, or the modification of that resource by unintended parties. This is especially dangerous when the resource is related to program configuration, execution or sensitive user data.
| https://cwe.mitre.org/data/definitions/732.html | 0 | John Schember | 2018-07-12 14:28:19-04:00 | fs: Don't try to delete the file when copying. It could cause a security issue if the file exists and doesn't allow other's to read/write. delete could allow someone to create the file and have access to the data. | db124b8f607dd0a40a9aef2d4d468fad433522a7 | False | Monetra/mstdlib | "M" Standard Library for C (common algorithms, event io, threading, sql, etc) | 2017-09-02 13:45:31 | 2022-08-18 18:36:35 | https://monetra.github.io/mstdlib/ | Monetra | 26.0 | 5.0 | M_fs_check_overwrite_allowed | M_fs_check_overwrite_allowed( const char * p1 , const char * p2 , M_uint32 mode) | ['p1', 'p2', 'mode'] | static M_bool M_fs_check_overwrite_allowed(const char *p1, const char *p2, M_uint32 mode)
{
M_fs_info_t *info = NULL;
char *pold = NULL;
char *pnew = NULL;
M_fs_type_t type;
M_bool ret = M_TRUE;
if (mode & M_FS_FILE_MODE_OVERWRITE)
return M_TRUE;
/* If we're not overwriting we need to verify existance.
*
* For files we need to check if the file name exists in the
* directory it's being copied to.
*
* For directories we need to check if the directory name
* exists in the directory it's being copied to.
*/
if (M_fs_info(&info, p1, M_FS_PATH_INFO_FLAGS_BASIC) != M_FS_ERROR_SUCCESS)
return M_FALSE;
type = M_fs_info_get_type(info);
M_fs_info_destroy(info);
if (type != M_FS_TYPE_DIR) {
/* File exists at path. */
if (M_fs_perms_can_access(p2, M_FS_PERMS_MODE_NONE) == M_FS_ERROR_SUCCESS)
{
ret = M_FALSE;
goto done;
}
}
/* Is dir */
pold = M_fs_path_basename(p1, M_FS_SYSTEM_AUTO);
pnew = M_fs_path_join(p2, pnew, M_FS_SYSTEM_AUTO);
if (M_fs_perms_can_access(pnew, M_FS_PERMS_MODE_NONE) == M_FS_ERROR_SUCCESS) {
ret = M_FALSE;
goto done;
}
done:
M_free(pnew);
M_free(pold);
return ret;
} | 164 | True | 1 |
CVE-2018-14043 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/Monetra/mstdlib/issues/2', 'name': 'https://github.com/Monetra/mstdlib/issues/2', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'name': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-732'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:monetra:mstdlib:1.2.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'mstdlib (aka the M Standard Library for C) 1.2.0 has incorrect file access control in situations where M_fs_perms_can_access attempts to delete an existing file (that lacks public read/write access) during a copy operation, related to fs/m_fs.c and fs/m_fs_path.c. An attacker could create the file and then would have access to the data.'}] | 2019-10-03T00:03Z | 2018-07-13T14:29Z | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | When a resource is given a permissions setting that provides access to a wider range of actors than required, it could lead to the exposure of sensitive information, or the modification of that resource by unintended parties. This is especially dangerous when the resource is related to program configuration, execution or sensitive user data.
| https://cwe.mitre.org/data/definitions/732.html | 0 | John Schember | 2018-07-12 14:28:19-04:00 | fs: Don't try to delete the file when copying. It could cause a security issue if the file exists and doesn't allow other's to read/write. delete could allow someone to create the file and have access to the data. | db124b8f607dd0a40a9aef2d4d468fad433522a7 | False | Monetra/mstdlib | "M" Standard Library for C (common algorithms, event io, threading, sql, etc) | 2017-09-02 13:45:31 | 2022-08-18 18:36:35 | https://monetra.github.io/mstdlib/ | Monetra | 26.0 | 5.0 | M_fs_copy | M_fs_copy( const char * path_old , const char * path_new , M_uint32 mode , M_fs_progress_cb_t cb , M_uint32 progress_flags) | ['path_old', 'path_new', 'mode', 'cb', 'progress_flags'] | M_fs_error_t M_fs_copy(const char *path_old, const char *path_new, M_uint32 mode, M_fs_progress_cb_t cb, M_uint32 progress_flags)
{
char *norm_path_old;
char *norm_path_new;
char *join_path_old;
char *join_path_new;
M_fs_dir_entries_t *entries;
const M_fs_dir_entry_t *entry;
M_fs_info_t *info;
M_fs_progress_t *progress = NULL;
M_fs_dir_walk_filter_t filter = M_FS_DIR_WALK_FILTER_ALL|M_FS_DIR_WALK_FILTER_RECURSE;
M_fs_type_t type;
size_t len;
size_t i;
M_uint64 total_count = 0;
M_uint64 total_size = 0;
M_uint64 total_size_progress = 0;
M_uint64 entry_size;
M_fs_error_t res;
if (path_old == NULL || *path_old == '\0' || path_new == NULL || *path_new == '\0') {
return M_FS_ERROR_INVALID;
}
/* It's okay if new path doesn't exist. */
res = M_fs_path_norm(&norm_path_new, path_new, M_FS_PATH_NORM_RESDIR, M_FS_SYSTEM_AUTO);
if (res != M_FS_ERROR_SUCCESS) {
M_free(norm_path_new);
return res;
}
/* If a path is a file and the destination is a directory the file should be copied
* into the directory. E.g. /file.txt -> /dir = /dir/file.txt */
if (M_fs_isfileintodir(path_old, path_new, &norm_path_old)) {
M_free(norm_path_new);
res = M_fs_copy(path_old, norm_path_old, mode, cb, progress_flags);
M_free(norm_path_old);
return res;
}
/* Normalize the old path and do basic checks that it exists. We'll leave really checking that the old path
* existing to rename because any check we perform may not be true when rename is called. */
res = M_fs_path_norm(&norm_path_old, path_old, M_FS_PATH_NORM_RESALL, M_FS_SYSTEM_AUTO);
if (res != M_FS_ERROR_SUCCESS) {
M_free(norm_path_new);
M_free(norm_path_old);
return res;
}
progress = M_fs_progress_create();
res = M_fs_info(&info, path_old, (mode & M_FS_FILE_MODE_PRESERVE_PERMS)?M_FS_PATH_INFO_FLAGS_NONE:M_FS_PATH_INFO_FLAGS_BASIC);
if (res != M_FS_ERROR_SUCCESS) {
M_fs_progress_destroy(progress);
M_free(norm_path_new);
M_free(norm_path_old);
return res;
}
type = M_fs_info_get_type(info);
/* There is a race condition where the path could not exist but be created between the exists check and calling
* rename to move the file but there isn't much we can do in this case. copy will delete and the file so this
* situation won't cause an error. */
if (!M_fs_check_overwrite_allowed(norm_path_old, norm_path_new, mode)) {
M_fs_progress_destroy(progress);
M_free(norm_path_new);
M_free(norm_path_old);
return M_FS_ERROR_FILE_EXISTS;
}
entries = M_fs_dir_entries_create();
/* No need to destroy info because it's now owned by entries and will be destroyed when entries is destroyed.
* M_FS_DIR_WALK_FILTER_READ_INFO_BASIC doesn't actually get the perms it's just there to ensure the info is
* stored in the entry. */
M_fs_dir_entries_insert(entries, M_fs_dir_walk_fill_entry(norm_path_new, NULL, type, info, M_FS_DIR_WALK_FILTER_READ_INFO_BASIC));
if (type == M_FS_TYPE_DIR) {
if (mode & M_FS_FILE_MODE_PRESERVE_PERMS) {
filter |= M_FS_DIR_WALK_FILTER_READ_INFO_FULL;
} else if (cb && progress_flags & (M_FS_PROGRESS_SIZE_TOTAL|M_FS_PROGRESS_SIZE_CUR)) {
filter |= M_FS_DIR_WALK_FILTER_READ_INFO_BASIC;
}
/* Get all the files under the dir. */
M_fs_dir_entries_merge(&entries, M_fs_dir_walk_entries(norm_path_old, NULL, filter));
}
/* Put all dirs first. We need to ensure the dir(s) exist before we can copy files. */
M_fs_dir_entries_sort(entries, M_FS_DIR_SORT_ISDIR, M_TRUE, M_FS_DIR_SORT_NAME_CASECMP, M_TRUE);
len = M_fs_dir_entries_len(entries);
if (cb) {
total_size = 0;
for (i=0; i<len; i++) {
entry = M_fs_dir_entries_at(entries, i);
entry_size = M_fs_info_get_size(M_fs_dir_entry_get_info(entry));
total_size += entry_size;
type = M_fs_dir_entry_get_type(entry);
/* The total isn't the total number of files but the total number of operations.
* Making dirs and symlinks is one operation and copying a file will be split into
* multiple operations. Copying uses the M_FS_BUF_SIZE to read and write in
* chunks. We determine how many chunks will be needed to read the entire file and
* use that for the number of operations for the file. */
if (type == M_FS_TYPE_DIR || type == M_FS_TYPE_SYMLINK) {
total_count++;
} else {
total_count += (entry_size + M_FS_BUF_SIZE - 1) / M_FS_BUF_SIZE;
}
}
/* Change the progress total size to reflect all entries. */
if (progress_flags & M_FS_PROGRESS_SIZE_TOTAL) {
M_fs_progress_set_size_total(progress, total_size);
}
/* Change the progress count to reflect the count. */
if (progress_flags & M_FS_PROGRESS_COUNT) {
M_fs_progress_set_count_total(progress, total_count);
}
}
for (i=0; i<len; i++) {
entry = M_fs_dir_entries_at(entries, i);
type = M_fs_dir_entry_get_type(entry);
join_path_old = M_fs_path_join(norm_path_old, M_fs_dir_entry_get_name(entry), M_FS_SYSTEM_AUTO);
join_path_new = M_fs_path_join(norm_path_new, M_fs_dir_entry_get_name(entry), M_FS_SYSTEM_AUTO);
entry_size = M_fs_info_get_size(M_fs_dir_entry_get_info(entry));
total_size_progress += entry_size;
if (cb) {
M_fs_progress_set_path(progress, join_path_new);
if (progress_flags & M_FS_PROGRESS_SIZE_CUR) {
M_fs_progress_set_size_current(progress, entry_size);
}
}
/* op */
if (type == M_FS_TYPE_DIR || type == M_FS_TYPE_SYMLINK) {
if (type == M_FS_TYPE_DIR) {
res = M_fs_dir_mkdir(join_path_new, M_FALSE, NULL);
} else if (type == M_FS_TYPE_SYMLINK) {
res = M_fs_symlink(join_path_new, M_fs_dir_entry_get_resolved_name(entry));
}
if (res == M_FS_ERROR_SUCCESS && (mode & M_FS_FILE_MODE_PRESERVE_PERMS)) {
res = M_fs_perms_set_perms(M_fs_info_get_perms(M_fs_dir_entry_get_info(entry)), join_path_new);
}
} else {
res = M_fs_copy_file(join_path_old, join_path_new, mode, cb, progress_flags, progress, M_fs_info_get_perms(M_fs_dir_entry_get_info(entry)));
}
M_free(join_path_old);
M_free(join_path_new);
/* Call the callback and stop processing if requested. */
if ((type == M_FS_TYPE_DIR || type == M_FS_TYPE_SYMLINK) && cb) {
M_fs_progress_set_type(progress, M_fs_dir_entry_get_type(entry));
M_fs_progress_set_result(progress, res);
if (progress_flags & M_FS_PROGRESS_SIZE_TOTAL) {
M_fs_progress_set_size_total_progess(progress, total_size_progress);
}
if (progress_flags & M_FS_PROGRESS_SIZE_CUR) {
M_fs_progress_set_size_current_progress(progress, entry_size);
}
if (progress_flags & M_FS_PROGRESS_COUNT) {
M_fs_progress_set_count(progress, M_fs_progress_get_count(progress)+1);
}
if (!cb(progress)) {
res = M_FS_ERROR_CANCELED;
}
}
if (res != M_FS_ERROR_SUCCESS) {
break;
}
}
/* Delete the file(s) if it could not be copied properly, but only if we are not overwriting.
* If we're overwriting then there could be other files in that location (especially if it's a dir). */
if (res != M_FS_ERROR_SUCCESS && !(mode & M_FS_FILE_MODE_OVERWRITE)) {
M_fs_delete(path_new, M_TRUE, NULL, M_FS_PROGRESS_NOEXTRA);
}
M_fs_dir_entries_destroy(entries);
M_fs_progress_destroy(progress);
M_free(norm_path_new);
M_free(norm_path_old);
return res;
} | 907 | True | 1 |
CVE-2018-14043 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/Monetra/mstdlib/issues/2', 'name': 'https://github.com/Monetra/mstdlib/issues/2', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'name': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-732'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:monetra:mstdlib:1.2.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'mstdlib (aka the M Standard Library for C) 1.2.0 has incorrect file access control in situations where M_fs_perms_can_access attempts to delete an existing file (that lacks public read/write access) during a copy operation, related to fs/m_fs.c and fs/m_fs_path.c. An attacker could create the file and then would have access to the data.'}] | 2019-10-03T00:03Z | 2018-07-13T14:29Z | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | When a resource is given a permissions setting that provides access to a wider range of actors than required, it could lead to the exposure of sensitive information, or the modification of that resource by unintended parties. This is especially dangerous when the resource is related to program configuration, execution or sensitive user data.
| https://cwe.mitre.org/data/definitions/732.html | 0 | John Schember | 2018-07-12 14:28:19-04:00 | fs: Don't try to delete the file when copying. It could cause a security issue if the file exists and doesn't allow other's to read/write. delete could allow someone to create the file and have access to the data. | db124b8f607dd0a40a9aef2d4d468fad433522a7 | False | Monetra/mstdlib | "M" Standard Library for C (common algorithms, event io, threading, sql, etc) | 2017-09-02 13:45:31 | 2022-08-18 18:36:35 | https://monetra.github.io/mstdlib/ | Monetra | 26.0 | 5.0 | M_fs_copy_file | M_fs_copy_file( const char * path_old , const char * path_new , M_fs_file_mode_t mode , M_fs_progress_cb_t cb , M_fs_progress_flags_t progress_flags , M_fs_progress_t * progress , const M_fs_perms_t * perms) | ['path_old', 'path_new', 'mode', 'cb', 'progress_flags', 'progress', 'perms'] | static M_fs_error_t M_fs_copy_file(const char *path_old, const char *path_new, M_fs_file_mode_t mode, M_fs_progress_cb_t cb, M_fs_progress_flags_t progress_flags, M_fs_progress_t *progress, const M_fs_perms_t *perms)
{
M_fs_file_t *fd_old;
M_fs_file_t *fd_new;
M_fs_info_t *info = NULL;
unsigned char temp[M_FS_BUF_SIZE];
size_t read_len;
size_t wrote_len;
size_t wrote_total = 0;
size_t offset;
M_fs_error_t res;
/* We're going to create/open/truncate the new file, then as we read the contents from the old file we'll write it
* to new file. */
if (M_fs_perms_can_access(path_new, M_FS_PERMS_MODE_NONE) == M_FS_ERROR_SUCCESS) {
/* Try to delete the file since we'll be overwrite it. This is so when we create the file we create it without
* any permissions and to ensure that anything that has the file already open won't be able to read the new
* contents we're writing to the file or be able to change the perms. There is an unavoidable race condition
* between deleting and creating the file where someone could create the file and have access. However,
* depending on the OS they may have access even if the file is created with no perms... */
res = M_fs_delete(path_new, M_FALSE, NULL, M_FS_PROGRESS_NOEXTRA);
if (res != M_FS_ERROR_SUCCESS) {
return res;
}
}
/* Open the old file */
res = M_fs_file_open(&fd_old, path_old, M_FS_BUF_SIZE, M_FS_FILE_MODE_READ|M_FS_FILE_MODE_NOCREATE, NULL);
if (res != M_FS_ERROR_SUCCESS) {
return res;
}
if (perms == NULL && mode & M_FS_FILE_MODE_PRESERVE_PERMS) {
res = M_fs_info_file(&info, fd_old, M_FS_PATH_INFO_FLAGS_NONE);
if (res != M_FS_ERROR_SUCCESS) {
M_fs_file_close(fd_old);
return res;
}
perms = M_fs_info_get_perms(info);
}
res = M_fs_file_open(&fd_new, path_new, M_FS_BUF_SIZE, M_FS_FILE_MODE_WRITE|M_FS_FILE_MODE_OVERWRITE, perms);
M_fs_info_destroy(info);
if (res != M_FS_ERROR_SUCCESS) {
M_fs_file_close(fd_old);
return res;
}
/* Copy the contents of old into new. */
while ((res = M_fs_file_read(fd_old, temp, sizeof(temp), &read_len, M_FS_FILE_RW_NORMAL)) == M_FS_ERROR_SUCCESS && read_len != 0) {
offset = 0;
while (offset < read_len) {
res = M_fs_file_write(fd_new, temp+offset, read_len-offset, &wrote_len, M_FS_FILE_RW_NORMAL);
offset += wrote_len;
wrote_total += wrote_len;
if (cb) {
M_fs_progress_set_result(progress, res);
if (progress_flags & M_FS_PROGRESS_SIZE_TOTAL) {
M_fs_progress_set_size_total_progess(progress, M_fs_progress_get_size_total_progess(progress)+wrote_len);
}
if (progress_flags & M_FS_PROGRESS_SIZE_CUR) {
M_fs_progress_set_size_current_progress(progress, wrote_total);
}
if (progress_flags & M_FS_PROGRESS_COUNT) {
M_fs_progress_set_count(progress, M_fs_progress_get_count(progress)+1);
}
if (!cb(progress)) {
res = M_FS_ERROR_CANCELED;
}
}
if (res != M_FS_ERROR_SUCCESS) {
break;
}
}
if (res != M_FS_ERROR_SUCCESS) {
break;
}
}
M_fs_file_close(fd_old);
M_fs_file_close(fd_new);
if (res != M_FS_ERROR_SUCCESS) {
return res;
}
return M_FS_ERROR_SUCCESS;
} | 419 | True | 1 |
CVE-2018-14043 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/Monetra/mstdlib/issues/2', 'name': 'https://github.com/Monetra/mstdlib/issues/2', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'name': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-732'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:monetra:mstdlib:1.2.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'mstdlib (aka the M Standard Library for C) 1.2.0 has incorrect file access control in situations where M_fs_perms_can_access attempts to delete an existing file (that lacks public read/write access) during a copy operation, related to fs/m_fs.c and fs/m_fs_path.c. An attacker could create the file and then would have access to the data.'}] | 2019-10-03T00:03Z | 2018-07-13T14:29Z | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | When a resource is given a permissions setting that provides access to a wider range of actors than required, it could lead to the exposure of sensitive information, or the modification of that resource by unintended parties. This is especially dangerous when the resource is related to program configuration, execution or sensitive user data.
| https://cwe.mitre.org/data/definitions/732.html | 0 | John Schember | 2018-07-12 14:28:19-04:00 | fs: Don't try to delete the file when copying. It could cause a security issue if the file exists and doesn't allow other's to read/write. delete could allow someone to create the file and have access to the data. | db124b8f607dd0a40a9aef2d4d468fad433522a7 | False | Monetra/mstdlib | "M" Standard Library for C (common algorithms, event io, threading, sql, etc) | 2017-09-02 13:45:31 | 2022-08-18 18:36:35 | https://monetra.github.io/mstdlib/ | Monetra | 26.0 | 5.0 | M_fs_delete | M_fs_delete( const char * path , M_bool remove_children , M_fs_progress_cb_t cb , M_uint32 progress_flags) | ['path', 'remove_children', 'cb', 'progress_flags'] | M_fs_error_t M_fs_delete(const char *path, M_bool remove_children, M_fs_progress_cb_t cb, M_uint32 progress_flags)
{
char *norm_path;
char *join_path;
M_fs_dir_entries_t *entries;
const M_fs_dir_entry_t *entry;
M_fs_info_t *info;
M_fs_progress_t *progress = NULL;
M_fs_dir_walk_filter_t filter = M_FS_DIR_WALK_FILTER_ALL|M_FS_DIR_WALK_FILTER_RECURSE;
M_fs_type_t type;
/* The result that will be returned by this function. */
M_fs_error_t res;
/* The result of the delete itself. */
M_fs_error_t res2;
size_t len;
size_t i;
M_uint64 total_size = 0;
M_uint64 total_size_progress = 0;
M_uint64 entry_size;
/* Normalize the path we are going to delete so we have a valid path to pass around. */
res = M_fs_path_norm(&norm_path, path, M_FS_PATH_NORM_HOME, M_FS_SYSTEM_AUTO);
if (res != M_FS_ERROR_SUCCESS) {
M_free(norm_path);
return res;
}
/* We need the info to determine if the path is valid and because we need the type. */
res = M_fs_info(&info, norm_path, M_FS_PATH_INFO_FLAGS_BASIC);
if (res != M_FS_ERROR_SUCCESS) {
M_free(norm_path);
return res;
}
/* We must know the type because there are different functions for deleting a file and deleting a directory. */
type = M_fs_info_get_type(info);
if (type == M_FS_TYPE_UNKNOWN) {
M_fs_info_destroy(info);
M_free(norm_path);
return M_FS_ERROR_GENERIC;
}
/* Create a list of entries to store all the places we need to delete. */
entries = M_fs_dir_entries_create();
/* Recursive directory deletion isn't intuitive. We have to generate a list of files and delete the list.
* We cannot delete as walk because not all file systems support that operation. The walk; delete; behavior
* is undefined in Posix and HFS is known to skip files if the directory contents is modifies as the
* directory is being walked. */
if (type == M_FS_TYPE_DIR && remove_children) {
/* We need to read the basic info if the we need to report the size totals to the cb. */
if (cb && progress_flags & (M_FS_PROGRESS_SIZE_TOTAL|M_FS_PROGRESS_SIZE_CUR)) {
filter |= M_FS_DIR_WALK_FILTER_READ_INFO_BASIC;
}
M_fs_dir_entries_merge(&entries, M_fs_dir_walk_entries(norm_path, NULL, filter));
}
/* Add the original path to the list of entries. This may be the only entry in the list. We need to add
* it after a potential walk because we can't delete a directory that isn't empty.
* Note:
* - The info will be owned by the entry and destroyed when it is destroyed.
* - The basic info param doesn't get the info in this case. it's set so the info is stored in the entry. */
M_fs_dir_entries_insert(entries, M_fs_dir_walk_fill_entry(norm_path, NULL, type, info, M_FS_DIR_WALK_FILTER_READ_INFO_BASIC));
len = M_fs_dir_entries_len(entries);
if (cb) {
/* Create the progress. The same progress will be used for the entire operation. It will be updated with
* new info as necessary. */
progress = M_fs_progress_create();
/* Get the total size of all files to be deleted if using the progress cb and size totals is set. */
if (progress_flags & M_FS_PROGRESS_SIZE_TOTAL) {
for (i=0; i<len; i++) {
entry = M_fs_dir_entries_at(entries, i);
entry_size = M_fs_info_get_size(M_fs_dir_entry_get_info(entry));
total_size += entry_size;
}
/* Change the progress total size to reflect all entries. */
M_fs_progress_set_size_total(progress, total_size);
}
/* Change the progress count to reflect the count. */
if (progress_flags & M_FS_PROGRESS_COUNT) {
M_fs_progress_set_count_total(progress, len);
}
}
/* Assume success. Set error if there is an error. */
res = M_FS_ERROR_SUCCESS;
/* Loop though all entries and delete. */
for (i=0; i<len; i++) {
entry = M_fs_dir_entries_at(entries, i);
join_path = M_fs_path_join(norm_path, M_fs_dir_entry_get_name(entry), M_FS_SYSTEM_AUTO);
/* Call the appropriate delete function. */
if (M_fs_dir_entry_get_type(entry) == M_FS_TYPE_DIR) {
res2 = M_fs_delete_dir(join_path);
} else {
res2 = M_fs_delete_file(join_path);
}
/* Set the return result to denote there was an error. The real error will be sent via the
* progress callback for the entry. */
if (res2 != M_FS_ERROR_SUCCESS) {
res = M_FS_ERROR_GENERIC;
}
/* Set the progress data for the entry. */
if (cb) {
entry_size = M_fs_info_get_size(M_fs_dir_entry_get_info(entry));
total_size_progress += entry_size;
M_fs_progress_set_path(progress, join_path);
M_fs_progress_set_type(progress, M_fs_dir_entry_get_type(entry));
M_fs_progress_set_result(progress, res2);
if (progress_flags & M_FS_PROGRESS_COUNT) {
M_fs_progress_set_count(progress, i+1);
}
if (progress_flags & M_FS_PROGRESS_SIZE_TOTAL) {
M_fs_progress_set_size_total_progess(progress, total_size_progress);
}
if (progress_flags & M_FS_PROGRESS_SIZE_CUR) {
M_fs_progress_set_size_current(progress, entry_size);
M_fs_progress_set_size_current_progress(progress, entry_size);
}
}
M_free(join_path);
/* Call the callback and stop processing if requested. */
if (cb && !cb(progress)) {
res = M_FS_ERROR_CANCELED;
break;
}
}
M_fs_dir_entries_destroy(entries);
M_fs_progress_destroy(progress);
M_free(norm_path);
return res;
} | 541 | True | 1 |
CVE-2018-14043 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/Monetra/mstdlib/issues/2', 'name': 'https://github.com/Monetra/mstdlib/issues/2', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'name': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-732'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:monetra:mstdlib:1.2.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'mstdlib (aka the M Standard Library for C) 1.2.0 has incorrect file access control in situations where M_fs_perms_can_access attempts to delete an existing file (that lacks public read/write access) during a copy operation, related to fs/m_fs.c and fs/m_fs_path.c. An attacker could create the file and then would have access to the data.'}] | 2019-10-03T00:03Z | 2018-07-13T14:29Z | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | When a resource is given a permissions setting that provides access to a wider range of actors than required, it could lead to the exposure of sensitive information, or the modification of that resource by unintended parties. This is especially dangerous when the resource is related to program configuration, execution or sensitive user data.
| https://cwe.mitre.org/data/definitions/732.html | 0 | John Schember | 2018-07-12 14:28:19-04:00 | fs: Don't try to delete the file when copying. It could cause a security issue if the file exists and doesn't allow other's to read/write. delete could allow someone to create the file and have access to the data. | db124b8f607dd0a40a9aef2d4d468fad433522a7 | False | Monetra/mstdlib | "M" Standard Library for C (common algorithms, event io, threading, sql, etc) | 2017-09-02 13:45:31 | 2022-08-18 18:36:35 | https://monetra.github.io/mstdlib/ | Monetra | 26.0 | 5.0 | M_fs_move | M_fs_move( const char * path_old , const char * path_new , M_uint32 mode , M_fs_progress_cb_t cb , M_uint32 progress_flags) | ['path_old', 'path_new', 'mode', 'cb', 'progress_flags'] | M_fs_error_t M_fs_move(const char *path_old, const char *path_new, M_uint32 mode, M_fs_progress_cb_t cb, M_uint32 progress_flags)
{
char *norm_path_old;
char *norm_path_new;
char *resolve_path;
M_fs_info_t *info;
M_fs_progress_t *progress = NULL;
M_uint64 entry_size;
M_fs_error_t res;
if (path_old == NULL || *path_old == '\0' || path_new == NULL || *path_new == '\0') {
return M_FS_ERROR_INVALID;
}
/* It's okay if new path doesn't exist. */
res = M_fs_path_norm(&norm_path_new, path_new, M_FS_PATH_NORM_RESDIR, M_FS_SYSTEM_AUTO);
if (res != M_FS_ERROR_SUCCESS) {
M_free(norm_path_new);
return res;
}
/* If a path is a file and the destination is a directory the file should be moved
* into the directory. E.g. /file.txt -> /dir = /dir/file.txt */
if (M_fs_isfileintodir(path_old, path_new, &norm_path_old)) {
M_free(norm_path_new);
res = M_fs_move(path_old, norm_path_old, mode, cb, progress_flags);
M_free(norm_path_old);
return res;
}
/* Normalize the old path and do basic checks that it exists. We'll leave really checking that the old path
* existing to rename because any check we perform may not be true when rename is called. */
res = M_fs_path_norm(&norm_path_old, path_old, M_FS_PATH_NORM_RESALL, M_FS_SYSTEM_AUTO);
if (res != M_FS_ERROR_SUCCESS) {
M_free(norm_path_new);
M_free(norm_path_old);
return res;
}
progress = M_fs_progress_create();
res = M_fs_info(&info, path_old, (mode & M_FS_FILE_MODE_PRESERVE_PERMS)?M_FS_PATH_INFO_FLAGS_NONE:M_FS_PATH_INFO_FLAGS_BASIC);
if (res != M_FS_ERROR_SUCCESS) {
M_fs_progress_destroy(progress);
M_free(norm_path_new);
M_free(norm_path_old);
return res;
}
/* There is a race condition where the path could not exist but be created between the exists check and calling
* rename to move the file but there isn't much we can do in this case. copy will delete and the file so this
* situation won't cause an error. */
if (!M_fs_check_overwrite_allowed(norm_path_old, norm_path_new, mode)) {
M_fs_progress_destroy(progress);
M_free(norm_path_new);
M_free(norm_path_old);
return M_FS_ERROR_FILE_EXISTS;
}
if (cb) {
entry_size = M_fs_info_get_size(info);
M_fs_progress_set_path(progress, norm_path_new);
M_fs_progress_set_type(progress, M_fs_info_get_type(info));
if (progress_flags & M_FS_PROGRESS_SIZE_TOTAL) {
M_fs_progress_set_size_total(progress, entry_size);
M_fs_progress_set_size_total_progess(progress, entry_size);
}
if (progress_flags & M_FS_PROGRESS_SIZE_CUR) {
M_fs_progress_set_size_current(progress, entry_size);
M_fs_progress_set_size_current_progress(progress, entry_size);
}
/* Change the progress count to reflect the count. */
if (progress_flags & M_FS_PROGRESS_COUNT) {
M_fs_progress_set_count_total(progress, 1);
M_fs_progress_set_count(progress, 1);
}
}
/* Move the file. */
if (M_fs_info_get_type(info) == M_FS_TYPE_SYMLINK) {
res = M_fs_path_readlink(&resolve_path, norm_path_old);
if (res == M_FS_ERROR_SUCCESS) {
res = M_fs_symlink(norm_path_new, resolve_path);
}
M_free(resolve_path);
} else {
res = M_fs_move_file(norm_path_old, norm_path_new);
}
/* Failure was because we're crossing mount points. */
if (res == M_FS_ERROR_NOT_SAMEDEV) {
/* Can't rename so copy and delete. */
if (M_fs_copy(norm_path_old, norm_path_new, mode, cb, progress_flags) == M_FS_ERROR_SUCCESS) {
/* Success - Delete the original files since this is a move. */
res = M_fs_delete(norm_path_old, M_TRUE, NULL, M_FS_PROGRESS_NOEXTRA);
} else {
/* Failure - Delete the new files that were copied but only if we are not overwriting. We don't
* want to remove any existing files (especially if the dest is a dir). */
if (!(mode & M_FS_FILE_MODE_OVERWRITE)) {
M_fs_delete(norm_path_new, M_TRUE, NULL, M_FS_PROGRESS_NOEXTRA);
}
res = M_FS_ERROR_GENERIC;
}
} else {
/* Call the cb with the result of the move whether it was a success for fail. We call the cb only if the
* result of the move is not M_FS_ERROR_NOT_SAMEDEV because the copy operation will call the cb for us. */
if (cb) {
M_fs_progress_set_result(progress, res);
if (!cb(progress)) {
res = M_FS_ERROR_CANCELED;
}
}
}
M_fs_info_destroy(info);
M_fs_progress_destroy(progress);
M_free(norm_path_new);
M_free(norm_path_old);
return res;
} | 540 | True | 1 |
CVE-2018-14043 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/Monetra/mstdlib/issues/2', 'name': 'https://github.com/Monetra/mstdlib/issues/2', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'name': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-732'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:monetra:mstdlib:1.2.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'mstdlib (aka the M Standard Library for C) 1.2.0 has incorrect file access control in situations where M_fs_perms_can_access attempts to delete an existing file (that lacks public read/write access) during a copy operation, related to fs/m_fs.c and fs/m_fs_path.c. An attacker could create the file and then would have access to the data.'}] | 2019-10-03T00:03Z | 2018-07-13T14:29Z | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | When a resource is given a permissions setting that provides access to a wider range of actors than required, it could lead to the exposure of sensitive information, or the modification of that resource by unintended parties. This is especially dangerous when the resource is related to program configuration, execution or sensitive user data.
| https://cwe.mitre.org/data/definitions/732.html | 0 | John Schember | 2018-07-12 14:28:19-04:00 | fs: Don't try to delete the file when copying. It could cause a security issue if the file exists and doesn't allow other's to read/write. delete could allow someone to create the file and have access to the data. | db124b8f607dd0a40a9aef2d4d468fad433522a7 | False | Monetra/mstdlib | "M" Standard Library for C (common algorithms, event io, threading, sql, etc) | 2017-09-02 13:45:31 | 2022-08-18 18:36:35 | https://monetra.github.io/mstdlib/ | Monetra | 26.0 | 5.0 | M_fs_path_ishidden | M_fs_path_ishidden( const char * path , M_fs_info_t * info) | ['path', 'info'] | M_bool M_fs_path_ishidden(const char *path, M_fs_info_t *info)
{
M_list_str_t *path_parts;
size_t len;
M_bool ret = M_FALSE;
(void)info;
if (path == NULL || *path == '\0') {
return M_FALSE;
}
/* Hidden. Check if the first character of the last part of the path. Either the file or directory name itself
* starts with a '.'. */
path_parts = M_fs_path_componentize_path(path, M_FS_SYSTEM_UNIX);
len = M_list_str_len(path_parts);
if (len > 0) {
if (*M_list_str_at(path_parts, len-1) == '.') {
ret = M_TRUE;
}
}
M_list_str_destroy(path_parts);
return ret;
} | 98 | True | 1 |
CVE-2018-14043 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/Monetra/mstdlib/issues/2', 'name': 'https://github.com/Monetra/mstdlib/issues/2', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'name': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-732'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:monetra:mstdlib:1.2.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'mstdlib (aka the M Standard Library for C) 1.2.0 has incorrect file access control in situations where M_fs_perms_can_access attempts to delete an existing file (that lacks public read/write access) during a copy operation, related to fs/m_fs.c and fs/m_fs_path.c. An attacker could create the file and then would have access to the data.'}] | 2019-10-03T00:03Z | 2018-07-13T14:29Z | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | When a resource is given a permissions setting that provides access to a wider range of actors than required, it could lead to the exposure of sensitive information, or the modification of that resource by unintended parties. This is especially dangerous when the resource is related to program configuration, execution or sensitive user data.
| https://cwe.mitre.org/data/definitions/732.html | 0 | John Schember | 2018-07-12 14:28:19-04:00 | fs: Don't try to delete the file when copying. It could cause a security issue if the file exists and doesn't allow other's to read/write. delete could allow someone to create the file and have access to the data. | db124b8f607dd0a40a9aef2d4d468fad433522a7 | False | Monetra/mstdlib | "M" Standard Library for C (common algorithms, event io, threading, sql, etc) | 2017-09-02 13:45:31 | 2022-08-18 18:36:35 | https://monetra.github.io/mstdlib/ | Monetra | 26.0 | 5.0 | M_fs_path_join_parts | M_fs_path_join_parts( const M_list_str_t * path , M_fs_system_t sys_type) | ['path', 'sys_type'] | char *M_fs_path_join_parts(const M_list_str_t *path, M_fs_system_t sys_type)
{
M_list_str_t *parts;
const char *part;
char *out;
size_t len;
size_t i;
size_t count;
if (path == NULL) {
return NULL;
}
len = M_list_str_len(path);
if (len == 0) {
return NULL;
}
sys_type = M_fs_path_get_system_type(sys_type);
/* Remove any empty parts (except for the first part which denotes an abs path on Unix
* or a UNC path on Windows). */
parts = M_list_str_duplicate(path);
for (i=len-1; i>0; i--) {
part = M_list_str_at(parts, i);
if (part == NULL || *part == '\0') {
M_list_str_remove_at(parts, i);
}
}
len = M_list_str_len(parts);
/* Join puts the sep between items. If there are no items then the sep
* won't be written. */
part = M_list_str_at(parts, 0);
if (len == 1 && (part == NULL || *part == '\0')) {
M_list_str_destroy(parts);
if (sys_type == M_FS_SYSTEM_WINDOWS) {
return M_strdup("\\\\");
}
return M_strdup("/");
}
/* Handle windows abs path because they need two separators. */
if (sys_type == M_FS_SYSTEM_WINDOWS && len > 0) {
part = M_list_str_at(parts, 0);
/* If we have 1 item we need to add two empties so we get the second separator. */
count = (len == 1) ? 2 : 1;
/* If we're dealing with a unc path add the second sep so we get two separators for the UNC base. */
if (part != NULL && *part == '\0') {
for (i=0; i<count; i++) {
M_list_str_insert_at(parts, "", 0);
}
} else if (M_fs_path_isabs(part, sys_type) && len == 1) {
/* We need to add an empty so we get a separator after the drive. */
M_list_str_insert_at(parts, "", 1);
}
}
out = M_list_str_join(parts, (unsigned char)M_fs_path_get_system_sep(sys_type));
M_list_str_destroy(parts);
return out;
} | 302 | True | 1 |
CVE-2018-14043 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | nan | [{'url': 'https://github.com/Monetra/mstdlib/issues/2', 'name': 'https://github.com/Monetra/mstdlib/issues/2', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'name': 'https://github.com/Monetra/mstdlib/commit/db124b8f607dd0a40a9aef2d4d468fad433522a7', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-732'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:monetra:mstdlib:1.2.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'mstdlib (aka the M Standard Library for C) 1.2.0 has incorrect file access control in situations where M_fs_perms_can_access attempts to delete an existing file (that lacks public read/write access) during a copy operation, related to fs/m_fs.c and fs/m_fs_path.c. An attacker could create the file and then would have access to the data.'}] | 2019-10-03T00:03Z | 2018-07-13T14:29Z | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | When a resource is given a permissions setting that provides access to a wider range of actors than required, it could lead to the exposure of sensitive information, or the modification of that resource by unintended parties. This is especially dangerous when the resource is related to program configuration, execution or sensitive user data.
| https://cwe.mitre.org/data/definitions/732.html | 0 | John Schember | 2018-07-12 14:28:19-04:00 | fs: Don't try to delete the file when copying. It could cause a security issue if the file exists and doesn't allow other's to read/write. delete could allow someone to create the file and have access to the data. | db124b8f607dd0a40a9aef2d4d468fad433522a7 | False | Monetra/mstdlib | "M" Standard Library for C (common algorithms, event io, threading, sql, etc) | 2017-09-02 13:45:31 | 2022-08-18 18:36:35 | https://monetra.github.io/mstdlib/ | Monetra | 26.0 | 5.0 | M_fs_path_tmpdir | M_fs_path_tmpdir( M_fs_system_t sys_type) | ['sys_type'] | char *M_fs_path_tmpdir(M_fs_system_t sys_type)
{
char *d = NULL;
char *out = NULL;
M_fs_error_t res;
#ifdef _WIN32
size_t len = M_fs_path_get_path_max(M_FS_SYSTEM_WINDOWS)+1;
d = M_malloc_zero(len);
/* Return is length without NULL. */
if (GetTempPath((DWORD)len, d) >= len) {
M_free(d);
d = NULL;
}
#elif defined(__APPLE__)
d = M_fs_path_mac_tmpdir();
#else
const char *const_temp;
/* Try Unix env var. */
# ifdef HAVE_SECURE_GETENV
const_temp = secure_getenv("TMPDIR");
# else
const_temp = getenv("TMPDIR");
# endif
if (!M_str_isempty(const_temp) && M_fs_perms_can_access(const_temp, M_FS_FILE_MODE_READ|M_FS_FILE_MODE_WRITE) == M_FS_ERROR_SUCCESS) {
d = M_strdup(const_temp);
}
/* Fallback to some "standard" system paths. */
if (d == NULL) {
const_temp = "/tmp";
if (!M_str_isempty(const_temp) && M_fs_perms_can_access(const_temp, M_FS_FILE_MODE_READ|M_FS_FILE_MODE_WRITE) == M_FS_ERROR_SUCCESS) {
d = M_strdup(const_temp);
}
}
if (d == NULL) {
const_temp = "/var/tmp";
if (!M_str_isempty(const_temp) && M_fs_perms_can_access(const_temp, M_FS_FILE_MODE_READ|M_FS_FILE_MODE_WRITE) == M_FS_ERROR_SUCCESS) {
d = M_strdup(const_temp);
}
}
#endif
if (d != NULL) {
res = M_fs_path_norm(&out, d, M_FS_PATH_NORM_ABSOLUTE, sys_type);
if (res != M_FS_ERROR_SUCCESS) {
out = NULL;
}
}
M_free(d);
return out;
} | 239 | True | 1 |
CVE-2018-14354 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/95e80bf9ff10f68cb6443f760b85df4117cb15eb', 'name': 'https://github.com/neomutt/neomutt/commit/95e80bf9ff10f68cb6443f760b85df4117cb15eb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/104925', 'name': '104925', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with a manual subscription or unsubscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | Kevin McCarthy | 2018-07-07 19:03:44-07:00 | Properly quote IMAP mailbox names when (un)subscribing.
When handling automatic subscription (via $imap_check_subscribed), or
manual subscribe/unsubscribe commands, mutt generating a "mailboxes"
command but failed to properly escape backquotes.
Thanks to Jeriko One for the detailed bug report and patch, which this
commit is based upon. | 185152818541f5cdc059cbff3f3e8b654fc27c1d | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | cmd_parse_lsub | cmd_parse_lsub( IMAP_DATA * idata , char * s) | ['idata', 's'] | static void cmd_parse_lsub (IMAP_DATA* idata, char* s)
{
char buf[STRING];
char errstr[STRING];
BUFFER err, token;
ciss_url_t url;
IMAP_LIST list;
if (idata->cmddata && idata->cmdtype == IMAP_CT_LIST)
{
/* caller will handle response itself */
cmd_parse_list (idata, s);
return;
}
if (!option (OPTIMAPCHECKSUBSCRIBED))
return;
idata->cmdtype = IMAP_CT_LIST;
idata->cmddata = &list;
cmd_parse_list (idata, s);
idata->cmddata = NULL;
/* noselect is for a gmail quirk (#3445) */
if (!list.name || list.noselect)
return;
dprint (3, (debugfile, "Subscribing to %s\n", list.name));
strfcpy (buf, "mailboxes \"", sizeof (buf));
mutt_account_tourl (&idata->conn->account, &url);
/* escape \ and " */
imap_quote_string(errstr, sizeof (errstr), list.name);
url.path = errstr + 1;
url.path[strlen(url.path) - 1] = '\0';
if (!mutt_strcmp (url.user, ImapUser))
url.user = NULL;
url_ciss_tostring (&url, buf + 11, sizeof (buf) - 10, 0);
safe_strcat (buf, sizeof (buf), "\"");
mutt_buffer_init (&token);
mutt_buffer_init (&err);
err.data = errstr;
err.dsize = sizeof (errstr);
if (mutt_parse_rc_line (buf, &token, &err))
dprint (1, (debugfile, "Error adding subscribed mailbox: %s\n", errstr));
FREE (&token.data);
} | 295 | True | 1 |
CVE-2018-14357 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'name': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with an automatic subscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | Kevin McCarthy | 2018-07-07 19:03:44-07:00 | Properly quote IMAP mailbox names when (un)subscribing.
When handling automatic subscription (via $imap_check_subscribed), or
manual subscribe/unsubscribe commands, mutt generating a "mailboxes"
command but failed to properly escape backquotes.
Thanks to Jeriko One for the detailed bug report and patch, which this
commit is based upon. | 185152818541f5cdc059cbff3f3e8b654fc27c1d | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | cmd_parse_lsub | cmd_parse_lsub( IMAP_DATA * idata , char * s) | ['idata', 's'] | static void cmd_parse_lsub (IMAP_DATA* idata, char* s)
{
char buf[STRING];
char errstr[STRING];
BUFFER err, token;
ciss_url_t url;
IMAP_LIST list;
if (idata->cmddata && idata->cmdtype == IMAP_CT_LIST)
{
/* caller will handle response itself */
cmd_parse_list (idata, s);
return;
}
if (!option (OPTIMAPCHECKSUBSCRIBED))
return;
idata->cmdtype = IMAP_CT_LIST;
idata->cmddata = &list;
cmd_parse_list (idata, s);
idata->cmddata = NULL;
/* noselect is for a gmail quirk (#3445) */
if (!list.name || list.noselect)
return;
dprint (3, (debugfile, "Subscribing to %s\n", list.name));
strfcpy (buf, "mailboxes \"", sizeof (buf));
mutt_account_tourl (&idata->conn->account, &url);
/* escape \ and " */
imap_quote_string(errstr, sizeof (errstr), list.name);
url.path = errstr + 1;
url.path[strlen(url.path) - 1] = '\0';
if (!mutt_strcmp (url.user, ImapUser))
url.user = NULL;
url_ciss_tostring (&url, buf + 11, sizeof (buf) - 10, 0);
safe_strcat (buf, sizeof (buf), "\"");
mutt_buffer_init (&token);
mutt_buffer_init (&err);
err.data = errstr;
err.dsize = sizeof (errstr);
if (mutt_parse_rc_line (buf, &token, &err))
dprint (1, (debugfile, "Error adding subscribed mailbox: %s\n", errstr));
FREE (&token.data);
} | 295 | True | 1 |
CVE-2018-14354 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/95e80bf9ff10f68cb6443f760b85df4117cb15eb', 'name': 'https://github.com/neomutt/neomutt/commit/95e80bf9ff10f68cb6443f760b85df4117cb15eb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/104925', 'name': '104925', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with a manual subscription or unsubscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | Kevin McCarthy | 2018-07-07 19:03:44-07:00 | Properly quote IMAP mailbox names when (un)subscribing.
When handling automatic subscription (via $imap_check_subscribed), or
manual subscribe/unsubscribe commands, mutt generating a "mailboxes"
command but failed to properly escape backquotes.
Thanks to Jeriko One for the detailed bug report and patch, which this
commit is based upon. | 185152818541f5cdc059cbff3f3e8b654fc27c1d | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | imap_subscribe | imap_subscribe( char * path , int subscribe) | ['path', 'subscribe'] | int imap_subscribe (char *path, int subscribe)
{
IMAP_DATA *idata;
char buf[LONG_STRING];
char mbox[LONG_STRING];
char errstr[STRING];
BUFFER err, token;
IMAP_MBOX mx;
if (!mx_is_imap (path) || imap_parse_path (path, &mx) || !mx.mbox)
{
mutt_error (_("Bad mailbox name"));
return -1;
}
if (!(idata = imap_conn_find (&(mx.account), 0)))
goto fail;
imap_fix_path (idata, mx.mbox, buf, sizeof (buf));
if (!*buf)
strfcpy (buf, "INBOX", sizeof (buf));
if (option (OPTIMAPCHECKSUBSCRIBED))
{
mutt_buffer_init (&token);
mutt_buffer_init (&err);
err.data = errstr;
err.dsize = sizeof (errstr);
snprintf (mbox, sizeof (mbox), "%smailboxes \"%s\"",
subscribe ? "" : "un", path);
if (mutt_parse_rc_line (mbox, &token, &err))
dprint (1, (debugfile, "Error adding subscribed mailbox: %s\n", errstr));
FREE (&token.data);
}
if (subscribe)
mutt_message (_("Subscribing to %s..."), buf);
else
mutt_message (_("Unsubscribing from %s..."), buf);
imap_munge_mbox_name (idata, mbox, sizeof(mbox), buf);
snprintf (buf, sizeof (buf), "%sSUBSCRIBE %s", subscribe ? "" : "UN", mbox);
if (imap_exec (idata, buf, 0) < 0)
goto fail;
imap_unmunge_mbox_name(idata, mx.mbox);
if (subscribe)
mutt_message (_("Subscribed to %s"), mx.mbox);
else
mutt_message (_("Unsubscribed from %s"), mx.mbox);
FREE (&mx.mbox);
return 0;
fail:
FREE (&mx.mbox);
return -1;
} | 360 | True | 1 |
CVE-2018-14357 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'name': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with an automatic subscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | Kevin McCarthy | 2018-07-07 19:03:44-07:00 | Properly quote IMAP mailbox names when (un)subscribing.
When handling automatic subscription (via $imap_check_subscribed), or
manual subscribe/unsubscribe commands, mutt generating a "mailboxes"
command but failed to properly escape backquotes.
Thanks to Jeriko One for the detailed bug report and patch, which this
commit is based upon. | 185152818541f5cdc059cbff3f3e8b654fc27c1d | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | imap_subscribe | imap_subscribe( char * path , int subscribe) | ['path', 'subscribe'] | int imap_subscribe (char *path, int subscribe)
{
IMAP_DATA *idata;
char buf[LONG_STRING];
char mbox[LONG_STRING];
char errstr[STRING];
BUFFER err, token;
IMAP_MBOX mx;
if (!mx_is_imap (path) || imap_parse_path (path, &mx) || !mx.mbox)
{
mutt_error (_("Bad mailbox name"));
return -1;
}
if (!(idata = imap_conn_find (&(mx.account), 0)))
goto fail;
imap_fix_path (idata, mx.mbox, buf, sizeof (buf));
if (!*buf)
strfcpy (buf, "INBOX", sizeof (buf));
if (option (OPTIMAPCHECKSUBSCRIBED))
{
mutt_buffer_init (&token);
mutt_buffer_init (&err);
err.data = errstr;
err.dsize = sizeof (errstr);
snprintf (mbox, sizeof (mbox), "%smailboxes \"%s\"",
subscribe ? "" : "un", path);
if (mutt_parse_rc_line (mbox, &token, &err))
dprint (1, (debugfile, "Error adding subscribed mailbox: %s\n", errstr));
FREE (&token.data);
}
if (subscribe)
mutt_message (_("Subscribing to %s..."), buf);
else
mutt_message (_("Unsubscribing from %s..."), buf);
imap_munge_mbox_name (idata, mbox, sizeof(mbox), buf);
snprintf (buf, sizeof (buf), "%sSUBSCRIBE %s", subscribe ? "" : "UN", mbox);
if (imap_exec (idata, buf, 0) < 0)
goto fail;
imap_unmunge_mbox_name(idata, mx.mbox);
if (subscribe)
mutt_message (_("Subscribed to %s"), mx.mbox);
else
mutt_message (_("Unsubscribed from %s"), mx.mbox);
FREE (&mx.mbox);
return 0;
fail:
FREE (&mx.mbox);
return -1;
} | 360 | True | 1 |
CVE-2018-14354 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/95e80bf9ff10f68cb6443f760b85df4117cb15eb', 'name': 'https://github.com/neomutt/neomutt/commit/95e80bf9ff10f68cb6443f760b85df4117cb15eb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/104925', 'name': '104925', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with a manual subscription or unsubscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | Kevin McCarthy | 2018-07-07 19:03:44-07:00 | Properly quote IMAP mailbox names when (un)subscribing.
When handling automatic subscription (via $imap_check_subscribed), or
manual subscribe/unsubscribe commands, mutt generating a "mailboxes"
command but failed to properly escape backquotes.
Thanks to Jeriko One for the detailed bug report and patch, which this
commit is based upon. | 185152818541f5cdc059cbff3f3e8b654fc27c1d | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | imap_quote_string | imap_quote_string( char * dest , size_t dlen , const char * src) | ['dest', 'dlen', 'src'] | void imap_quote_string (char *dest, size_t dlen, const char *src)
{
static const char quote[] = "\"\\";
char *pt;
const char *s;
pt = dest;
s = src;
*pt++ = '"';
/* save room for trailing quote-char */
dlen -= 2;
for (; *s && dlen; s++)
{
if (strchr (quote, *s))
{
dlen -= 2;
if (!dlen)
break;
*pt++ = '\\';
*pt++ = *s;
}
else
{
*pt++ = *s;
dlen--;
}
}
*pt++ = '"';
*pt = 0;
} | 125 | True | 1 |
CVE-2018-14357 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'name': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with an automatic subscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | Kevin McCarthy | 2018-07-07 19:03:44-07:00 | Properly quote IMAP mailbox names when (un)subscribing.
When handling automatic subscription (via $imap_check_subscribed), or
manual subscribe/unsubscribe commands, mutt generating a "mailboxes"
command but failed to properly escape backquotes.
Thanks to Jeriko One for the detailed bug report and patch, which this
commit is based upon. | 185152818541f5cdc059cbff3f3e8b654fc27c1d | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | imap_quote_string | imap_quote_string( char * dest , size_t dlen , const char * src) | ['dest', 'dlen', 'src'] | void imap_quote_string (char *dest, size_t dlen, const char *src)
{
static const char quote[] = "\"\\";
char *pt;
const char *s;
pt = dest;
s = src;
*pt++ = '"';
/* save room for trailing quote-char */
dlen -= 2;
for (; *s && dlen; s++)
{
if (strchr (quote, *s))
{
dlen -= 2;
if (!dlen)
break;
*pt++ = '\\';
*pt++ = *s;
}
else
{
*pt++ = *s;
dlen--;
}
}
*pt++ = '"';
*pt = 0;
} | 125 | True | 1 |
CVE-2018-14352 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/e0131852c6059107939893016c8ff56b6e42865d', 'name': 'https://gitlab.com/muttmua/mutt/commit/e0131852c6059107939893016c8ff56b6e42865d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/e27b65b3bf8defa34db58919496056caf3850cd4', 'name': 'https://github.com/neomutt/neomutt/commit/e27b65b3bf8defa34db58919496056caf3850cd4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. imap_quote_string in imap/util.c does not leave room for quote characters, leading to a stack-based buffer overflow.'}] | 2020-05-20T01:25Z | 2018-07-17T17:29Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | Kevin McCarthy | 2018-07-12 20:46:37-07:00 | Fix imap_quote_string() length check errors.
The function wasn't properly checking for dlen<2 before quoting, and
wasn't properly pre-adjusting dlen to include the initial quote.
Thanks to Jeriko One for reporting these issues. | e0131852c6059107939893016c8ff56b6e42865d | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | _imap_quote_string | _imap_quote_string( char * dest , size_t dlen , const char * src , const char * to_quote) | ['dest', 'dlen', 'src', 'to_quote'] | static void _imap_quote_string (char *dest, size_t dlen, const char *src,
const char *to_quote)
{
char *pt;
const char *s;
pt = dest;
s = src;
*pt++ = '"';
/* save room for trailing quote-char */
dlen -= 2;
for (; *s && dlen; s++)
{
if (strchr (to_quote, *s))
{
dlen -= 2;
if (!dlen)
break;
*pt++ = '\\';
*pt++ = *s;
}
else
{
*pt++ = *s;
dlen--;
}
}
*pt++ = '"';
*pt = 0;
} | 121 | True | 1 |
CVE-2018-14353 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/e0131852c6059107939893016c8ff56b6e42865d', 'name': 'https://gitlab.com/muttmua/mutt/commit/e0131852c6059107939893016c8ff56b6e42865d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/65d64a5b60a4a3883f2cd799d92c6091d8854f23', 'name': 'https://github.com/neomutt/neomutt/commit/65d64a5b60a4a3883f2cd799d92c6091d8854f23', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-191'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. imap_quote_string in imap/util.c has an integer underflow.'}] | 2020-05-20T01:23Z | 2018-07-17T17:29Z | Integer Underflow (Wrap or Wraparound) | The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result. | This can happen in signed and unsigned cases.
| https://cwe.mitre.org/data/definitions/191.html | 0 | Kevin McCarthy | 2018-07-12 20:46:37-07:00 | Fix imap_quote_string() length check errors.
The function wasn't properly checking for dlen<2 before quoting, and
wasn't properly pre-adjusting dlen to include the initial quote.
Thanks to Jeriko One for reporting these issues. | e0131852c6059107939893016c8ff56b6e42865d | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | _imap_quote_string | _imap_quote_string( char * dest , size_t dlen , const char * src , const char * to_quote) | ['dest', 'dlen', 'src', 'to_quote'] | static void _imap_quote_string (char *dest, size_t dlen, const char *src,
const char *to_quote)
{
char *pt;
const char *s;
pt = dest;
s = src;
*pt++ = '"';
/* save room for trailing quote-char */
dlen -= 2;
for (; *s && dlen; s++)
{
if (strchr (to_quote, *s))
{
dlen -= 2;
if (!dlen)
break;
*pt++ = '\\';
*pt++ = *s;
}
else
{
*pt++ = *s;
dlen--;
}
}
*pt++ = '"';
*pt = 0;
} | 121 | True | 1 |
CVE-2018-14362 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'name': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'Patch']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. pop.c does not forbid characters that may have unsafe interaction with message-cache pathnames, as demonstrated by a '/' character."}] | 2020-05-19T17:19Z | 2018-07-17T17:29Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Kevin McCarthy | 2018-07-13 11:16:33-07:00 | Sanitize POP bcache paths.
Protect against bcache directory path traversal for UID values.
Thanks for Jeriko One for the bug report and patch, which this commit
is based upon. | 6aed28b40a0410ec47d40c8c7296d8d10bae7576 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | msg_cache_check | msg_cache_check( const char * id , body_cache_t * bcache , void * data) | ['id', 'bcache', 'data'] | static int msg_cache_check (const char *id, body_cache_t *bcache, void *data)
{
CONTEXT *ctx;
POP_DATA *pop_data;
int i;
if (!(ctx = (CONTEXT *)data))
return -1;
if (!(pop_data = (POP_DATA *)ctx->data))
return -1;
#ifdef USE_HCACHE
/* keep hcache file if hcache == bcache */
if (strcmp (HC_FNAME "." HC_FEXT, id) == 0)
return 0;
#endif
for (i = 0; i < ctx->msgcount; i++)
/* if the id we get is known for a header: done (i.e. keep in cache) */
if (ctx->hdrs[i]->data && mutt_strcmp (ctx->hdrs[i]->data, id) == 0)
return 0;
/* message not found in context -> remove it from cache
* return the result of bcache, so we stop upon its first error
*/
return mutt_bcache_del (bcache, id);
} | 133 | True | 1 |
CVE-2018-14362 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'name': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'Patch']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. pop.c does not forbid characters that may have unsafe interaction with message-cache pathnames, as demonstrated by a '/' character."}] | 2020-05-19T17:19Z | 2018-07-17T17:29Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Kevin McCarthy | 2018-07-13 11:16:33-07:00 | Sanitize POP bcache paths.
Protect against bcache directory path traversal for UID values.
Thanks for Jeriko One for the bug report and patch, which this commit
is based upon. | 6aed28b40a0410ec47d40c8c7296d8d10bae7576 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | pop_fetch_headers | pop_fetch_headers( CONTEXT * ctx) | ['ctx'] | static int pop_fetch_headers (CONTEXT *ctx)
{
int i, ret, old_count, new_count, deleted;
unsigned short hcached = 0, bcached;
POP_DATA *pop_data = (POP_DATA *)ctx->data;
progress_t progress;
#ifdef USE_HCACHE
header_cache_t *hc = NULL;
void *data;
hc = pop_hcache_open (pop_data, ctx->path);
#endif
time (&pop_data->check_time);
pop_data->clear_cache = 0;
for (i = 0; i < ctx->msgcount; i++)
ctx->hdrs[i]->refno = -1;
old_count = ctx->msgcount;
ret = pop_fetch_data (pop_data, "UIDL\r\n", NULL, fetch_uidl, ctx);
new_count = ctx->msgcount;
ctx->msgcount = old_count;
if (pop_data->cmd_uidl == 2)
{
if (ret == 0)
{
pop_data->cmd_uidl = 1;
dprint (1, (debugfile, "pop_fetch_headers: set UIDL capability\n"));
}
if (ret == -2 && pop_data->cmd_uidl == 2)
{
pop_data->cmd_uidl = 0;
dprint (1, (debugfile, "pop_fetch_headers: unset UIDL capability\n"));
snprintf (pop_data->err_msg, sizeof (pop_data->err_msg), "%s",
_("Command UIDL is not supported by server."));
}
}
if (!ctx->quiet)
mutt_progress_init (&progress, _("Fetching message headers..."),
MUTT_PROGRESS_MSG, ReadInc, new_count - old_count);
if (ret == 0)
{
for (i = 0, deleted = 0; i < old_count; i++)
{
if (ctx->hdrs[i]->refno == -1)
{
ctx->hdrs[i]->deleted = 1;
deleted++;
}
}
if (deleted > 0)
{
mutt_error (_("%d messages have been lost. Try reopening the mailbox."),
deleted);
mutt_sleep (2);
}
for (i = old_count; i < new_count; i++)
{
if (!ctx->quiet)
mutt_progress_update (&progress, i + 1 - old_count, -1);
#if USE_HCACHE
if ((data = mutt_hcache_fetch (hc, ctx->hdrs[i]->data, strlen)))
{
char *uidl = safe_strdup (ctx->hdrs[i]->data);
int refno = ctx->hdrs[i]->refno;
int index = ctx->hdrs[i]->index;
/*
* - POP dynamically numbers headers and relies on h->refno
* to map messages; so restore header and overwrite restored
* refno with current refno, same for index
* - h->data needs to a separate pointer as it's driver-specific
* data freed separately elsewhere
* (the old h->data should point inside a malloc'd block from
* hcache so there shouldn't be a memleak here)
*/
HEADER *h = mutt_hcache_restore ((unsigned char *) data, NULL);
mutt_free_header (&ctx->hdrs[i]);
ctx->hdrs[i] = h;
ctx->hdrs[i]->refno = refno;
ctx->hdrs[i]->index = index;
ctx->hdrs[i]->data = uidl;
ret = 0;
hcached = 1;
}
else
#endif
if ((ret = pop_read_header (pop_data, ctx->hdrs[i])) < 0)
break;
#if USE_HCACHE
else
{
mutt_hcache_store (hc, ctx->hdrs[i]->data, ctx->hdrs[i], 0, strlen, MUTT_GENERATE_UIDVALIDITY);
}
mutt_hcache_free (&data);
#endif
/*
* faked support for flags works like this:
* - if 'hcached' is 1, we have the message in our hcache:
* - if we also have a body: read
* - if we don't have a body: old
* (if $mark_old is set which is maybe wrong as
* $mark_old should be considered for syncing the
* folder and not when opening it XXX)
* - if 'hcached' is 0, we don't have the message in our hcache:
* - if we also have a body: read
* - if we don't have a body: new
*/
bcached = mutt_bcache_exists (pop_data->bcache, ctx->hdrs[i]->data) == 0;
ctx->hdrs[i]->old = 0;
ctx->hdrs[i]->read = 0;
if (hcached)
{
if (bcached)
ctx->hdrs[i]->read = 1;
else if (option (OPTMARKOLD))
ctx->hdrs[i]->old = 1;
}
else
{
if (bcached)
ctx->hdrs[i]->read = 1;
}
ctx->msgcount++;
}
if (i > old_count)
mx_update_context (ctx, i - old_count);
}
#if USE_HCACHE
mutt_hcache_close (hc);
#endif
if (ret < 0)
{
for (i = ctx->msgcount; i < new_count; i++)
mutt_free_header (&ctx->hdrs[i]);
return ret;
}
/* after putting the result into our structures,
* clean up cache, i.e. wipe messages deleted outside
* the availability of our cache
*/
if (option (OPTMESSAGECACHECLEAN))
mutt_bcache_list (pop_data->bcache, msg_cache_check, (void*)ctx);
mutt_clear_error ();
return (new_count - old_count);
} | 763 | True | 1 |
CVE-2018-14362 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'name': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'Patch']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. pop.c does not forbid characters that may have unsafe interaction with message-cache pathnames, as demonstrated by a '/' character."}] | 2020-05-19T17:19Z | 2018-07-17T17:29Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Kevin McCarthy | 2018-07-13 11:16:33-07:00 | Sanitize POP bcache paths.
Protect against bcache directory path traversal for UID values.
Thanks for Jeriko One for the bug report and patch, which this commit
is based upon. | 6aed28b40a0410ec47d40c8c7296d8d10bae7576 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | pop_fetch_message | pop_fetch_message( CONTEXT * ctx , MESSAGE * msg , int msgno) | ['ctx', 'msg', 'msgno'] | static int pop_fetch_message (CONTEXT* ctx, MESSAGE* msg, int msgno)
{
int ret;
void *uidl;
char buf[LONG_STRING];
char path[_POSIX_PATH_MAX];
progress_t progressbar;
POP_DATA *pop_data = (POP_DATA *)ctx->data;
POP_CACHE *cache;
HEADER *h = ctx->hdrs[msgno];
unsigned short bcache = 1;
/* see if we already have the message in body cache */
if ((msg->fp = mutt_bcache_get (pop_data->bcache, h->data)))
return 0;
/*
* see if we already have the message in our cache in
* case $message_cachedir is unset
*/
cache = &pop_data->cache[h->index % POP_CACHE_LEN];
if (cache->path)
{
if (cache->index == h->index)
{
/* yes, so just return a pointer to the message */
msg->fp = fopen (cache->path, "r");
if (msg->fp)
return 0;
mutt_perror (cache->path);
mutt_sleep (2);
return -1;
}
else
{
/* clear the previous entry */
unlink (cache->path);
FREE (&cache->path);
}
}
FOREVER
{
if (pop_reconnect (ctx) < 0)
return -1;
/* verify that massage index is correct */
if (h->refno < 0)
{
mutt_error _("The message index is incorrect. Try reopening the mailbox.");
mutt_sleep (2);
return -1;
}
mutt_progress_init (&progressbar, _("Fetching message..."),
MUTT_PROGRESS_SIZE, NetInc, h->content->length + h->content->offset - 1);
/* see if we can put in body cache; use our cache as fallback */
if (!(msg->fp = mutt_bcache_put (pop_data->bcache, h->data, 1)))
{
/* no */
bcache = 0;
mutt_mktemp (path, sizeof (path));
if (!(msg->fp = safe_fopen (path, "w+")))
{
mutt_perror (path);
mutt_sleep (2);
return -1;
}
}
snprintf (buf, sizeof (buf), "RETR %d\r\n", h->refno);
ret = pop_fetch_data (pop_data, buf, &progressbar, fetch_message, msg->fp);
if (ret == 0)
break;
safe_fclose (&msg->fp);
/* if RETR failed (e.g. connection closed), be sure to remove either
* the file in bcache or from POP's own cache since the next iteration
* of the loop will re-attempt to put() the message */
if (!bcache)
unlink (path);
if (ret == -2)
{
mutt_error ("%s", pop_data->err_msg);
mutt_sleep (2);
return -1;
}
if (ret == -3)
{
mutt_error _("Can't write message to temporary file!");
mutt_sleep (2);
return -1;
}
}
/* Update the header information. Previously, we only downloaded a
* portion of the headers, those required for the main display.
*/
if (bcache)
mutt_bcache_commit (pop_data->bcache, h->data);
else
{
cache->index = h->index;
cache->path = safe_strdup (path);
}
rewind (msg->fp);
uidl = h->data;
/* we replace envelop, key in subj_hash has to be updated as well */
if (ctx->subj_hash && h->env->real_subj)
hash_delete (ctx->subj_hash, h->env->real_subj, h, NULL);
mutt_label_hash_remove (ctx, h);
mutt_free_envelope (&h->env);
h->env = mutt_read_rfc822_header (msg->fp, h, 0, 0);
if (ctx->subj_hash && h->env->real_subj)
hash_insert (ctx->subj_hash, h->env->real_subj, h);
mutt_label_hash_add (ctx, h);
h->data = uidl;
h->lines = 0;
fgets (buf, sizeof (buf), msg->fp);
while (!feof (msg->fp))
{
ctx->hdrs[msgno]->lines++;
fgets (buf, sizeof (buf), msg->fp);
}
h->content->length = ftello (msg->fp) - h->content->offset;
/* This needs to be done in case this is a multipart message */
if (!WithCrypto)
h->security = crypt_query (h->content);
mutt_clear_error();
rewind (msg->fp);
return 0;
} | 687 | True | 1 |
CVE-2018-14362 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'name': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'Patch']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. pop.c does not forbid characters that may have unsafe interaction with message-cache pathnames, as demonstrated by a '/' character."}] | 2020-05-19T17:19Z | 2018-07-17T17:29Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Kevin McCarthy | 2018-07-13 11:16:33-07:00 | Sanitize POP bcache paths.
Protect against bcache directory path traversal for UID values.
Thanks for Jeriko One for the bug report and patch, which this commit
is based upon. | 6aed28b40a0410ec47d40c8c7296d8d10bae7576 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | pop_sync_mailbox | pop_sync_mailbox( CONTEXT * ctx , int * index_hint) | ['ctx', 'index_hint'] | static int pop_sync_mailbox (CONTEXT *ctx, int *index_hint)
{
int i, j, ret = 0;
char buf[LONG_STRING];
POP_DATA *pop_data = (POP_DATA *)ctx->data;
progress_t progress;
#ifdef USE_HCACHE
header_cache_t *hc = NULL;
#endif
pop_data->check_time = 0;
FOREVER
{
if (pop_reconnect (ctx) < 0)
return -1;
mutt_progress_init (&progress, _("Marking messages deleted..."),
MUTT_PROGRESS_MSG, WriteInc, ctx->deleted);
#if USE_HCACHE
hc = pop_hcache_open (pop_data, ctx->path);
#endif
for (i = 0, j = 0, ret = 0; ret == 0 && i < ctx->msgcount; i++)
{
if (ctx->hdrs[i]->deleted && ctx->hdrs[i]->refno != -1)
{
j++;
if (!ctx->quiet)
mutt_progress_update (&progress, j, -1);
snprintf (buf, sizeof (buf), "DELE %d\r\n", ctx->hdrs[i]->refno);
if ((ret = pop_query (pop_data, buf, sizeof (buf))) == 0)
{
mutt_bcache_del (pop_data->bcache, ctx->hdrs[i]->data);
#if USE_HCACHE
mutt_hcache_delete (hc, ctx->hdrs[i]->data, strlen);
#endif
}
}
#if USE_HCACHE
if (ctx->hdrs[i]->changed)
{
mutt_hcache_store (hc, ctx->hdrs[i]->data, ctx->hdrs[i], 0, strlen, MUTT_GENERATE_UIDVALIDITY);
}
#endif
}
#if USE_HCACHE
mutt_hcache_close (hc);
#endif
if (ret == 0)
{
strfcpy (buf, "QUIT\r\n", sizeof (buf));
ret = pop_query (pop_data, buf, sizeof (buf));
}
if (ret == 0)
{
pop_data->clear_cache = 1;
pop_clear_cache (pop_data);
pop_data->status = POP_DISCONNECTED;
return 0;
}
if (ret == -2)
{
mutt_error ("%s", pop_data->err_msg);
mutt_sleep (2);
return -1;
}
}
} | 384 | True | 1 |
CVE-2018-14350 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3287534daa3beac68e2e83ca4b4fe8a3148ff870', 'name': 'https://gitlab.com/muttmua/mutt/commit/3287534daa3beac68e2e83ca4b4fe8a3148ff870', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/1b0f0d0988e6df4e32e9f4bf8780846ea95d4485', 'name': 'https://github.com/neomutt/neomutt/commit/1b0f0d0988e6df4e32e9f4bf8780846ea95d4485', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/104931', 'name': '104931', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. imap/message.c has a stack-based buffer overflow for a FETCH response with a long INTERNALDATE field.'}] | 2020-05-20T01:39Z | 2018-07-17T17:29Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | Kevin McCarthy | 2018-07-13 12:15:00-07:00 | Don't overflow tmp in msg_parse_fetch.
Ensure INTERNALDATE and RFC822.SIZE field sizes fit temp buffer.
Thanks to Jeriko One for the bug report and patch, which this patch is
based upon. | 3287534daa3beac68e2e83ca4b4fe8a3148ff870 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | msg_parse_fetch | msg_parse_fetch( IMAP_HEADER * h , char * s) | ['h', 's'] | static int msg_parse_fetch (IMAP_HEADER *h, char *s)
{
char tmp[SHORT_STRING];
char *ptmp;
if (!s)
return -1;
while (*s)
{
SKIPWS (s);
if (ascii_strncasecmp ("FLAGS", s, 5) == 0)
{
if ((s = msg_parse_flags (h, s)) == NULL)
return -1;
}
else if (ascii_strncasecmp ("UID", s, 3) == 0)
{
s += 3;
SKIPWS (s);
if (mutt_atoui (s, &h->data->uid) < 0)
return -1;
s = imap_next_word (s);
}
else if (ascii_strncasecmp ("INTERNALDATE", s, 12) == 0)
{
s += 12;
SKIPWS (s);
if (*s != '\"')
{
dprint (1, (debugfile, "msg_parse_fetch(): bogus INTERNALDATE entry: %s\n", s));
return -1;
}
s++;
ptmp = tmp;
while (*s && *s != '\"')
*ptmp++ = *s++;
if (*s != '\"')
return -1;
s++; /* skip past the trailing " */
*ptmp = 0;
h->received = imap_parse_date (tmp);
}
else if (ascii_strncasecmp ("RFC822.SIZE", s, 11) == 0)
{
s += 11;
SKIPWS (s);
ptmp = tmp;
while (isdigit ((unsigned char) *s))
*ptmp++ = *s++;
*ptmp = 0;
if (mutt_atol (tmp, &h->content_length) < 0)
return -1;
}
else if (!ascii_strncasecmp ("BODY", s, 4) ||
!ascii_strncasecmp ("RFC822.HEADER", s, 13))
{
/* handle above, in msg_fetch_header */
return -2;
}
else if (*s == ')')
s++; /* end of request */
else if (*s)
{
/* got something i don't understand */
imap_error ("msg_parse_fetch", s);
return -1;
}
}
return 0;
} | 367 | True | 1 |
CVE-2018-14358 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3287534daa3beac68e2e83ca4b4fe8a3148ff870', 'name': 'https://gitlab.com/muttmua/mutt/commit/3287534daa3beac68e2e83ca4b4fe8a3148ff870', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/1b0f0d0988e6df4e32e9f4bf8780846ea95d4485', 'name': 'https://github.com/neomutt/neomutt/commit/1b0f0d0988e6df4e32e9f4bf8780846ea95d4485', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. imap/message.c has a stack-based buffer overflow for a FETCH response with a long RFC822.SIZE field.'}] | 2020-05-20T00:48Z | 2018-07-17T17:29Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | Kevin McCarthy | 2018-07-13 12:15:00-07:00 | Don't overflow tmp in msg_parse_fetch.
Ensure INTERNALDATE and RFC822.SIZE field sizes fit temp buffer.
Thanks to Jeriko One for the bug report and patch, which this patch is
based upon. | 3287534daa3beac68e2e83ca4b4fe8a3148ff870 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | msg_parse_fetch | msg_parse_fetch( IMAP_HEADER * h , char * s) | ['h', 's'] | static int msg_parse_fetch (IMAP_HEADER *h, char *s)
{
char tmp[SHORT_STRING];
char *ptmp;
if (!s)
return -1;
while (*s)
{
SKIPWS (s);
if (ascii_strncasecmp ("FLAGS", s, 5) == 0)
{
if ((s = msg_parse_flags (h, s)) == NULL)
return -1;
}
else if (ascii_strncasecmp ("UID", s, 3) == 0)
{
s += 3;
SKIPWS (s);
if (mutt_atoui (s, &h->data->uid) < 0)
return -1;
s = imap_next_word (s);
}
else if (ascii_strncasecmp ("INTERNALDATE", s, 12) == 0)
{
s += 12;
SKIPWS (s);
if (*s != '\"')
{
dprint (1, (debugfile, "msg_parse_fetch(): bogus INTERNALDATE entry: %s\n", s));
return -1;
}
s++;
ptmp = tmp;
while (*s && *s != '\"')
*ptmp++ = *s++;
if (*s != '\"')
return -1;
s++; /* skip past the trailing " */
*ptmp = 0;
h->received = imap_parse_date (tmp);
}
else if (ascii_strncasecmp ("RFC822.SIZE", s, 11) == 0)
{
s += 11;
SKIPWS (s);
ptmp = tmp;
while (isdigit ((unsigned char) *s))
*ptmp++ = *s++;
*ptmp = 0;
if (mutt_atol (tmp, &h->content_length) < 0)
return -1;
}
else if (!ascii_strncasecmp ("BODY", s, 4) ||
!ascii_strncasecmp ("RFC822.HEADER", s, 13))
{
/* handle above, in msg_fetch_header */
return -2;
}
else if (*s == ')')
s++; /* end of request */
else if (*s)
{
/* got something i don't understand */
imap_error ("msg_parse_fetch", s);
return -1;
}
}
return 0;
} | 367 | True | 1 |
CVE-2018-14349 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/9347b5c01dc52682cb6be11539d9b7ebceae4416', 'name': 'https://gitlab.com/muttmua/mutt/commit/9347b5c01dc52682cb6be11539d9b7ebceae4416', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/36a29280448097f34ce9c94606195f2ac643fed1', 'name': 'https://github.com/neomutt/neomutt/commit/36a29280448097f34ce9c94606195f2ac643fed1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. imap/command.c mishandles a NO response without a message.'}] | 2020-05-20T01:47Z | 2018-07-17T17:29Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | JerikoOne | 2018-07-13 12:24:58-07:00 | Handle NO response without message properly | 9347b5c01dc52682cb6be11539d9b7ebceae4416 | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | cmd_handle_untagged | cmd_handle_untagged( IMAP_DATA * idata) | ['idata'] | static int cmd_handle_untagged (IMAP_DATA* idata)
{
char* s;
char* pn;
unsigned int count;
s = imap_next_word (idata->buf);
pn = imap_next_word (s);
if ((idata->state >= IMAP_SELECTED) && isdigit ((unsigned char) *s))
{
pn = s;
s = imap_next_word (s);
/* EXISTS and EXPUNGE are always related to the SELECTED mailbox for the
* connection, so update that one.
*/
if (ascii_strncasecmp ("EXISTS", s, 6) == 0)
{
dprint (2, (debugfile, "Handling EXISTS\n"));
/* new mail arrived */
mutt_atoui (pn, &count);
if ( !(idata->reopen & IMAP_EXPUNGE_PENDING) &&
count < idata->max_msn)
{
/* Notes 6.0.3 has a tendency to report fewer messages exist than
* it should. */
dprint (1, (debugfile, "Message count is out of sync"));
return 0;
}
/* at least the InterChange server sends EXISTS messages freely,
* even when there is no new mail */
else if (count == idata->max_msn)
dprint (3, (debugfile,
"cmd_handle_untagged: superfluous EXISTS message.\n"));
else
{
if (!(idata->reopen & IMAP_EXPUNGE_PENDING))
{
dprint (2, (debugfile,
"cmd_handle_untagged: New mail in %s - %d messages total.\n",
idata->mailbox, count));
idata->reopen |= IMAP_NEWMAIL_PENDING;
}
idata->newMailCount = count;
}
}
/* pn vs. s: need initial seqno */
else if (ascii_strncasecmp ("EXPUNGE", s, 7) == 0)
cmd_parse_expunge (idata, pn);
else if (ascii_strncasecmp ("FETCH", s, 5) == 0)
cmd_parse_fetch (idata, pn);
}
else if (ascii_strncasecmp ("CAPABILITY", s, 10) == 0)
cmd_parse_capability (idata, s);
else if (!ascii_strncasecmp ("OK [CAPABILITY", s, 14))
cmd_parse_capability (idata, pn);
else if (!ascii_strncasecmp ("OK [CAPABILITY", pn, 14))
cmd_parse_capability (idata, imap_next_word (pn));
else if (ascii_strncasecmp ("LIST", s, 4) == 0)
cmd_parse_list (idata, s);
else if (ascii_strncasecmp ("LSUB", s, 4) == 0)
cmd_parse_lsub (idata, s);
else if (ascii_strncasecmp ("MYRIGHTS", s, 8) == 0)
cmd_parse_myrights (idata, s);
else if (ascii_strncasecmp ("SEARCH", s, 6) == 0)
cmd_parse_search (idata, s);
else if (ascii_strncasecmp ("STATUS", s, 6) == 0)
cmd_parse_status (idata, s);
else if (ascii_strncasecmp ("ENABLED", s, 7) == 0)
cmd_parse_enabled (idata, s);
else if (ascii_strncasecmp ("BYE", s, 3) == 0)
{
dprint (2, (debugfile, "Handling BYE\n"));
/* check if we're logging out */
if (idata->status == IMAP_BYE)
return 0;
/* server shut down our connection */
s += 3;
SKIPWS (s);
mutt_error ("%s", s);
mutt_sleep (2);
cmd_handle_fatal (idata);
return -1;
}
else if (option (OPTIMAPSERVERNOISE) && (ascii_strncasecmp ("NO", s, 2) == 0))
{
dprint (2, (debugfile, "Handling untagged NO\n"));
/* Display the warning message from the server */
mutt_error ("%s", s+3);
mutt_sleep (2);
}
return 0;
} | 552 | True | 1 |
CVE-2018-14359 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'name': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'name': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They have a buffer overflow via base64 data.'}] | 2020-05-19T17:13Z | 2018-07-17T17:29Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Kevin McCarthy | 2018-07-13 14:25:28-07:00 | Check outbuf length in mutt_from_base64()
The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c.
Thanks to Jeriko One for the bug report. | 3d9028fec8f4d08db2251096307c0bbbebce669a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | mutt_from_base64 | mutt_from_base64( char * out , const char * in) | ['out', 'in'] | int mutt_from_base64 (char *out, const char *in)
{
int len = 0;
register unsigned char digit1, digit2, digit3, digit4;
do
{
digit1 = in[0];
if (digit1 > 127 || base64val (digit1) == BAD)
return -1;
digit2 = in[1];
if (digit2 > 127 || base64val (digit2) == BAD)
return -1;
digit3 = in[2];
if (digit3 > 127 || ((digit3 != '=') && (base64val (digit3) == BAD)))
return -1;
digit4 = in[3];
if (digit4 > 127 || ((digit4 != '=') && (base64val (digit4) == BAD)))
return -1;
in += 4;
/* digits are already sanity-checked */
*out++ = (base64val(digit1) << 2) | (base64val(digit2) >> 4);
len++;
if (digit3 != '=')
{
*out++ = ((base64val(digit2) << 4) & 0xf0) | (base64val(digit3) >> 2);
len++;
if (digit4 != '=')
{
*out++ = ((base64val(digit3) << 6) & 0xc0) | base64val(digit4);
len++;
}
}
}
while (*in && digit4 != '=');
return len;
} | 265 | True | 1 |
CVE-2018-14359 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'name': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'name': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They have a buffer overflow via base64 data.'}] | 2020-05-19T17:13Z | 2018-07-17T17:29Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Kevin McCarthy | 2018-07-13 14:25:28-07:00 | Check outbuf length in mutt_from_base64()
The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c.
Thanks to Jeriko One for the bug report. | 3d9028fec8f4d08db2251096307c0bbbebce669a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | imap_auth_cram_md5 | imap_auth_cram_md5( IMAP_DATA * idata , const char * method) | ['idata', 'method'] | imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA* idata, const char* method)
{
char ibuf[LONG_STRING*2], obuf[LONG_STRING];
unsigned char hmac_response[MD5_DIGEST_LEN];
int len;
int rc;
if (!mutt_bit_isset (idata->capabilities, ACRAM_MD5))
return IMAP_AUTH_UNAVAIL;
mutt_message _("Authenticating (CRAM-MD5)...");
/* get auth info */
if (mutt_account_getlogin (&idata->conn->account))
return IMAP_AUTH_FAILURE;
if (mutt_account_getpass (&idata->conn->account))
return IMAP_AUTH_FAILURE;
imap_cmd_start (idata, "AUTHENTICATE CRAM-MD5");
/* From RFC 2195:
* The data encoded in the first ready response contains a presumptively
* arbitrary string of random digits, a timestamp, and the fully-qualified
* primary host name of the server. The syntax of the unencoded form must
* correspond to that of an RFC 822 'msg-id' [RFC822] as described in [POP3].
*/
do
rc = imap_cmd_step (idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc != IMAP_CMD_RESPOND)
{
dprint (1, (debugfile, "Invalid response from server: %s\n", ibuf));
goto bail;
}
if ((len = mutt_from_base64 (obuf, idata->buf + 2)) == -1)
{
dprint (1, (debugfile, "Error decoding base64 response.\n"));
goto bail;
}
obuf[len] = '\0';
dprint (2, (debugfile, "CRAM challenge: %s\n", obuf));
/* The client makes note of the data and then responds with a string
* consisting of the user name, a space, and a 'digest'. The latter is
* computed by applying the keyed MD5 algorithm from [KEYED-MD5] where the
* key is a shared secret and the digested text is the timestamp (including
* angle-brackets).
*
* Note: The user name shouldn't be quoted. Since the digest can't contain
* spaces, there is no ambiguity. Some servers get this wrong, we'll work
* around them when the bug report comes in. Until then, we'll remain
* blissfully RFC-compliant.
*/
hmac_md5 (idata->conn->account.pass, obuf, hmac_response);
/* dubious optimisation I saw elsewhere: make the whole string in one call */
snprintf (obuf, sizeof (obuf),
"%s %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
idata->conn->account.user,
hmac_response[0], hmac_response[1], hmac_response[2], hmac_response[3],
hmac_response[4], hmac_response[5], hmac_response[6], hmac_response[7],
hmac_response[8], hmac_response[9], hmac_response[10], hmac_response[11],
hmac_response[12], hmac_response[13], hmac_response[14], hmac_response[15]);
dprint(2, (debugfile, "CRAM response: %s\n", obuf));
/* XXX - ibuf must be long enough to store the base64 encoding of obuf,
* plus the additional debris
*/
mutt_to_base64 ((unsigned char*) ibuf, (unsigned char*) obuf, strlen (obuf),
sizeof (ibuf) - 2);
safe_strcat (ibuf, sizeof (ibuf), "\r\n");
mutt_socket_write (idata->conn, ibuf);
do
rc = imap_cmd_step (idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc != IMAP_CMD_OK)
{
dprint (1, (debugfile, "Error receiving server response.\n"));
goto bail;
}
if (imap_code (idata->buf))
return IMAP_AUTH_SUCCESS;
bail:
mutt_error _("CRAM-MD5 authentication failed.");
mutt_sleep (2);
return IMAP_AUTH_FAILURE;
} | 435 | True | 1 |
CVE-2018-14359 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'name': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'name': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They have a buffer overflow via base64 data.'}] | 2020-05-19T17:13Z | 2018-07-17T17:29Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Kevin McCarthy | 2018-07-13 14:25:28-07:00 | Check outbuf length in mutt_from_base64()
The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c.
Thanks to Jeriko One for the bug report. | 3d9028fec8f4d08db2251096307c0bbbebce669a | False | visit repo url | visit repo url | visit repo url | visit repo url | visit repo url | muttmua | visit repo url | visit repo url | imap_auth_gss | imap_auth_gss( IMAP_DATA * idata , const char * method) | ['idata', 'method'] | imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method)
{
gss_buffer_desc request_buf, send_token;
gss_buffer_t sec_token;
gss_name_t target_name;
gss_ctx_id_t context;
#ifdef DEBUG
gss_OID mech_name;
char server_conf_flags;
#endif
gss_qop_t quality;
int cflags;
OM_uint32 maj_stat, min_stat;
char buf1[GSS_BUFSIZE], buf2[GSS_BUFSIZE];
unsigned long buf_size;
int rc;
if (!mutt_bit_isset (idata->capabilities, AGSSAPI))
return IMAP_AUTH_UNAVAIL;
if (mutt_account_getuser (&idata->conn->account))
return IMAP_AUTH_FAILURE;
/* get an IMAP service ticket for the server */
snprintf (buf1, sizeof (buf1), "imap@%s", idata->conn->account.host);
request_buf.value = buf1;
request_buf.length = strlen (buf1);
maj_stat = gss_import_name (&min_stat, &request_buf, gss_nt_service_name,
&target_name);
if (maj_stat != GSS_S_COMPLETE)
{
dprint (2, (debugfile, "Couldn't get service name for [%s]\n", buf1));
return IMAP_AUTH_UNAVAIL;
}
#ifdef DEBUG
else if (debuglevel >= 2)
{
maj_stat = gss_display_name (&min_stat, target_name, &request_buf,
&mech_name);
dprint (2, (debugfile, "Using service name [%s]\n",
(char*) request_buf.value));
maj_stat = gss_release_buffer (&min_stat, &request_buf);
}
#endif
/* Acquire initial credentials - without a TGT GSSAPI is UNAVAIL */
sec_token = GSS_C_NO_BUFFER;
context = GSS_C_NO_CONTEXT;
/* build token */
maj_stat = gss_init_sec_context (&min_stat, GSS_C_NO_CREDENTIAL, &context,
target_name, GSS_C_NO_OID, GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG, 0,
GSS_C_NO_CHANNEL_BINDINGS, sec_token, NULL, &send_token,
(unsigned int*) &cflags, NULL);
if (maj_stat != GSS_S_COMPLETE && maj_stat != GSS_S_CONTINUE_NEEDED)
{
print_gss_error(maj_stat, min_stat);
dprint (1, (debugfile, "Error acquiring credentials - no TGT?\n"));
gss_release_name (&min_stat, &target_name);
return IMAP_AUTH_UNAVAIL;
}
/* now begin login */
mutt_message _("Authenticating (GSSAPI)...");
imap_cmd_start (idata, "AUTHENTICATE GSSAPI");
/* expect a null continuation response ("+") */
do
rc = imap_cmd_step (idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc != IMAP_CMD_RESPOND)
{
dprint (2, (debugfile, "Invalid response from server: %s\n", buf1));
gss_release_name (&min_stat, &target_name);
goto bail;
}
/* now start the security context initialisation loop... */
dprint (2, (debugfile, "Sending credentials\n"));
mutt_to_base64 ((unsigned char*) buf1, send_token.value, send_token.length,
sizeof (buf1) - 2);
gss_release_buffer (&min_stat, &send_token);
safe_strcat (buf1, sizeof (buf1), "\r\n");
mutt_socket_write (idata->conn, buf1);
while (maj_stat == GSS_S_CONTINUE_NEEDED)
{
/* Read server data */
do
rc = imap_cmd_step (idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc != IMAP_CMD_RESPOND)
{
dprint (1, (debugfile, "Error receiving server response.\n"));
gss_release_name (&min_stat, &target_name);
goto bail;
}
request_buf.length = mutt_from_base64 (buf2, idata->buf + 2);
request_buf.value = buf2;
sec_token = &request_buf;
/* Write client data */
maj_stat = gss_init_sec_context (&min_stat, GSS_C_NO_CREDENTIAL, &context,
target_name, GSS_C_NO_OID, GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG, 0,
GSS_C_NO_CHANNEL_BINDINGS, sec_token, NULL, &send_token,
(unsigned int*) &cflags, NULL);
if (maj_stat != GSS_S_COMPLETE && maj_stat != GSS_S_CONTINUE_NEEDED)
{
print_gss_error(maj_stat, min_stat);
dprint (1, (debugfile, "Error exchanging credentials\n"));
gss_release_name (&min_stat, &target_name);
goto err_abort_cmd;
}
mutt_to_base64 ((unsigned char*) buf1, send_token.value,
send_token.length, sizeof (buf1) - 2);
gss_release_buffer (&min_stat, &send_token);
safe_strcat (buf1, sizeof (buf1), "\r\n");
mutt_socket_write (idata->conn, buf1);
}
gss_release_name (&min_stat, &target_name);
/* get security flags and buffer size */
do
rc = imap_cmd_step (idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc != IMAP_CMD_RESPOND)
{
dprint (1, (debugfile, "Error receiving server response.\n"));
goto bail;
}
request_buf.length = mutt_from_base64 (buf2, idata->buf + 2);
request_buf.value = buf2;
maj_stat = gss_unwrap (&min_stat, context, &request_buf, &send_token,
&cflags, &quality);
if (maj_stat != GSS_S_COMPLETE)
{
print_gss_error(maj_stat, min_stat);
dprint (2, (debugfile, "Couldn't unwrap security level data\n"));
gss_release_buffer (&min_stat, &send_token);
goto err_abort_cmd;
}
dprint (2, (debugfile, "Credential exchange complete\n"));
/* first octet is security levels supported. We want NONE */
#ifdef DEBUG
server_conf_flags = ((char*) send_token.value)[0];
#endif
if ( !(((char*) send_token.value)[0] & GSS_AUTH_P_NONE) )
{
dprint (2, (debugfile, "Server requires integrity or privacy\n"));
gss_release_buffer (&min_stat, &send_token);
goto err_abort_cmd;
}
/* we don't care about buffer size if we don't wrap content. But here it is */
((char*) send_token.value)[0] = 0;
buf_size = ntohl (*((long *) send_token.value));
gss_release_buffer (&min_stat, &send_token);
dprint (2, (debugfile, "Unwrapped security level flags: %c%c%c\n",
server_conf_flags & GSS_AUTH_P_NONE ? 'N' : '-',
server_conf_flags & GSS_AUTH_P_INTEGRITY ? 'I' : '-',
server_conf_flags & GSS_AUTH_P_PRIVACY ? 'P' : '-'));
dprint (2, (debugfile, "Maximum GSS token size is %ld\n", buf_size));
/* agree to terms (hack!) */
buf_size = htonl (buf_size); /* not relevant without integrity/privacy */
memcpy (buf1, &buf_size, 4);
buf1[0] = GSS_AUTH_P_NONE;
/* server decides if principal can log in as user */
strncpy (buf1 + 4, idata->conn->account.user, sizeof (buf1) - 4);
request_buf.value = buf1;
request_buf.length = 4 + strlen (idata->conn->account.user);
maj_stat = gss_wrap (&min_stat, context, 0, GSS_C_QOP_DEFAULT, &request_buf,
&cflags, &send_token);
if (maj_stat != GSS_S_COMPLETE)
{
dprint (2, (debugfile, "Error creating login request\n"));
goto err_abort_cmd;
}
mutt_to_base64 ((unsigned char*) buf1, send_token.value, send_token.length,
sizeof (buf1) - 2);
dprint (2, (debugfile, "Requesting authorisation as %s\n",
idata->conn->account.user));
safe_strcat (buf1, sizeof (buf1), "\r\n");
mutt_socket_write (idata->conn, buf1);
/* Joy of victory or agony of defeat? */
do
rc = imap_cmd_step (idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc == IMAP_CMD_RESPOND)
{
dprint (1, (debugfile, "Unexpected server continuation request.\n"));
goto err_abort_cmd;
}
if (imap_code (idata->buf))
{
/* flush the security context */
dprint (2, (debugfile, "Releasing GSS credentials\n"));
maj_stat = gss_delete_sec_context (&min_stat, &context, &send_token);
if (maj_stat != GSS_S_COMPLETE)
dprint (1, (debugfile, "Error releasing credentials\n"));
/* send_token may contain a notification to the server to flush
* credentials. RFC 1731 doesn't specify what to do, and since this
* support is only for authentication, we'll assume the server knows
* enough to flush its own credentials */
gss_release_buffer (&min_stat, &send_token);
return IMAP_AUTH_SUCCESS;
}
else
goto bail;
err_abort_cmd:
mutt_socket_write (idata->conn, "*\r\n");
do
rc = imap_cmd_step (idata);
while (rc == IMAP_CMD_CONTINUE);
bail:
mutt_error _("GSSAPI authentication failed.");
mutt_sleep (2);
return IMAP_AUTH_FAILURE;
} | 1273 | True | 1 |
CVE-2020-14954 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:P/A:N | NETWORK | MEDIUM | NONE | NONE | PARTIAL | NONE | 4.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N | NETWORK | HIGH | NONE | NONE | UNCHANGED | NONE | HIGH | NONE | 5.9 | MEDIUM | 2.2 | 3.6 | False | [{'url': 'http://lists.mutt.org/pipermail/mutt-announce/Week-of-Mon-20200615/000023.html', 'name': 'http://lists.mutt.org/pipermail/mutt-announce/Week-of-Mon-20200615/000023.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'http://www.mutt.org/', 'name': 'http://www.mutt.org/', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/fb013ec666759cb8a9e294347c7b4c1f597639cc', 'name': 'https://github.com/neomutt/neomutt/commit/fb013ec666759cb8a9e294347c7b4c1f597639cc', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/-/commit/c547433cdf2e79191b15c6932c57f1472bfb5ff4', 'name': 'https://gitlab.com/muttmua/mutt/-/commit/c547433cdf2e79191b15c6932c57f1472bfb5ff4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/releases/tag/20200619', 'name': 'https://github.com/neomutt/neomutt/releases/tag/20200619', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/-/issues/248', 'name': 'https://gitlab.com/muttmua/mutt/-/issues/248', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://www.debian.org/security/2020/dsa-4708', 'name': 'DSA-4708', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://www.debian.org/security/2020/dsa-4707', 'name': 'DSA-4707', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2020-06/msg00064.html', 'name': 'openSUSE-SU-2020:0903', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2020-06/msg00070.html', 'name': 'openSUSE-SU-2020:0915', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/06/msg00040.html', 'name': '[debian-lts-announce] 20200630 [SECURITY] [DLA 2268-2] mutt regression update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/06/msg00039.html', 'name': '[debian-lts-announce] 20200630 [SECURITY] [DLA 2268-1] mutt security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://usn.ubuntu.com/4403-1/', 'name': 'USN-4403-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/K3LXFVPTLK4PNHL6MPKJNJQJ25CH7GLQ/', 'name': 'FEDORA-2020-1cb4c3697b', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://lists.fedoraproject.org/archives/list/[email protected]/message/EFMEILCBKMZRRZDMUGWLVN4PQQ4VTAZE/', 'name': 'FEDORA-2020-31af2ac7fd', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://security.gentoo.org/glsa/202007-57', 'name': 'GLSA-202007-57', 'refsource': 'GENTOO', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-74'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.14.4', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20200619', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Mutt before 1.14.4 and NeoMutt before 2020-06-19 have a STARTTLS buffering issue that affects IMAP, SMTP, and POP3. When a server sends a "begin TLS" response, the client reads additional data (e.g., from a man-in-the-middle attacker) and evaluates it in a TLS context, aka "response injection."'}] | 2020-08-18T15:05Z | 2020-06-21T17:15Z | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. | Software has certain assumptions about what constitutes data and control respectively. It is the lack of verification of these assumptions for user-controlled input that leads to injection problems. Injection problems encompass a wide variety of issues -- all mitigated in very different ways and usually attempted in order to alter the control flow of the process. For this reason, the most effective way to discuss these weaknesses is to note the distinct features which classify them as injection weaknesses. The most important issue to note is that all injection problems share one thing in common -- i.e., they allow for the injection of control plane data into the user-controlled data plane. This means that the execution of the process may be altered by sending code in through legitimate data channels, using no other mechanism. While buffer overflows, and many other flaws, involve the use of some further issue to gain execution, injection problems need only for the data to be parsed. The most classic instantiations of this category of weakness are SQL injection and format string vulnerabilities.
| https://cwe.mitre.org/data/definitions/74.html | 0 | Richard Russon | 2020-06-18 12:11:27+01:00 | tls: clear data after a starttls acknowledgement
After a starttls acknowledgement message, clear the buffers of any
incoming data / commands. This will ensure that all future data is
handled securely.
Co-authored-by: Pietro Cerutti <[email protected]> | fb013ec666759cb8a9e294347c7b4c1f597639cc | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | imap_open_connection | imap_open_connection( struct ImapAccountData * adata) | ['adata'] | int imap_open_connection(struct ImapAccountData *adata)
{
if (mutt_socket_open(adata->conn) < 0)
return -1;
adata->state = IMAP_CONNECTED;
if (imap_cmd_step(adata) != IMAP_RES_OK)
{
imap_close_connection(adata);
return -1;
}
if (mutt_str_startswith(adata->buf, "* OK", CASE_IGNORE))
{
if (!mutt_str_startswith(adata->buf, "* OK [CAPABILITY", CASE_IGNORE) &&
check_capabilities(adata))
{
goto bail;
}
#ifdef USE_SSL
/* Attempt STARTTLS if available and desired. */
if (!adata->conn->ssf && (C_SslForceTls || (adata->capabilities & IMAP_CAP_STARTTLS)))
{
enum QuadOption ans;
if (C_SslForceTls)
ans = MUTT_YES;
else if ((ans = query_quadoption(C_SslStarttls,
_("Secure connection with TLS?"))) == MUTT_ABORT)
{
goto err_close_conn;
}
if (ans == MUTT_YES)
{
enum ImapExecResult rc = imap_exec(adata, "STARTTLS", IMAP_CMD_NO_FLAGS);
if (rc == IMAP_EXEC_FATAL)
goto bail;
if (rc != IMAP_EXEC_ERROR)
{
if (mutt_ssl_starttls(adata->conn))
{
mutt_error(_("Could not negotiate TLS connection"));
goto err_close_conn;
}
else
{
/* RFC2595 demands we recheck CAPABILITY after TLS completes. */
if (imap_exec(adata, "CAPABILITY", IMAP_CMD_NO_FLAGS))
goto bail;
}
}
}
}
if (C_SslForceTls && !adata->conn->ssf)
{
mutt_error(_("Encrypted connection unavailable"));
goto err_close_conn;
}
#endif
}
else if (mutt_str_startswith(adata->buf, "* PREAUTH", CASE_IGNORE))
{
#ifdef USE_SSL
/* An unencrypted PREAUTH response is most likely a MITM attack.
* Require a confirmation. */
if (adata->conn->ssf == 0)
{
bool proceed = true;
if (C_SslForceTls)
{
proceed = false;
}
else if (C_SslStarttls != MUTT_NO)
{
proceed = mutt_yesorno(_("Abort unencrypted PREAUTH connection?"),
C_SslStarttls) != MUTT_NO;
}
if (!proceed)
{
mutt_error(_("Encrypted connection unavailable"));
goto err_close_conn;
}
}
#endif
adata->state = IMAP_AUTHENTICATED;
if (check_capabilities(adata) != 0)
goto bail;
FREE(&adata->capstr);
}
else
{
imap_error("imap_open_connection()", adata->buf);
goto bail;
}
return 0;
#ifdef USE_SSL
err_close_conn:
imap_close_connection(adata);
#endif
bail:
FREE(&adata->capstr);
return -1;
} | 398 | True | 1 |
CVE-2020-28896 | False | False | False | True | AV:N/AC:H/Au:N/C:P/I:N/A:N | NETWORK | HIGH | NONE | PARTIAL | NONE | NONE | 2.6 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N | NETWORK | HIGH | NONE | REQUIRED | UNCHANGED | HIGH | NONE | NONE | 5.3 | MEDIUM | 1.6 | 3.6 | False | [{'url': 'https://github.com/neomutt/neomutt/commit/9c36717a3e2af1f2c1b7242035455ec8112b4b06', 'name': 'https://github.com/neomutt/neomutt/commit/9c36717a3e2af1f2c1b7242035455ec8112b4b06', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/-/commit/d92689088dfe80a290ec836e292376e2d9984f8f', 'name': 'https://gitlab.com/muttmua/mutt/-/commit/d92689088dfe80a290ec836e292376e2d9984f8f', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/releases/tag/20201120', 'name': 'https://github.com/neomutt/neomutt/releases/tag/20201120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/-/commit/04b06aaa3e0cc0022b9b01dbca2863756ebbf59a', 'name': 'https://gitlab.com/muttmua/mutt/-/commit/04b06aaa3e0cc0022b9b01dbca2863756ebbf59a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/11/msg00048.html', 'name': '[debian-lts-announce] 20201130 [SECURITY] [DLA 2472-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/202101-32', 'name': 'GLSA-202101-32', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-287'}, {'lang': 'en', 'value': 'CWE-755'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2020-11-20', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.0.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "Mutt before 2.0.2 and NeoMutt before 2020-11-20 did not ensure that $ssl_force_tls was processed if an IMAP server's initial server response was invalid. The connection was not properly closed, and the code could continue attempting to authenticate. This could result in authentication credentials being exposed on an unencrypted connection, or to a machine-in-the-middle."}] | 2021-07-21T11:39Z | 2020-11-23T19:15Z | Improper Authentication | When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct. | https://cwe.mitre.org/data/definitions/287.html | 0 | Richard Russon | 2020-11-17 12:29:12+00:00 | imap: close connection on all failures
Thanks to Gabriel Salles-Loustau for spotting the problem.
Co-authored-by: Kevin McCarthy <[email protected]> | 9c36717a3e2af1f2c1b7242035455ec8112b4b06 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | imap_open_connection | imap_open_connection( struct ImapAccountData * adata) | ['adata'] | int imap_open_connection(struct ImapAccountData *adata)
{
if (mutt_socket_open(adata->conn) < 0)
return -1;
adata->state = IMAP_CONNECTED;
if (imap_cmd_step(adata) != IMAP_RES_OK)
{
imap_close_connection(adata);
return -1;
}
if (mutt_istr_startswith(adata->buf, "* OK"))
{
if (!mutt_istr_startswith(adata->buf, "* OK [CAPABILITY") && check_capabilities(adata))
{
goto bail;
}
#ifdef USE_SSL
/* Attempt STARTTLS if available and desired. */
if ((adata->conn->ssf == 0) && (C_SslForceTls || (adata->capabilities & IMAP_CAP_STARTTLS)))
{
enum QuadOption ans;
if (C_SslForceTls)
ans = MUTT_YES;
else if ((ans = query_quadoption(C_SslStarttls,
_("Secure connection with TLS?"))) == MUTT_ABORT)
{
goto err_close_conn;
}
if (ans == MUTT_YES)
{
enum ImapExecResult rc = imap_exec(adata, "STARTTLS", IMAP_CMD_SINGLE);
// Clear any data after the STARTTLS acknowledgement
mutt_socket_empty(adata->conn);
if (rc == IMAP_EXEC_FATAL)
goto bail;
if (rc != IMAP_EXEC_ERROR)
{
if (mutt_ssl_starttls(adata->conn))
{
mutt_error(_("Could not negotiate TLS connection"));
goto err_close_conn;
}
else
{
/* RFC2595 demands we recheck CAPABILITY after TLS completes. */
if (imap_exec(adata, "CAPABILITY", IMAP_CMD_NO_FLAGS))
goto bail;
}
}
}
}
if (C_SslForceTls && (adata->conn->ssf == 0))
{
mutt_error(_("Encrypted connection unavailable"));
goto err_close_conn;
}
#endif
}
else if (mutt_istr_startswith(adata->buf, "* PREAUTH"))
{
#ifdef USE_SSL
/* Unless using a secure $tunnel, an unencrypted PREAUTH response may be a
* MITM attack. The only way to stop "STARTTLS" MITM attacks is via
* $ssl_force_tls: an attacker can easily spoof "* OK" and strip the
* STARTTLS capability. So consult $ssl_force_tls, not $ssl_starttls, to
* decide whether to abort. Note that if using $tunnel and
* $tunnel_is_secure, adata->conn->ssf will be set to 1. */
if ((adata->conn->ssf == 0) && C_SslForceTls)
{
mutt_error(_("Encrypted connection unavailable"));
goto err_close_conn;
}
#endif
adata->state = IMAP_AUTHENTICATED;
if (check_capabilities(adata) != 0)
goto bail;
FREE(&adata->capstr);
}
else
{
imap_error("imap_open_connection()", adata->buf);
goto bail;
}
return 0;
#ifdef USE_SSL
err_close_conn:
imap_close_connection(adata);
#endif
bail:
FREE(&adata->capstr);
return -1;
} | 364 | True | 1 |
|
CVE-2020-28896 | False | False | False | True | AV:N/AC:H/Au:N/C:P/I:N/A:N | NETWORK | HIGH | NONE | PARTIAL | NONE | NONE | 2.6 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N | NETWORK | HIGH | NONE | REQUIRED | UNCHANGED | HIGH | NONE | NONE | 5.3 | MEDIUM | 1.6 | 3.6 | False | [{'url': 'https://github.com/neomutt/neomutt/commit/9c36717a3e2af1f2c1b7242035455ec8112b4b06', 'name': 'https://github.com/neomutt/neomutt/commit/9c36717a3e2af1f2c1b7242035455ec8112b4b06', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/-/commit/d92689088dfe80a290ec836e292376e2d9984f8f', 'name': 'https://gitlab.com/muttmua/mutt/-/commit/d92689088dfe80a290ec836e292376e2d9984f8f', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/releases/tag/20201120', 'name': 'https://github.com/neomutt/neomutt/releases/tag/20201120', 'refsource': 'MISC', 'tags': ['Release Notes', 'Third Party Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/-/commit/04b06aaa3e0cc0022b9b01dbca2863756ebbf59a', 'name': 'https://gitlab.com/muttmua/mutt/-/commit/04b06aaa3e0cc0022b9b01dbca2863756ebbf59a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/11/msg00048.html', 'name': '[debian-lts-announce] 20201130 [SECURITY] [DLA 2472-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/202101-32', 'name': 'GLSA-202101-32', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-287'}, {'lang': 'en', 'value': 'CWE-755'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2020-11-20', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.0.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "Mutt before 2.0.2 and NeoMutt before 2020-11-20 did not ensure that $ssl_force_tls was processed if an IMAP server's initial server response was invalid. The connection was not properly closed, and the code could continue attempting to authenticate. This could result in authentication credentials being exposed on an unencrypted connection, or to a machine-in-the-middle."}] | 2021-07-21T11:39Z | 2020-11-23T19:15Z | Improper Handling of Exceptional Conditions | The software does not handle or incorrectly handles an exceptional condition. | https://cwe.mitre.org/data/definitions/755.html | 0 | Richard Russon | 2020-11-17 12:29:12+00:00 | imap: close connection on all failures
Thanks to Gabriel Salles-Loustau for spotting the problem.
Co-authored-by: Kevin McCarthy <[email protected]> | 9c36717a3e2af1f2c1b7242035455ec8112b4b06 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | imap_open_connection | imap_open_connection( struct ImapAccountData * adata) | ['adata'] | int imap_open_connection(struct ImapAccountData *adata)
{
if (mutt_socket_open(adata->conn) < 0)
return -1;
adata->state = IMAP_CONNECTED;
if (imap_cmd_step(adata) != IMAP_RES_OK)
{
imap_close_connection(adata);
return -1;
}
if (mutt_istr_startswith(adata->buf, "* OK"))
{
if (!mutt_istr_startswith(adata->buf, "* OK [CAPABILITY") && check_capabilities(adata))
{
goto bail;
}
#ifdef USE_SSL
/* Attempt STARTTLS if available and desired. */
if ((adata->conn->ssf == 0) && (C_SslForceTls || (adata->capabilities & IMAP_CAP_STARTTLS)))
{
enum QuadOption ans;
if (C_SslForceTls)
ans = MUTT_YES;
else if ((ans = query_quadoption(C_SslStarttls,
_("Secure connection with TLS?"))) == MUTT_ABORT)
{
goto err_close_conn;
}
if (ans == MUTT_YES)
{
enum ImapExecResult rc = imap_exec(adata, "STARTTLS", IMAP_CMD_SINGLE);
// Clear any data after the STARTTLS acknowledgement
mutt_socket_empty(adata->conn);
if (rc == IMAP_EXEC_FATAL)
goto bail;
if (rc != IMAP_EXEC_ERROR)
{
if (mutt_ssl_starttls(adata->conn))
{
mutt_error(_("Could not negotiate TLS connection"));
goto err_close_conn;
}
else
{
/* RFC2595 demands we recheck CAPABILITY after TLS completes. */
if (imap_exec(adata, "CAPABILITY", IMAP_CMD_NO_FLAGS))
goto bail;
}
}
}
}
if (C_SslForceTls && (adata->conn->ssf == 0))
{
mutt_error(_("Encrypted connection unavailable"));
goto err_close_conn;
}
#endif
}
else if (mutt_istr_startswith(adata->buf, "* PREAUTH"))
{
#ifdef USE_SSL
/* Unless using a secure $tunnel, an unencrypted PREAUTH response may be a
* MITM attack. The only way to stop "STARTTLS" MITM attacks is via
* $ssl_force_tls: an attacker can easily spoof "* OK" and strip the
* STARTTLS capability. So consult $ssl_force_tls, not $ssl_starttls, to
* decide whether to abort. Note that if using $tunnel and
* $tunnel_is_secure, adata->conn->ssf will be set to 1. */
if ((adata->conn->ssf == 0) && C_SslForceTls)
{
mutt_error(_("Encrypted connection unavailable"));
goto err_close_conn;
}
#endif
adata->state = IMAP_AUTHENTICATED;
if (check_capabilities(adata) != 0)
goto bail;
FREE(&adata->capstr);
}
else
{
imap_error("imap_open_connection()", adata->buf);
goto bail;
}
return 0;
#ifdef USE_SSL
err_close_conn:
imap_close_connection(adata);
#endif
bail:
FREE(&adata->capstr);
return -1;
} | 364 | True | 1 |
|
CVE-2021-32055 | False | False | False | False | AV:N/AC:M/Au:N/C:P/I:N/A:P | NETWORK | MEDIUM | NONE | PARTIAL | NONE | PARTIAL | 5.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | NONE | HIGH | 9.1 | CRITICAL | 3.9 | 5.2 | False | [{'url': 'https://gitlab.com/muttmua/mutt/-/commit/7c4779ac24d2fb68a2a47b58c7904118f40965d5', 'name': 'https://gitlab.com/muttmua/mutt/-/commit/7c4779ac24d2fb68a2a47b58c7904118f40965d5', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://lists.mutt.org/pipermail/mutt-announce/Week-of-Mon-20210503/000036.html', 'name': 'http://lists.mutt.org/pipermail/mutt-announce/Week-of-Mon-20210503/000036.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/fa1db5785e5cfd9d3cd27b7571b9fe268d2ec2dc', 'name': 'https://github.com/neomutt/neomutt/commit/fa1db5785e5cfd9d3cd27b7571b9fe268d2ec2dc', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/202105-05', 'name': 'GLSA-202105-05', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionStartIncluding': '20191025', 'versionEndIncluding': '20210504', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionStartIncluding': '1.11.0', 'versionEndExcluding': '2.0.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Mutt 1.11.0 through 2.0.x before 2.0.7 (and NeoMutt 2019-10-25 through 2021-05-04) has a $imap_qresync issue in which imap/util.c has an out-of-bounds read in situations where an IMAP sequence set ends with a comma. NOTE: the $imap_qresync setting for QRESYNC is not enabled by default.'}] | 2021-06-01T14:52Z | 2021-05-05T16:15Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Kevin McCarthy | 2021-05-03 13:11:30-07:00 | Fix seqset iterator when it ends in a comma
If the seqset ended with a comma, the substr_end marker would be just
before the trailing nul. In the next call, the loop to skip the
marker would iterate right past the end of string too.
The fix is simple: place the substr_end marker and skip past it
immediately. | fa1db5785e5cfd9d3cd27b7571b9fe268d2ec2dc | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | mutt_seqset_iterator_next | mutt_seqset_iterator_next( struct SeqsetIterator * iter , unsigned int * next) | ['iter', 'next'] | int mutt_seqset_iterator_next(struct SeqsetIterator *iter, unsigned int *next)
{
if (!iter || !next)
return -1;
if (iter->in_range)
{
if ((iter->down && (iter->range_cur == (iter->range_end - 1))) ||
(!iter->down && (iter->range_cur == (iter->range_end + 1))))
{
iter->in_range = 0;
}
}
if (!iter->in_range)
{
iter->substr_cur = iter->substr_end;
if (iter->substr_cur == iter->eostr)
return 1;
while (!*(iter->substr_cur))
iter->substr_cur++;
iter->substr_end = strchr(iter->substr_cur, ',');
if (!iter->substr_end)
iter->substr_end = iter->eostr;
else
*(iter->substr_end) = '\0';
char *range_sep = strchr(iter->substr_cur, ':');
if (range_sep)
*range_sep++ = '\0';
if (mutt_str_atoui(iter->substr_cur, &iter->range_cur) != 0)
return -1;
if (range_sep)
{
if (mutt_str_atoui(range_sep, &iter->range_end) != 0)
return -1;
}
else
iter->range_end = iter->range_cur;
iter->down = (iter->range_end < iter->range_cur);
iter->in_range = 1;
}
*next = iter->range_cur;
if (iter->down)
iter->range_cur--;
else
iter->range_cur++;
return 0;
} | 291 | True | 1 |
CVE-2018-14360 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/6296f7153f0c9d5e5cd3aaf08f9731e56621bdd3', 'name': 'https://github.com/neomutt/neomutt/commit/6296f7153f0c9d5e5cd3aaf08f9731e56621bdd3', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in NeoMutt before 2018-07-16. nntp_add_group in newsrc.c has a stack-based buffer overflow because of incorrect sscanf usage.'}] | 2020-05-19T17:17Z | 2018-07-17T17:29Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | JerikoOne | 2018-07-03 17:08:41-05:00 | Set length modifiers for group and desc
nntp_add_group parses a line controlled by the connected nntp server.
Restrict the maximum lengths read into the stack buffers group, and
desc. | 6296f7153f0c9d5e5cd3aaf08f9731e56621bdd3 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | nntp_add_group | nntp_add_group( char * line , void * data) | ['line', 'data'] | int nntp_add_group(char *line, void *data)
{
struct NntpServer *nserv = data;
struct NntpData *nntp_data = NULL;
char group[LONG_STRING];
char desc[HUGE_STRING] = "";
char mod;
anum_t first, last;
if (!nserv || !line)
return 0;
if (sscanf(line, "%s " ANUM " " ANUM " %c %[^\n]", group, &last, &first, &mod, desc) < 4)
return 0;
nntp_data = nntp_data_find(nserv, group);
nntp_data->deleted = false;
nntp_data->first_message = first;
nntp_data->last_message = last;
nntp_data->allowed = (mod == 'y') || (mod == 'm');
mutt_str_replace(&nntp_data->desc, desc);
if (nntp_data->newsrc_ent || nntp_data->last_cached)
nntp_group_unread_stat(nntp_data);
else if (nntp_data->last_message && nntp_data->first_message <= nntp_data->last_message)
nntp_data->unread = nntp_data->last_message - nntp_data->first_message + 1;
else
nntp_data->unread = 0;
return 0;
} | 197 | True | 1 |
CVE-2018-14362 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'name': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'Patch']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. pop.c does not forbid characters that may have unsafe interaction with message-cache pathnames, as demonstrated by a '/' character."}] | 2020-05-19T17:19Z | 2018-07-17T17:29Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Richard Russon | 2018-07-05 13:32:17+01:00 | sanitise cache paths
Co-authored-by: JerikoOne <[email protected]> | 9bfab35522301794483f8f9ed60820bdec9be59e | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | nntp_hcache_namer | nntp_hcache_namer( const char * path , char * dest , size_t destlen) | ['path', 'dest', 'destlen'] | static int nntp_hcache_namer(const char *path, char *dest, size_t destlen)
{
return snprintf(dest, destlen, "%s.hcache", path);
} | 28 | True | 1 |
CVE-2018-14363 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:P/A:N | NETWORK | LOW | NONE | NONE | PARTIAL | NONE | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | HIGH | NONE | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in NeoMutt before 2018-07-16. newsrc.c does not properly restrict '/' characters that may have unsafe interaction with cache pathnames."}] | 2020-05-21T01:16Z | 2018-07-17T17:29Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | Richard Russon | 2018-07-05 13:32:17+01:00 | sanitise cache paths
Co-authored-by: JerikoOne <[email protected]> | 9bfab35522301794483f8f9ed60820bdec9be59e | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | nntp_hcache_namer | nntp_hcache_namer( const char * path , char * dest , size_t destlen) | ['path', 'dest', 'destlen'] | static int nntp_hcache_namer(const char *path, char *dest, size_t destlen)
{
return snprintf(dest, destlen, "%s.hcache", path);
} | 28 | True | 1 |
CVE-2018-14362 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'name': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'Patch']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. pop.c does not forbid characters that may have unsafe interaction with message-cache pathnames, as demonstrated by a '/' character."}] | 2020-05-19T17:19Z | 2018-07-17T17:29Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Richard Russon | 2018-07-05 13:32:17+01:00 | sanitise cache paths
Co-authored-by: JerikoOne <[email protected]> | 9bfab35522301794483f8f9ed60820bdec9be59e | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | msg_cache_check | msg_cache_check( const char * id , struct BodyCache * bcache , void * data) | ['id', 'bcache', 'data'] | static int msg_cache_check(const char *id, struct BodyCache *bcache, void *data)
{
struct Context *ctx = (struct Context *) data;
if (!ctx)
return -1;
struct PopData *pop_data = (struct PopData *) ctx->data;
if (!pop_data)
return -1;
#ifdef USE_HCACHE
/* keep hcache file if hcache == bcache */
if (strcmp(HC_FNAME "." HC_FEXT, id) == 0)
return 0;
#endif
for (int i = 0; i < ctx->msgcount; i++)
{
/* if the id we get is known for a header: done (i.e. keep in cache) */
if (ctx->hdrs[i]->data && (mutt_str_strcmp(ctx->hdrs[i]->data, id) == 0))
return 0;
}
/* message not found in context -> remove it from cache
* return the result of bcache, so we stop upon its first error
*/
return mutt_bcache_del(bcache, id);
} | 136 | True | 1 |
CVE-2018-14363 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:P/A:N | NETWORK | LOW | NONE | NONE | PARTIAL | NONE | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | HIGH | NONE | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in NeoMutt before 2018-07-16. newsrc.c does not properly restrict '/' characters that may have unsafe interaction with cache pathnames."}] | 2020-05-21T01:16Z | 2018-07-17T17:29Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | Richard Russon | 2018-07-05 13:32:17+01:00 | sanitise cache paths
Co-authored-by: JerikoOne <[email protected]> | 9bfab35522301794483f8f9ed60820bdec9be59e | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | msg_cache_check | msg_cache_check( const char * id , struct BodyCache * bcache , void * data) | ['id', 'bcache', 'data'] | static int msg_cache_check(const char *id, struct BodyCache *bcache, void *data)
{
struct Context *ctx = (struct Context *) data;
if (!ctx)
return -1;
struct PopData *pop_data = (struct PopData *) ctx->data;
if (!pop_data)
return -1;
#ifdef USE_HCACHE
/* keep hcache file if hcache == bcache */
if (strcmp(HC_FNAME "." HC_FEXT, id) == 0)
return 0;
#endif
for (int i = 0; i < ctx->msgcount; i++)
{
/* if the id we get is known for a header: done (i.e. keep in cache) */
if (ctx->hdrs[i]->data && (mutt_str_strcmp(ctx->hdrs[i]->data, id) == 0))
return 0;
}
/* message not found in context -> remove it from cache
* return the result of bcache, so we stop upon its first error
*/
return mutt_bcache_del(bcache, id);
} | 136 | True | 1 |
CVE-2018-14362 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'name': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'Patch']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. pop.c does not forbid characters that may have unsafe interaction with message-cache pathnames, as demonstrated by a '/' character."}] | 2020-05-19T17:19Z | 2018-07-17T17:29Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Richard Russon | 2018-07-05 13:32:17+01:00 | sanitise cache paths
Co-authored-by: JerikoOne <[email protected]> | 9bfab35522301794483f8f9ed60820bdec9be59e | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | pop_fetch_headers | pop_fetch_headers( struct Context * ctx) | ['ctx'] | static int pop_fetch_headers(struct Context *ctx)
{
struct PopData *pop_data = (struct PopData *) ctx->data;
struct Progress progress;
#ifdef USE_HCACHE
header_cache_t *hc = pop_hcache_open(pop_data, ctx->path);
#endif
time(&pop_data->check_time);
pop_data->clear_cache = false;
for (int i = 0; i < ctx->msgcount; i++)
ctx->hdrs[i]->refno = -1;
const int old_count = ctx->msgcount;
int ret = pop_fetch_data(pop_data, "UIDL\r\n", NULL, fetch_uidl, ctx);
const int new_count = ctx->msgcount;
ctx->msgcount = old_count;
if (pop_data->cmd_uidl == 2)
{
if (ret == 0)
{
pop_data->cmd_uidl = 1;
mutt_debug(1, "set UIDL capability\n");
}
if (ret == -2 && pop_data->cmd_uidl == 2)
{
pop_data->cmd_uidl = 0;
mutt_debug(1, "unset UIDL capability\n");
snprintf(pop_data->err_msg, sizeof(pop_data->err_msg), "%s",
_("Command UIDL is not supported by server."));
}
}
if (!ctx->quiet)
{
mutt_progress_init(&progress, _("Fetching message headers..."),
MUTT_PROGRESS_MSG, ReadInc, new_count - old_count);
}
if (ret == 0)
{
int i, deleted;
for (i = 0, deleted = 0; i < old_count; i++)
{
if (ctx->hdrs[i]->refno == -1)
{
ctx->hdrs[i]->deleted = true;
deleted++;
}
}
if (deleted > 0)
{
mutt_error(
ngettext("%d message has been lost. Try reopening the mailbox.",
"%d messages have been lost. Try reopening the mailbox.", deleted),
deleted);
}
bool hcached = false;
for (i = old_count; i < new_count; i++)
{
if (!ctx->quiet)
mutt_progress_update(&progress, i + 1 - old_count, -1);
#ifdef USE_HCACHE
void *data = mutt_hcache_fetch(hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data));
if (data)
{
char *uidl = mutt_str_strdup(ctx->hdrs[i]->data);
int refno = ctx->hdrs[i]->refno;
int index = ctx->hdrs[i]->index;
/*
* - POP dynamically numbers headers and relies on h->refno
* to map messages; so restore header and overwrite restored
* refno with current refno, same for index
* - h->data needs to a separate pointer as it's driver-specific
* data freed separately elsewhere
* (the old h->data should point inside a malloc'd block from
* hcache so there shouldn't be a memleak here)
*/
struct Header *h = mutt_hcache_restore((unsigned char *) data);
mutt_hcache_free(hc, &data);
mutt_header_free(&ctx->hdrs[i]);
ctx->hdrs[i] = h;
ctx->hdrs[i]->refno = refno;
ctx->hdrs[i]->index = index;
ctx->hdrs[i]->data = uidl;
ret = 0;
hcached = true;
}
else
#endif
if ((ret = pop_read_header(pop_data, ctx->hdrs[i])) < 0)
break;
#ifdef USE_HCACHE
else
{
mutt_hcache_store(hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data),
ctx->hdrs[i], 0);
}
#endif
/*
* faked support for flags works like this:
* - if 'hcached' is true, we have the message in our hcache:
* - if we also have a body: read
* - if we don't have a body: old
* (if $mark_old is set which is maybe wrong as
* $mark_old should be considered for syncing the
* folder and not when opening it XXX)
* - if 'hcached' is false, we don't have the message in our hcache:
* - if we also have a body: read
* - if we don't have a body: new
*/
const bool bcached =
(mutt_bcache_exists(pop_data->bcache, ctx->hdrs[i]->data) == 0);
ctx->hdrs[i]->old = false;
ctx->hdrs[i]->read = false;
if (hcached)
{
if (bcached)
ctx->hdrs[i]->read = true;
else if (MarkOld)
ctx->hdrs[i]->old = true;
}
else
{
if (bcached)
ctx->hdrs[i]->read = true;
}
ctx->msgcount++;
}
if (i > old_count)
mx_update_context(ctx, i - old_count);
}
#ifdef USE_HCACHE
mutt_hcache_close(hc);
#endif
if (ret < 0)
{
for (int i = ctx->msgcount; i < new_count; i++)
mutt_header_free(&ctx->hdrs[i]);
return ret;
}
/* after putting the result into our structures,
* clean up cache, i.e. wipe messages deleted outside
* the availability of our cache
*/
if (MessageCacheClean)
mutt_bcache_list(pop_data->bcache, msg_cache_check, (void *) ctx);
mutt_clear_error();
return (new_count - old_count);
} | 769 | True | 1 |
CVE-2018-14363 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:P/A:N | NETWORK | LOW | NONE | NONE | PARTIAL | NONE | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | HIGH | NONE | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in NeoMutt before 2018-07-16. newsrc.c does not properly restrict '/' characters that may have unsafe interaction with cache pathnames."}] | 2020-05-21T01:16Z | 2018-07-17T17:29Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | Richard Russon | 2018-07-05 13:32:17+01:00 | sanitise cache paths
Co-authored-by: JerikoOne <[email protected]> | 9bfab35522301794483f8f9ed60820bdec9be59e | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | pop_fetch_headers | pop_fetch_headers( struct Context * ctx) | ['ctx'] | static int pop_fetch_headers(struct Context *ctx)
{
struct PopData *pop_data = (struct PopData *) ctx->data;
struct Progress progress;
#ifdef USE_HCACHE
header_cache_t *hc = pop_hcache_open(pop_data, ctx->path);
#endif
time(&pop_data->check_time);
pop_data->clear_cache = false;
for (int i = 0; i < ctx->msgcount; i++)
ctx->hdrs[i]->refno = -1;
const int old_count = ctx->msgcount;
int ret = pop_fetch_data(pop_data, "UIDL\r\n", NULL, fetch_uidl, ctx);
const int new_count = ctx->msgcount;
ctx->msgcount = old_count;
if (pop_data->cmd_uidl == 2)
{
if (ret == 0)
{
pop_data->cmd_uidl = 1;
mutt_debug(1, "set UIDL capability\n");
}
if (ret == -2 && pop_data->cmd_uidl == 2)
{
pop_data->cmd_uidl = 0;
mutt_debug(1, "unset UIDL capability\n");
snprintf(pop_data->err_msg, sizeof(pop_data->err_msg), "%s",
_("Command UIDL is not supported by server."));
}
}
if (!ctx->quiet)
{
mutt_progress_init(&progress, _("Fetching message headers..."),
MUTT_PROGRESS_MSG, ReadInc, new_count - old_count);
}
if (ret == 0)
{
int i, deleted;
for (i = 0, deleted = 0; i < old_count; i++)
{
if (ctx->hdrs[i]->refno == -1)
{
ctx->hdrs[i]->deleted = true;
deleted++;
}
}
if (deleted > 0)
{
mutt_error(
ngettext("%d message has been lost. Try reopening the mailbox.",
"%d messages have been lost. Try reopening the mailbox.", deleted),
deleted);
}
bool hcached = false;
for (i = old_count; i < new_count; i++)
{
if (!ctx->quiet)
mutt_progress_update(&progress, i + 1 - old_count, -1);
#ifdef USE_HCACHE
void *data = mutt_hcache_fetch(hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data));
if (data)
{
char *uidl = mutt_str_strdup(ctx->hdrs[i]->data);
int refno = ctx->hdrs[i]->refno;
int index = ctx->hdrs[i]->index;
/*
* - POP dynamically numbers headers and relies on h->refno
* to map messages; so restore header and overwrite restored
* refno with current refno, same for index
* - h->data needs to a separate pointer as it's driver-specific
* data freed separately elsewhere
* (the old h->data should point inside a malloc'd block from
* hcache so there shouldn't be a memleak here)
*/
struct Header *h = mutt_hcache_restore((unsigned char *) data);
mutt_hcache_free(hc, &data);
mutt_header_free(&ctx->hdrs[i]);
ctx->hdrs[i] = h;
ctx->hdrs[i]->refno = refno;
ctx->hdrs[i]->index = index;
ctx->hdrs[i]->data = uidl;
ret = 0;
hcached = true;
}
else
#endif
if ((ret = pop_read_header(pop_data, ctx->hdrs[i])) < 0)
break;
#ifdef USE_HCACHE
else
{
mutt_hcache_store(hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data),
ctx->hdrs[i], 0);
}
#endif
/*
* faked support for flags works like this:
* - if 'hcached' is true, we have the message in our hcache:
* - if we also have a body: read
* - if we don't have a body: old
* (if $mark_old is set which is maybe wrong as
* $mark_old should be considered for syncing the
* folder and not when opening it XXX)
* - if 'hcached' is false, we don't have the message in our hcache:
* - if we also have a body: read
* - if we don't have a body: new
*/
const bool bcached =
(mutt_bcache_exists(pop_data->bcache, ctx->hdrs[i]->data) == 0);
ctx->hdrs[i]->old = false;
ctx->hdrs[i]->read = false;
if (hcached)
{
if (bcached)
ctx->hdrs[i]->read = true;
else if (MarkOld)
ctx->hdrs[i]->old = true;
}
else
{
if (bcached)
ctx->hdrs[i]->read = true;
}
ctx->msgcount++;
}
if (i > old_count)
mx_update_context(ctx, i - old_count);
}
#ifdef USE_HCACHE
mutt_hcache_close(hc);
#endif
if (ret < 0)
{
for (int i = ctx->msgcount; i < new_count; i++)
mutt_header_free(&ctx->hdrs[i]);
return ret;
}
/* after putting the result into our structures,
* clean up cache, i.e. wipe messages deleted outside
* the availability of our cache
*/
if (MessageCacheClean)
mutt_bcache_list(pop_data->bcache, msg_cache_check, (void *) ctx);
mutt_clear_error();
return (new_count - old_count);
} | 769 | True | 1 |
CVE-2018-14362 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'name': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'Patch']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. pop.c does not forbid characters that may have unsafe interaction with message-cache pathnames, as demonstrated by a '/' character."}] | 2020-05-19T17:19Z | 2018-07-17T17:29Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Richard Russon | 2018-07-05 13:32:17+01:00 | sanitise cache paths
Co-authored-by: JerikoOne <[email protected]> | 9bfab35522301794483f8f9ed60820bdec9be59e | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | pop_fetch_message | pop_fetch_message( struct Context * ctx , struct Message * msg , int msgno) | ['ctx', 'msg', 'msgno'] | static int pop_fetch_message(struct Context *ctx, struct Message *msg, int msgno)
{
void *uidl = NULL;
char buf[LONG_STRING];
char path[PATH_MAX];
struct Progress progressbar;
struct PopData *pop_data = (struct PopData *) ctx->data;
struct PopCache *cache = NULL;
struct Header *h = ctx->hdrs[msgno];
unsigned short bcache = 1;
/* see if we already have the message in body cache */
msg->fp = mutt_bcache_get(pop_data->bcache, h->data);
if (msg->fp)
return 0;
/*
* see if we already have the message in our cache in
* case $message_cachedir is unset
*/
cache = &pop_data->cache[h->index % POP_CACHE_LEN];
if (cache->path)
{
if (cache->index == h->index)
{
/* yes, so just return a pointer to the message */
msg->fp = fopen(cache->path, "r");
if (msg->fp)
return 0;
mutt_perror(cache->path);
return -1;
}
else
{
/* clear the previous entry */
unlink(cache->path);
FREE(&cache->path);
}
}
while (true)
{
if (pop_reconnect(ctx) < 0)
return -1;
/* verify that massage index is correct */
if (h->refno < 0)
{
mutt_error(
_("The message index is incorrect. Try reopening the mailbox."));
return -1;
}
mutt_progress_init(&progressbar, _("Fetching message..."), MUTT_PROGRESS_SIZE,
NetInc, h->content->length + h->content->offset - 1);
/* see if we can put in body cache; use our cache as fallback */
msg->fp = mutt_bcache_put(pop_data->bcache, h->data);
if (!msg->fp)
{
/* no */
bcache = 0;
mutt_mktemp(path, sizeof(path));
msg->fp = mutt_file_fopen(path, "w+");
if (!msg->fp)
{
mutt_perror(path);
return -1;
}
}
snprintf(buf, sizeof(buf), "RETR %d\r\n", h->refno);
const int ret = pop_fetch_data(pop_data, buf, &progressbar, fetch_message, msg->fp);
if (ret == 0)
break;
mutt_file_fclose(&msg->fp);
/* if RETR failed (e.g. connection closed), be sure to remove either
* the file in bcache or from POP's own cache since the next iteration
* of the loop will re-attempt to put() the message */
if (!bcache)
unlink(path);
if (ret == -2)
{
mutt_error("%s", pop_data->err_msg);
return -1;
}
if (ret == -3)
{
mutt_error(_("Can't write message to temporary file!"));
return -1;
}
}
/* Update the header information. Previously, we only downloaded a
* portion of the headers, those required for the main display.
*/
if (bcache)
mutt_bcache_commit(pop_data->bcache, h->data);
else
{
cache->index = h->index;
cache->path = mutt_str_strdup(path);
}
rewind(msg->fp);
uidl = h->data;
/* we replace envelop, key in subj_hash has to be updated as well */
if (ctx->subj_hash && h->env->real_subj)
mutt_hash_delete(ctx->subj_hash, h->env->real_subj, h);
mutt_label_hash_remove(ctx, h);
mutt_env_free(&h->env);
h->env = mutt_rfc822_read_header(msg->fp, h, 0, 0);
if (ctx->subj_hash && h->env->real_subj)
mutt_hash_insert(ctx->subj_hash, h->env->real_subj, h);
mutt_label_hash_add(ctx, h);
h->data = uidl;
h->lines = 0;
fgets(buf, sizeof(buf), msg->fp);
while (!feof(msg->fp))
{
ctx->hdrs[msgno]->lines++;
fgets(buf, sizeof(buf), msg->fp);
}
h->content->length = ftello(msg->fp) - h->content->offset;
/* This needs to be done in case this is a multipart message */
if (!WithCrypto)
h->security = crypt_query(h->content);
mutt_clear_error();
rewind(msg->fp);
return 0;
} | 681 | True | 1 |
CVE-2018-14363 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:P/A:N | NETWORK | LOW | NONE | NONE | PARTIAL | NONE | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | HIGH | NONE | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in NeoMutt before 2018-07-16. newsrc.c does not properly restrict '/' characters that may have unsafe interaction with cache pathnames."}] | 2020-05-21T01:16Z | 2018-07-17T17:29Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | Richard Russon | 2018-07-05 13:32:17+01:00 | sanitise cache paths
Co-authored-by: JerikoOne <[email protected]> | 9bfab35522301794483f8f9ed60820bdec9be59e | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | pop_fetch_message | pop_fetch_message( struct Context * ctx , struct Message * msg , int msgno) | ['ctx', 'msg', 'msgno'] | static int pop_fetch_message(struct Context *ctx, struct Message *msg, int msgno)
{
void *uidl = NULL;
char buf[LONG_STRING];
char path[PATH_MAX];
struct Progress progressbar;
struct PopData *pop_data = (struct PopData *) ctx->data;
struct PopCache *cache = NULL;
struct Header *h = ctx->hdrs[msgno];
unsigned short bcache = 1;
/* see if we already have the message in body cache */
msg->fp = mutt_bcache_get(pop_data->bcache, h->data);
if (msg->fp)
return 0;
/*
* see if we already have the message in our cache in
* case $message_cachedir is unset
*/
cache = &pop_data->cache[h->index % POP_CACHE_LEN];
if (cache->path)
{
if (cache->index == h->index)
{
/* yes, so just return a pointer to the message */
msg->fp = fopen(cache->path, "r");
if (msg->fp)
return 0;
mutt_perror(cache->path);
return -1;
}
else
{
/* clear the previous entry */
unlink(cache->path);
FREE(&cache->path);
}
}
while (true)
{
if (pop_reconnect(ctx) < 0)
return -1;
/* verify that massage index is correct */
if (h->refno < 0)
{
mutt_error(
_("The message index is incorrect. Try reopening the mailbox."));
return -1;
}
mutt_progress_init(&progressbar, _("Fetching message..."), MUTT_PROGRESS_SIZE,
NetInc, h->content->length + h->content->offset - 1);
/* see if we can put in body cache; use our cache as fallback */
msg->fp = mutt_bcache_put(pop_data->bcache, h->data);
if (!msg->fp)
{
/* no */
bcache = 0;
mutt_mktemp(path, sizeof(path));
msg->fp = mutt_file_fopen(path, "w+");
if (!msg->fp)
{
mutt_perror(path);
return -1;
}
}
snprintf(buf, sizeof(buf), "RETR %d\r\n", h->refno);
const int ret = pop_fetch_data(pop_data, buf, &progressbar, fetch_message, msg->fp);
if (ret == 0)
break;
mutt_file_fclose(&msg->fp);
/* if RETR failed (e.g. connection closed), be sure to remove either
* the file in bcache or from POP's own cache since the next iteration
* of the loop will re-attempt to put() the message */
if (!bcache)
unlink(path);
if (ret == -2)
{
mutt_error("%s", pop_data->err_msg);
return -1;
}
if (ret == -3)
{
mutt_error(_("Can't write message to temporary file!"));
return -1;
}
}
/* Update the header information. Previously, we only downloaded a
* portion of the headers, those required for the main display.
*/
if (bcache)
mutt_bcache_commit(pop_data->bcache, h->data);
else
{
cache->index = h->index;
cache->path = mutt_str_strdup(path);
}
rewind(msg->fp);
uidl = h->data;
/* we replace envelop, key in subj_hash has to be updated as well */
if (ctx->subj_hash && h->env->real_subj)
mutt_hash_delete(ctx->subj_hash, h->env->real_subj, h);
mutt_label_hash_remove(ctx, h);
mutt_env_free(&h->env);
h->env = mutt_rfc822_read_header(msg->fp, h, 0, 0);
if (ctx->subj_hash && h->env->real_subj)
mutt_hash_insert(ctx->subj_hash, h->env->real_subj, h);
mutt_label_hash_add(ctx, h);
h->data = uidl;
h->lines = 0;
fgets(buf, sizeof(buf), msg->fp);
while (!feof(msg->fp))
{
ctx->hdrs[msgno]->lines++;
fgets(buf, sizeof(buf), msg->fp);
}
h->content->length = ftello(msg->fp) - h->content->offset;
/* This needs to be done in case this is a multipart message */
if (!WithCrypto)
h->security = crypt_query(h->content);
mutt_clear_error();
rewind(msg->fp);
return 0;
} | 681 | True | 1 |
CVE-2018-14362 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'name': 'https://gitlab.com/muttmua/mutt/commit/6aed28b40a0410ec47d40c8c7296d8d10bae7576', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'Patch']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. pop.c does not forbid characters that may have unsafe interaction with message-cache pathnames, as demonstrated by a '/' character."}] | 2020-05-19T17:19Z | 2018-07-17T17:29Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Richard Russon | 2018-07-05 13:32:17+01:00 | sanitise cache paths
Co-authored-by: JerikoOne <[email protected]> | 9bfab35522301794483f8f9ed60820bdec9be59e | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | pop_sync_mailbox | pop_sync_mailbox( struct Context * ctx , int * index_hint) | ['ctx', 'index_hint'] | static int pop_sync_mailbox(struct Context *ctx, int *index_hint)
{
int i, j, ret = 0;
char buf[LONG_STRING];
struct PopData *pop_data = (struct PopData *) ctx->data;
struct Progress progress;
#ifdef USE_HCACHE
header_cache_t *hc = NULL;
#endif
pop_data->check_time = 0;
while (true)
{
if (pop_reconnect(ctx) < 0)
return -1;
mutt_progress_init(&progress, _("Marking messages deleted..."),
MUTT_PROGRESS_MSG, WriteInc, ctx->deleted);
#ifdef USE_HCACHE
hc = pop_hcache_open(pop_data, ctx->path);
#endif
for (i = 0, j = 0, ret = 0; ret == 0 && i < ctx->msgcount; i++)
{
if (ctx->hdrs[i]->deleted && ctx->hdrs[i]->refno != -1)
{
j++;
if (!ctx->quiet)
mutt_progress_update(&progress, j, -1);
snprintf(buf, sizeof(buf), "DELE %d\r\n", ctx->hdrs[i]->refno);
ret = pop_query(pop_data, buf, sizeof(buf));
if (ret == 0)
{
mutt_bcache_del(pop_data->bcache, ctx->hdrs[i]->data);
#ifdef USE_HCACHE
mutt_hcache_delete(hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data));
#endif
}
}
#ifdef USE_HCACHE
if (ctx->hdrs[i]->changed)
{
mutt_hcache_store(hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data),
ctx->hdrs[i], 0);
}
#endif
}
#ifdef USE_HCACHE
mutt_hcache_close(hc);
#endif
if (ret == 0)
{
mutt_str_strfcpy(buf, "QUIT\r\n", sizeof(buf));
ret = pop_query(pop_data, buf, sizeof(buf));
}
if (ret == 0)
{
pop_data->clear_cache = true;
pop_clear_cache(pop_data);
pop_data->status = POP_DISCONNECTED;
return 0;
}
if (ret == -2)
{
mutt_error("%s", pop_data->err_msg);
return -1;
}
}
} | 404 | True | 1 |
CVE-2018-14363 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:P/A:N | NETWORK | LOW | NONE | NONE | PARTIAL | NONE | 5.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | HIGH | NONE | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'name': 'https://github.com/neomutt/neomutt/commit/9bfab35522301794483f8f9ed60820bdec9be59e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-22'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "An issue was discovered in NeoMutt before 2018-07-16. newsrc.c does not properly restrict '/' characters that may have unsafe interaction with cache pathnames."}] | 2020-05-21T01:16Z | 2018-07-17T17:29Z | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin", which may also be useful in accessing unexpected files. This is referred to as absolute path traversal.
In many programming languages, the injection of a null byte (the 0 or NUL) may allow an attacker to truncate a generated filename to widen the scope of attack. For example, the software may add ".txt" to any pathname, thus limiting the attacker to text files, but a null injection may effectively remove this restriction.
| https://cwe.mitre.org/data/definitions/22.html | 0 | Richard Russon | 2018-07-05 13:32:17+01:00 | sanitise cache paths
Co-authored-by: JerikoOne <[email protected]> | 9bfab35522301794483f8f9ed60820bdec9be59e | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | pop_sync_mailbox | pop_sync_mailbox( struct Context * ctx , int * index_hint) | ['ctx', 'index_hint'] | static int pop_sync_mailbox(struct Context *ctx, int *index_hint)
{
int i, j, ret = 0;
char buf[LONG_STRING];
struct PopData *pop_data = (struct PopData *) ctx->data;
struct Progress progress;
#ifdef USE_HCACHE
header_cache_t *hc = NULL;
#endif
pop_data->check_time = 0;
while (true)
{
if (pop_reconnect(ctx) < 0)
return -1;
mutt_progress_init(&progress, _("Marking messages deleted..."),
MUTT_PROGRESS_MSG, WriteInc, ctx->deleted);
#ifdef USE_HCACHE
hc = pop_hcache_open(pop_data, ctx->path);
#endif
for (i = 0, j = 0, ret = 0; ret == 0 && i < ctx->msgcount; i++)
{
if (ctx->hdrs[i]->deleted && ctx->hdrs[i]->refno != -1)
{
j++;
if (!ctx->quiet)
mutt_progress_update(&progress, j, -1);
snprintf(buf, sizeof(buf), "DELE %d\r\n", ctx->hdrs[i]->refno);
ret = pop_query(pop_data, buf, sizeof(buf));
if (ret == 0)
{
mutt_bcache_del(pop_data->bcache, ctx->hdrs[i]->data);
#ifdef USE_HCACHE
mutt_hcache_delete(hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data));
#endif
}
}
#ifdef USE_HCACHE
if (ctx->hdrs[i]->changed)
{
mutt_hcache_store(hc, ctx->hdrs[i]->data, strlen(ctx->hdrs[i]->data),
ctx->hdrs[i], 0);
}
#endif
}
#ifdef USE_HCACHE
mutt_hcache_close(hc);
#endif
if (ret == 0)
{
mutt_str_strfcpy(buf, "QUIT\r\n", sizeof(buf));
ret = pop_query(pop_data, buf, sizeof(buf));
}
if (ret == 0)
{
pop_data->clear_cache = true;
pop_clear_cache(pop_data);
pop_data->status = POP_DISCONNECTED;
return 0;
}
if (ret == -2)
{
mutt_error("%s", pop_data->err_msg);
return -1;
}
}
} | 404 | True | 1 |
CVE-2018-14357 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'name': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with an automatic subscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | Richard Russon | 2018-07-06 00:52:41+01:00 | quote imap strings more carefully
Co-authored-by: JerikoOne <[email protected]> | e52393740334443ae0206cab2d7caef381646725 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | imap_auth_login | imap_auth_login( struct ImapData * idata , const char * method) | ['idata', 'method'] | enum ImapAuthRes imap_auth_login(struct ImapData *idata, const char *method)
{
char q_user[SHORT_STRING], q_pass[SHORT_STRING];
char buf[STRING];
int rc;
if (mutt_bit_isset(idata->capabilities, LOGINDISABLED))
{
mutt_message(_("LOGIN disabled on this server."));
return IMAP_AUTH_UNAVAIL;
}
if (mutt_account_getuser(&idata->conn->account) < 0)
return IMAP_AUTH_FAILURE;
if (mutt_account_getpass(&idata->conn->account) < 0)
return IMAP_AUTH_FAILURE;
mutt_message(_("Logging in..."));
imap_quote_string(q_user, sizeof(q_user), idata->conn->account.user);
imap_quote_string(q_pass, sizeof(q_pass), idata->conn->account.pass);
/* don't print the password unless we're at the ungodly debugging level
* of 5 or higher */
if (DebugLevel < IMAP_LOG_PASS)
mutt_debug(2, "Sending LOGIN command for %s...\n", idata->conn->account.user);
snprintf(buf, sizeof(buf), "LOGIN %s %s", q_user, q_pass);
rc = imap_exec(idata, buf, IMAP_CMD_FAIL_OK | IMAP_CMD_PASS);
if (!rc)
{
mutt_clear_error(); /* clear "Logging in...". fixes #3524 */
return IMAP_AUTH_SUCCESS;
}
mutt_error(_("Login failed."));
return IMAP_AUTH_FAILURE;
} | 211 | True | 1 |
CVE-2018-14357 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'name': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with an automatic subscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | Richard Russon | 2018-07-06 00:52:41+01:00 | quote imap strings more carefully
Co-authored-by: JerikoOne <[email protected]> | e52393740334443ae0206cab2d7caef381646725 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | cmd_parse_lsub | cmd_parse_lsub( struct ImapData * idata , char * s) | ['idata', 's'] | static void cmd_parse_lsub(struct ImapData *idata, char *s)
{
char buf[STRING];
char errstr[STRING];
struct Buffer err, token;
struct Url url;
struct ImapList list;
if (idata->cmddata && idata->cmdtype == IMAP_CT_LIST)
{
/* caller will handle response itself */
cmd_parse_list(idata, s);
return;
}
if (!ImapCheckSubscribed)
return;
idata->cmdtype = IMAP_CT_LIST;
idata->cmddata = &list;
cmd_parse_list(idata, s);
idata->cmddata = NULL;
/* noselect is for a gmail quirk (#3445) */
if (!list.name || list.noselect)
return;
mutt_debug(3, "Subscribing to %s\n", list.name);
mutt_str_strfcpy(buf, "mailboxes \"", sizeof(buf));
mutt_account_tourl(&idata->conn->account, &url);
/* escape \ and " */
imap_quote_string(errstr, sizeof(errstr), list.name);
url.path = errstr + 1;
url.path[strlen(url.path) - 1] = '\0';
if (mutt_str_strcmp(url.user, ImapUser) == 0)
url.user = NULL;
url_tostring(&url, buf + 11, sizeof(buf) - 11, 0);
mutt_str_strcat(buf, sizeof(buf), "\"");
mutt_buffer_init(&token);
mutt_buffer_init(&err);
err.data = errstr;
err.dsize = sizeof(errstr);
if (mutt_parse_rc_line(buf, &token, &err))
mutt_debug(1, "Error adding subscribed mailbox: %s\n", errstr);
FREE(&token.data);
} | 289 | True | 1 |
CVE-2018-14357 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'name': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with an automatic subscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | Richard Russon | 2018-07-06 00:52:41+01:00 | quote imap strings more carefully
Co-authored-by: JerikoOne <[email protected]> | e52393740334443ae0206cab2d7caef381646725 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | compile_search | compile_search( struct Context * ctx , const struct Pattern * pat , struct Buffer * buf) | ['ctx', 'pat', 'buf'] | static int compile_search(struct Context *ctx, const struct Pattern *pat, struct Buffer *buf)
{
if (do_search(pat, 0) == 0)
return 0;
if (pat->not)
mutt_buffer_addstr(buf, "NOT ");
if (pat->child)
{
int clauses;
clauses = do_search(pat->child, 1);
if (clauses > 0)
{
const struct Pattern *clause = pat->child;
mutt_buffer_addch(buf, '(');
while (clauses)
{
if (do_search(clause, 0))
{
if (pat->op == MUTT_OR && clauses > 1)
mutt_buffer_addstr(buf, "OR ");
clauses--;
if (compile_search(ctx, clause, buf) < 0)
return -1;
if (clauses)
mutt_buffer_addch(buf, ' ');
}
clause = clause->next;
}
mutt_buffer_addch(buf, ')');
}
}
else
{
char term[STRING];
char *delim = NULL;
switch (pat->op)
{
case MUTT_HEADER:
mutt_buffer_addstr(buf, "HEADER ");
/* extract header name */
delim = strchr(pat->p.str, ':');
if (!delim)
{
mutt_error(_("Header search without header name: %s"), pat->p.str);
return -1;
}
*delim = '\0';
imap_quote_string(term, sizeof(term), pat->p.str);
mutt_buffer_addstr(buf, term);
mutt_buffer_addch(buf, ' ');
/* and field */
*delim = ':';
delim++;
SKIPWS(delim);
imap_quote_string(term, sizeof(term), delim);
mutt_buffer_addstr(buf, term);
break;
case MUTT_BODY:
mutt_buffer_addstr(buf, "BODY ");
imap_quote_string(term, sizeof(term), pat->p.str);
mutt_buffer_addstr(buf, term);
break;
case MUTT_WHOLE_MSG:
mutt_buffer_addstr(buf, "TEXT ");
imap_quote_string(term, sizeof(term), pat->p.str);
mutt_buffer_addstr(buf, term);
break;
case MUTT_SERVERSEARCH:
{
struct ImapData *idata = ctx->data;
if (!mutt_bit_isset(idata->capabilities, X_GM_EXT1))
{
mutt_error(_("Server-side custom search not supported: %s"), pat->p.str);
return -1;
}
}
mutt_buffer_addstr(buf, "X-GM-RAW ");
imap_quote_string(term, sizeof(term), pat->p.str);
mutt_buffer_addstr(buf, term);
break;
}
}
return 0;
} | 465 | True | 1 |
CVE-2018-14357 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'name': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with an automatic subscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | Richard Russon | 2018-07-06 00:52:41+01:00 | quote imap strings more carefully
Co-authored-by: JerikoOne <[email protected]> | e52393740334443ae0206cab2d7caef381646725 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | imap_munge_mbox_name | imap_munge_mbox_name( struct ImapData * idata , char * dest , size_t dlen , const char * src) | ['idata', 'dest', 'dlen', 'src'] | void imap_munge_mbox_name(struct ImapData *idata, char *dest, size_t dlen, const char *src)
{
char *buf = mutt_str_strdup(src);
imap_utf_encode(idata, &buf);
imap_quote_string(dest, dlen, buf);
FREE(&buf);
} | 53 | True | 1 |
CVE-2018-14357 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'name': 'https://github.com/neomutt/neomutt/commit/e52393740334443ae0206cab2d7caef381646725', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with an automatic subscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | Richard Russon | 2018-07-06 00:52:41+01:00 | quote imap strings more carefully
Co-authored-by: JerikoOne <[email protected]> | e52393740334443ae0206cab2d7caef381646725 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | imap_quote_string | imap_quote_string( char * dest , size_t dlen , const char * src) | ['dest', 'dlen', 'src'] | void imap_quote_string(char *dest, size_t dlen, const char *src)
{
static const char quote[] = "\"\\";
char *pt = dest;
const char *s = src;
*pt++ = '"';
/* save room for trailing quote-char */
dlen -= 2;
for (; *s && dlen; s++)
{
if (strchr(quote, *s))
{
dlen -= 2;
if (dlen == 0)
break;
*pt++ = '\\';
*pt++ = *s;
}
else
{
*pt++ = *s;
dlen--;
}
}
*pt++ = '"';
*pt = '\0';
} | 122 | True | 1 |
CVE-2018-14354 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'name': 'https://gitlab.com/muttmua/mutt/commit/185152818541f5cdc059cbff3f3e8b654fc27c1d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/95e80bf9ff10f68cb6443f760b85df4117cb15eb', 'name': 'https://github.com/neomutt/neomutt/commit/95e80bf9ff10f68cb6443f760b85df4117cb15eb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/104925', 'name': '104925', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2526', 'name': 'RHSA-2018:2526', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-78'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.7:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They allow remote IMAP servers to execute arbitrary commands via backquote characters, related to the mailboxes command associated with a manual subscription or unsubscription.'}] | 2020-08-24T17:37Z | 2018-07-17T17:29Z | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
This could allow attackers to execute unexpected, dangerous commands directly on the operating system. This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage.
There are at least two subtypes of OS command injection:
The application intends to execute a single, fixed program that is under its own control. It intends to use externally-supplied inputs as arguments to that program. For example, the program might use system("nslookup [HOSTNAME]") to run nslookup and allow the user to supply a HOSTNAME, which is used as an argument. Attackers cannot prevent nslookup from executing. However, if the program does not remove command separators from the HOSTNAME argument, attackers could place the separators into the arguments, which allows them to execute their own program after nslookup has finished executing.
The application accepts an input that it uses to fully select which program to run, as well as which commands to use. The application simply redirects this entire command to the operating system. For example, the program might use "exec([COMMAND])" to execute the [COMMAND] that was supplied by the user. If the COMMAND is under attacker control, then the attacker can execute arbitrary commands or programs. If the command is being executed using functions like exec() and CreateProcess(), the attacker might not be able to combine multiple commands together in the same line.
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.
| https://cwe.mitre.org/data/definitions/78.html | 0 | JerikoOne | 2018-07-06 20:50:14-05:00 | Quote path in imap_subscribe | 95e80bf9ff10f68cb6443f760b85df4117cb15eb | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | imap_subscribe | imap_subscribe( char * path , bool subscribe) | ['path', 'subscribe'] | int imap_subscribe(char *path, bool subscribe)
{
struct ImapData *idata = NULL;
char buf[LONG_STRING];
char mbox[LONG_STRING];
char errstr[STRING];
struct Buffer err, token;
struct ImapMbox mx;
if (!mx_is_imap(path) || imap_parse_path(path, &mx) || !mx.mbox)
{
mutt_error(_("Bad mailbox name"));
return -1;
}
idata = imap_conn_find(&(mx.account), 0);
if (!idata)
goto fail;
imap_fix_path(idata, mx.mbox, buf, sizeof(buf));
if (!*buf)
mutt_str_strfcpy(buf, "INBOX", sizeof(buf));
if (ImapCheckSubscribed)
{
mutt_buffer_init(&token);
mutt_buffer_init(&err);
err.data = errstr;
err.dsize = sizeof(errstr);
snprintf(mbox, sizeof(mbox), "%smailboxes \"%s\"", subscribe ? "" : "un", path);
if (mutt_parse_rc_line(mbox, &token, &err))
mutt_debug(1, "Error adding subscribed mailbox: %s\n", errstr);
FREE(&token.data);
}
if (subscribe)
mutt_message(_("Subscribing to %s..."), buf);
else
mutt_message(_("Unsubscribing from %s..."), buf);
imap_munge_mbox_name(idata, mbox, sizeof(mbox), buf);
snprintf(buf, sizeof(buf), "%sSUBSCRIBE %s", subscribe ? "" : "UN", mbox);
if (imap_exec(idata, buf, 0) < 0)
goto fail;
imap_unmunge_mbox_name(idata, mx.mbox);
if (subscribe)
mutt_message(_("Subscribed to %s"), mx.mbox);
else
mutt_message(_("Unsubscribed from %s"), mx.mbox);
FREE(&mx.mbox);
return 0;
fail:
FREE(&mx.mbox);
return -1;
} | 358 | True | 1 |
CVE-2018-14350 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3287534daa3beac68e2e83ca4b4fe8a3148ff870', 'name': 'https://gitlab.com/muttmua/mutt/commit/3287534daa3beac68e2e83ca4b4fe8a3148ff870', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/1b0f0d0988e6df4e32e9f4bf8780846ea95d4485', 'name': 'https://github.com/neomutt/neomutt/commit/1b0f0d0988e6df4e32e9f4bf8780846ea95d4485', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/104931', 'name': '104931', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. imap/message.c has a stack-based buffer overflow for a FETCH response with a long INTERNALDATE field.'}] | 2020-05-20T01:39Z | 2018-07-17T17:29Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | JerikoOne | 2018-07-07 14:03:46-05:00 | Don't overflow stack buffer in msg_parse_fetch | 1b0f0d0988e6df4e32e9f4bf8780846ea95d4485 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | msg_parse_fetch | msg_parse_fetch( struct ImapHeader * h , char * s) | ['h', 's'] | static int msg_parse_fetch(struct ImapHeader *h, char *s)
{
char tmp[SHORT_STRING];
char *ptmp = NULL;
if (!s)
return -1;
while (*s)
{
SKIPWS(s);
if (mutt_str_strncasecmp("FLAGS", s, 5) == 0)
{
s = msg_parse_flags(h, s);
if (!s)
return -1;
}
else if (mutt_str_strncasecmp("UID", s, 3) == 0)
{
s += 3;
SKIPWS(s);
if (mutt_str_atoui(s, &h->data->uid) < 0)
return -1;
s = imap_next_word(s);
}
else if (mutt_str_strncasecmp("INTERNALDATE", s, 12) == 0)
{
s += 12;
SKIPWS(s);
if (*s != '\"')
{
mutt_debug(1, "bogus INTERNALDATE entry: %s\n", s);
return -1;
}
s++;
ptmp = tmp;
while (*s && *s != '\"')
*ptmp++ = *s++;
if (*s != '\"')
return -1;
s++; /* skip past the trailing " */
*ptmp = '\0';
h->received = mutt_date_parse_imap(tmp);
}
else if (mutt_str_strncasecmp("RFC822.SIZE", s, 11) == 0)
{
s += 11;
SKIPWS(s);
ptmp = tmp;
while (isdigit((unsigned char) *s))
*ptmp++ = *s++;
*ptmp = '\0';
if (mutt_str_atol(tmp, &h->content_length) < 0)
return -1;
}
else if ((mutt_str_strncasecmp("BODY", s, 4) == 0) ||
(mutt_str_strncasecmp("RFC822.HEADER", s, 13) == 0))
{
/* handle above, in msg_fetch_header */
return -2;
}
else if (*s == ')')
s++; /* end of request */
else if (*s)
{
/* got something i don't understand */
imap_error("msg_parse_fetch", s);
return -1;
}
}
return 0;
} | 371 | True | 1 |
CVE-2018-14358 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3287534daa3beac68e2e83ca4b4fe8a3148ff870', 'name': 'https://gitlab.com/muttmua/mutt/commit/3287534daa3beac68e2e83ca4b4fe8a3148ff870', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/1b0f0d0988e6df4e32e9f4bf8780846ea95d4485', 'name': 'https://github.com/neomutt/neomutt/commit/1b0f0d0988e6df4e32e9f4bf8780846ea95d4485', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. imap/message.c has a stack-based buffer overflow for a FETCH response with a long RFC822.SIZE field.'}] | 2020-05-20T00:48Z | 2018-07-17T17:29Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | JerikoOne | 2018-07-07 14:03:46-05:00 | Don't overflow stack buffer in msg_parse_fetch | 1b0f0d0988e6df4e32e9f4bf8780846ea95d4485 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | msg_parse_fetch | msg_parse_fetch( struct ImapHeader * h , char * s) | ['h', 's'] | static int msg_parse_fetch(struct ImapHeader *h, char *s)
{
char tmp[SHORT_STRING];
char *ptmp = NULL;
if (!s)
return -1;
while (*s)
{
SKIPWS(s);
if (mutt_str_strncasecmp("FLAGS", s, 5) == 0)
{
s = msg_parse_flags(h, s);
if (!s)
return -1;
}
else if (mutt_str_strncasecmp("UID", s, 3) == 0)
{
s += 3;
SKIPWS(s);
if (mutt_str_atoui(s, &h->data->uid) < 0)
return -1;
s = imap_next_word(s);
}
else if (mutt_str_strncasecmp("INTERNALDATE", s, 12) == 0)
{
s += 12;
SKIPWS(s);
if (*s != '\"')
{
mutt_debug(1, "bogus INTERNALDATE entry: %s\n", s);
return -1;
}
s++;
ptmp = tmp;
while (*s && *s != '\"')
*ptmp++ = *s++;
if (*s != '\"')
return -1;
s++; /* skip past the trailing " */
*ptmp = '\0';
h->received = mutt_date_parse_imap(tmp);
}
else if (mutt_str_strncasecmp("RFC822.SIZE", s, 11) == 0)
{
s += 11;
SKIPWS(s);
ptmp = tmp;
while (isdigit((unsigned char) *s))
*ptmp++ = *s++;
*ptmp = '\0';
if (mutt_str_atol(tmp, &h->content_length) < 0)
return -1;
}
else if ((mutt_str_strncasecmp("BODY", s, 4) == 0) ||
(mutt_str_strncasecmp("RFC822.HEADER", s, 13) == 0))
{
/* handle above, in msg_fetch_header */
return -2;
}
else if (*s == ')')
s++; /* end of request */
else if (*s)
{
/* got something i don't understand */
imap_error("msg_parse_fetch", s);
return -1;
}
}
return 0;
} | 371 | True | 1 |
CVE-2018-14349 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/9347b5c01dc52682cb6be11539d9b7ebceae4416', 'name': 'https://gitlab.com/muttmua/mutt/commit/9347b5c01dc52682cb6be11539d9b7ebceae4416', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/36a29280448097f34ce9c94606195f2ac643fed1', 'name': 'https://github.com/neomutt/neomutt/commit/36a29280448097f34ce9c94606195f2ac643fed1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. imap/command.c mishandles a NO response without a message.'}] | 2020-05-20T01:47Z | 2018-07-17T17:29Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | JerikoOne | 2018-07-07 14:15:56-05:00 | Handle NO response without message properly | 36a29280448097f34ce9c94606195f2ac643fed1 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | cmd_handle_untagged | cmd_handle_untagged( struct ImapData * idata) | ['idata'] | static int cmd_handle_untagged(struct ImapData *idata)
{
unsigned int count = 0;
char *s = imap_next_word(idata->buf);
char *pn = imap_next_word(s);
if ((idata->state >= IMAP_SELECTED) && isdigit((unsigned char) *s))
{
pn = s;
s = imap_next_word(s);
/* EXISTS and EXPUNGE are always related to the SELECTED mailbox for the
* connection, so update that one.
*/
if (mutt_str_strncasecmp("EXISTS", s, 6) == 0)
{
mutt_debug(2, "Handling EXISTS\n");
/* new mail arrived */
if (mutt_str_atoui(pn, &count) < 0)
{
mutt_debug(1, "Malformed EXISTS: '%s'\n", pn);
}
if (!(idata->reopen & IMAP_EXPUNGE_PENDING) && count < idata->max_msn)
{
/* Notes 6.0.3 has a tendency to report fewer messages exist than
* it should. */
mutt_debug(1, "Message count is out of sync\n");
return 0;
}
/* at least the InterChange server sends EXISTS messages freely,
* even when there is no new mail */
else if (count == idata->max_msn)
mutt_debug(3, "superfluous EXISTS message.\n");
else
{
if (!(idata->reopen & IMAP_EXPUNGE_PENDING))
{
mutt_debug(2, "New mail in %s - %d messages total.\n", idata->mailbox, count);
idata->reopen |= IMAP_NEWMAIL_PENDING;
}
idata->new_mail_count = count;
}
}
/* pn vs. s: need initial seqno */
else if (mutt_str_strncasecmp("EXPUNGE", s, 7) == 0)
cmd_parse_expunge(idata, pn);
else if (mutt_str_strncasecmp("FETCH", s, 5) == 0)
cmd_parse_fetch(idata, pn);
}
else if (mutt_str_strncasecmp("CAPABILITY", s, 10) == 0)
cmd_parse_capability(idata, s);
else if (mutt_str_strncasecmp("OK [CAPABILITY", s, 14) == 0)
cmd_parse_capability(idata, pn);
else if (mutt_str_strncasecmp("OK [CAPABILITY", pn, 14) == 0)
cmd_parse_capability(idata, imap_next_word(pn));
else if (mutt_str_strncasecmp("LIST", s, 4) == 0)
cmd_parse_list(idata, s);
else if (mutt_str_strncasecmp("LSUB", s, 4) == 0)
cmd_parse_lsub(idata, s);
else if (mutt_str_strncasecmp("MYRIGHTS", s, 8) == 0)
cmd_parse_myrights(idata, s);
else if (mutt_str_strncasecmp("SEARCH", s, 6) == 0)
cmd_parse_search(idata, s);
else if (mutt_str_strncasecmp("STATUS", s, 6) == 0)
cmd_parse_status(idata, s);
else if (mutt_str_strncasecmp("ENABLED", s, 7) == 0)
cmd_parse_enabled(idata, s);
else if (mutt_str_strncasecmp("BYE", s, 3) == 0)
{
mutt_debug(2, "Handling BYE\n");
/* check if we're logging out */
if (idata->status == IMAP_BYE)
return 0;
/* server shut down our connection */
s += 3;
SKIPWS(s);
mutt_error("%s", s);
cmd_handle_fatal(idata);
return -1;
}
else if (ImapServernoise && (mutt_str_strncasecmp("NO", s, 2) == 0))
{
mutt_debug(2, "Handling untagged NO\n");
/* Display the warning message from the server */
mutt_error("%s", s + 3);
}
return 0;
} | 531 | True | 1 |
CVE-2018-14353 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/e0131852c6059107939893016c8ff56b6e42865d', 'name': 'https://gitlab.com/muttmua/mutt/commit/e0131852c6059107939893016c8ff56b6e42865d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/65d64a5b60a4a3883f2cd799d92c6091d8854f23', 'name': 'https://github.com/neomutt/neomutt/commit/65d64a5b60a4a3883f2cd799d92c6091d8854f23', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-191'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. imap_quote_string in imap/util.c has an integer underflow.'}] | 2020-05-20T01:23Z | 2018-07-17T17:29Z | Integer Underflow (Wrap or Wraparound) | The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result. | This can happen in signed and unsigned cases.
| https://cwe.mitre.org/data/definitions/191.html | 0 | JerikoOne | 2018-07-07 16:20:56-05:00 | Check for int underflow in imap_quote_string | 65d64a5b60a4a3883f2cd799d92c6091d8854f23 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | imap_quote_string | imap_quote_string( char * dest , size_t dlen , const char * src , bool quote_backtick) | ['dest', 'dlen', 'src', 'quote_backtick'] | void imap_quote_string(char *dest, size_t dlen, const char *src, bool quote_backtick)
{
const char *quote = "`\"\\";
if (!quote_backtick)
quote++;
char *pt = dest;
const char *s = src;
*pt++ = '"';
/* save room for trailing quote-char */
dlen -= 2;
for (; *s && dlen; s++)
{
if (strchr(quote, *s))
{
dlen -= 2;
if (dlen == 0)
break;
*pt++ = '\\';
*pt++ = *s;
}
else
{
*pt++ = *s;
dlen--;
}
}
*pt++ = '"';
*pt = '\0';
} | 131 | True | 1 |
CVE-2018-14352 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/e0131852c6059107939893016c8ff56b6e42865d', 'name': 'https://gitlab.com/muttmua/mutt/commit/e0131852c6059107939893016c8ff56b6e42865d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/e27b65b3bf8defa34db58919496056caf3850cd4', 'name': 'https://github.com/neomutt/neomutt/commit/e27b65b3bf8defa34db58919496056caf3850cd4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. imap_quote_string in imap/util.c does not leave room for quote characters, leading to a stack-based buffer overflow.'}] | 2020-05-20T01:25Z | 2018-07-17T17:29Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | JerikoOne | 2018-07-07 15:35:56-05:00 | imap_quote_string make room for quotes | e27b65b3bf8defa34db58919496056caf3850cd4 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | imap_quote_string | imap_quote_string( char * dest , size_t dlen , const char * src , bool quote_backtick) | ['dest', 'dlen', 'src', 'quote_backtick'] | void imap_quote_string(char *dest, size_t dlen, const char *src, bool quote_backtick)
{
const char *quote = "`\"\\";
if (!quote_backtick)
quote++;
char *pt = dest;
const char *s = src;
*pt++ = '"';
/* save room for trailing quote-char */
dlen -= 2;
for (; *s && dlen; s++)
{
if (strchr(quote, *s))
{
if (dlen < 2)
break;
dlen -= 2;
*pt++ = '\\';
*pt++ = *s;
}
else
{
*pt++ = *s;
dlen--;
}
}
*pt++ = '"';
*pt = '\0';
} | 131 | True | 1 |
CVE-2018-14359 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'name': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'name': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They have a buffer overflow via base64 data.'}] | 2020-05-19T17:13Z | 2018-07-17T17:29Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Kevin McCarthy | 2018-07-13 14:25:28-07:00 | Check outbuf length in mutt_to_base64()
The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c.
Thanks to Jeriko One for the bug report. | 6f163e07ae68654d7ac5268cbb7565f6df79ad85 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | imap_auth_cram_md5 | imap_auth_cram_md5( struct ImapData * idata , const char * method) | ['idata', 'method'] | enum ImapAuthRes imap_auth_cram_md5(struct ImapData *idata, const char *method)
{
char ibuf[LONG_STRING * 2], obuf[LONG_STRING];
unsigned char hmac_response[MD5_DIGEST_LEN];
int len;
int rc;
if (!mutt_bit_isset(idata->capabilities, ACRAM_MD5))
return IMAP_AUTH_UNAVAIL;
mutt_message(_("Authenticating (CRAM-MD5)..."));
/* get auth info */
if (mutt_account_getlogin(&idata->conn->account) < 0)
return IMAP_AUTH_FAILURE;
if (mutt_account_getpass(&idata->conn->account) < 0)
return IMAP_AUTH_FAILURE;
imap_cmd_start(idata, "AUTHENTICATE CRAM-MD5");
/* From RFC2195:
* The data encoded in the first ready response contains a presumptively
* arbitrary string of random digits, a timestamp, and the fully-qualified
* primary host name of the server. The syntax of the unencoded form must
* correspond to that of an RFC822 'msg-id' [RFC822] as described in [POP3].
*/
do
rc = imap_cmd_step(idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc != IMAP_CMD_RESPOND)
{
mutt_debug(1, "Invalid response from server: %s\n", ibuf);
goto bail;
}
len = mutt_b64_decode(obuf, idata->buf + 2);
if (len == -1)
{
mutt_debug(1, "Error decoding base64 response.\n");
goto bail;
}
obuf[len] = '\0';
mutt_debug(2, "CRAM challenge: %s\n", obuf);
/* The client makes note of the data and then responds with a string
* consisting of the user name, a space, and a 'digest'. The latter is
* computed by applying the keyed MD5 algorithm from [KEYED-MD5] where the
* key is a shared secret and the digested text is the timestamp (including
* angle-brackets).
*
* Note: The user name shouldn't be quoted. Since the digest can't contain
* spaces, there is no ambiguity. Some servers get this wrong, we'll work
* around them when the bug report comes in. Until then, we'll remain
* blissfully RFC-compliant.
*/
hmac_md5(idata->conn->account.pass, obuf, hmac_response);
/* dubious optimisation I saw elsewhere: make the whole string in one call */
int off = snprintf(obuf, sizeof(obuf), "%s ", idata->conn->account.user);
mutt_md5_toascii(hmac_response, obuf + off);
mutt_debug(2, "CRAM response: %s\n", obuf);
/* ibuf must be long enough to store the base64 encoding of obuf,
* plus the additional debris */
mutt_b64_encode(ibuf, obuf, strlen(obuf), sizeof(ibuf) - 2);
mutt_str_strcat(ibuf, sizeof(ibuf), "\r\n");
mutt_socket_send(idata->conn, ibuf);
do
rc = imap_cmd_step(idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc != IMAP_CMD_OK)
{
mutt_debug(1, "Error receiving server response.\n");
goto bail;
}
if (imap_code(idata->buf))
return IMAP_AUTH_SUCCESS;
bail:
mutt_error(_("CRAM-MD5 authentication failed."));
return IMAP_AUTH_FAILURE;
} | 341 | True | 1 |
CVE-2018-14359 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'name': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'name': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They have a buffer overflow via base64 data.'}] | 2020-05-19T17:13Z | 2018-07-17T17:29Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Kevin McCarthy | 2018-07-13 14:25:28-07:00 | Check outbuf length in mutt_to_base64()
The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c.
Thanks to Jeriko One for the bug report. | 6f163e07ae68654d7ac5268cbb7565f6df79ad85 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | imap_auth_gss | imap_auth_gss( struct ImapData * idata , const char * method) | ['idata', 'method'] | enum ImapAuthRes imap_auth_gss(struct ImapData *idata, const char *method)
{
gss_buffer_desc request_buf, send_token;
gss_buffer_t sec_token;
gss_name_t target_name;
gss_ctx_id_t context;
gss_OID mech_name;
char server_conf_flags;
gss_qop_t quality;
int cflags;
OM_uint32 maj_stat, min_stat;
char buf1[GSS_BUFSIZE], buf2[GSS_BUFSIZE];
unsigned long buf_size;
int rc;
if (!mutt_bit_isset(idata->capabilities, AGSSAPI))
return IMAP_AUTH_UNAVAIL;
if (mutt_account_getuser(&idata->conn->account) < 0)
return IMAP_AUTH_FAILURE;
/* get an IMAP service ticket for the server */
snprintf(buf1, sizeof(buf1), "imap@%s", idata->conn->account.host);
request_buf.value = buf1;
request_buf.length = strlen(buf1);
maj_stat = gss_import_name(&min_stat, &request_buf, gss_nt_service_name, &target_name);
if (maj_stat != GSS_S_COMPLETE)
{
mutt_debug(2, "Couldn't get service name for [%s]\n", buf1);
return IMAP_AUTH_UNAVAIL;
}
else if (DebugLevel >= 2)
{
gss_display_name(&min_stat, target_name, &request_buf, &mech_name);
mutt_debug(2, "Using service name [%s]\n", (char *) request_buf.value);
gss_release_buffer(&min_stat, &request_buf);
}
/* Acquire initial credentials - without a TGT GSSAPI is UNAVAIL */
sec_token = GSS_C_NO_BUFFER;
context = GSS_C_NO_CONTEXT;
/* build token */
maj_stat = gss_init_sec_context(&min_stat, GSS_C_NO_CREDENTIAL, &context, target_name,
GSS_C_NO_OID, GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG,
0, GSS_C_NO_CHANNEL_BINDINGS, sec_token, NULL,
&send_token, (unsigned int *) &cflags, NULL);
if (maj_stat != GSS_S_COMPLETE && maj_stat != GSS_S_CONTINUE_NEEDED)
{
print_gss_error(maj_stat, min_stat);
mutt_debug(1, "Error acquiring credentials - no TGT?\n");
gss_release_name(&min_stat, &target_name);
return IMAP_AUTH_UNAVAIL;
}
/* now begin login */
mutt_message(_("Authenticating (GSSAPI)..."));
imap_cmd_start(idata, "AUTHENTICATE GSSAPI");
/* expect a null continuation response ("+") */
do
rc = imap_cmd_step(idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc != IMAP_CMD_RESPOND)
{
mutt_debug(2, "Invalid response from server: %s\n", buf1);
gss_release_name(&min_stat, &target_name);
goto bail;
}
/* now start the security context initialisation loop... */
mutt_debug(2, "Sending credentials\n");
mutt_b64_encode(buf1, send_token.value, send_token.length, sizeof(buf1) - 2);
gss_release_buffer(&min_stat, &send_token);
mutt_str_strcat(buf1, sizeof(buf1), "\r\n");
mutt_socket_send(idata->conn, buf1);
while (maj_stat == GSS_S_CONTINUE_NEEDED)
{
/* Read server data */
do
rc = imap_cmd_step(idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc != IMAP_CMD_RESPOND)
{
mutt_debug(1, "#1 Error receiving server response.\n");
gss_release_name(&min_stat, &target_name);
goto bail;
}
request_buf.length = mutt_b64_decode(buf2, idata->buf + 2);
request_buf.value = buf2;
sec_token = &request_buf;
/* Write client data */
maj_stat = gss_init_sec_context(
&min_stat, GSS_C_NO_CREDENTIAL, &context, target_name, GSS_C_NO_OID,
GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG, 0, GSS_C_NO_CHANNEL_BINDINGS,
sec_token, NULL, &send_token, (unsigned int *) &cflags, NULL);
if (maj_stat != GSS_S_COMPLETE && maj_stat != GSS_S_CONTINUE_NEEDED)
{
print_gss_error(maj_stat, min_stat);
mutt_debug(1, "Error exchanging credentials\n");
gss_release_name(&min_stat, &target_name);
goto err_abort_cmd;
}
mutt_b64_encode(buf1, send_token.value, send_token.length, sizeof(buf1) - 2);
gss_release_buffer(&min_stat, &send_token);
mutt_str_strcat(buf1, sizeof(buf1), "\r\n");
mutt_socket_send(idata->conn, buf1);
}
gss_release_name(&min_stat, &target_name);
/* get security flags and buffer size */
do
rc = imap_cmd_step(idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc != IMAP_CMD_RESPOND)
{
mutt_debug(1, "#2 Error receiving server response.\n");
goto bail;
}
request_buf.length = mutt_b64_decode(buf2, idata->buf + 2);
request_buf.value = buf2;
maj_stat = gss_unwrap(&min_stat, context, &request_buf, &send_token, &cflags, &quality);
if (maj_stat != GSS_S_COMPLETE)
{
print_gss_error(maj_stat, min_stat);
mutt_debug(2, "Couldn't unwrap security level data\n");
gss_release_buffer(&min_stat, &send_token);
goto err_abort_cmd;
}
mutt_debug(2, "Credential exchange complete\n");
/* first octet is security levels supported. We want NONE */
server_conf_flags = ((char *) send_token.value)[0];
if (!(((char *) send_token.value)[0] & GSS_AUTH_P_NONE))
{
mutt_debug(2, "Server requires integrity or privacy\n");
gss_release_buffer(&min_stat, &send_token);
goto err_abort_cmd;
}
/* we don't care about buffer size if we don't wrap content. But here it is */
((char *) send_token.value)[0] = '\0';
buf_size = ntohl(*((long *) send_token.value));
gss_release_buffer(&min_stat, &send_token);
mutt_debug(2, "Unwrapped security level flags: %c%c%c\n",
(server_conf_flags & GSS_AUTH_P_NONE) ? 'N' : '-',
(server_conf_flags & GSS_AUTH_P_INTEGRITY) ? 'I' : '-',
(server_conf_flags & GSS_AUTH_P_PRIVACY) ? 'P' : '-');
mutt_debug(2, "Maximum GSS token size is %ld\n", buf_size);
/* agree to terms (hack!) */
buf_size = htonl(buf_size); /* not relevant without integrity/privacy */
memcpy(buf1, &buf_size, 4);
buf1[0] = GSS_AUTH_P_NONE;
/* server decides if principal can log in as user */
strncpy(buf1 + 4, idata->conn->account.user, sizeof(buf1) - 4);
request_buf.value = buf1;
request_buf.length = 4 + strlen(idata->conn->account.user);
maj_stat = gss_wrap(&min_stat, context, 0, GSS_C_QOP_DEFAULT, &request_buf,
&cflags, &send_token);
if (maj_stat != GSS_S_COMPLETE)
{
mutt_debug(2, "Error creating login request\n");
goto err_abort_cmd;
}
mutt_b64_encode(buf1, send_token.value, send_token.length, sizeof(buf1) - 2);
mutt_debug(2, "Requesting authorisation as %s\n", idata->conn->account.user);
mutt_str_strcat(buf1, sizeof(buf1), "\r\n");
mutt_socket_send(idata->conn, buf1);
/* Joy of victory or agony of defeat? */
do
rc = imap_cmd_step(idata);
while (rc == IMAP_CMD_CONTINUE);
if (rc == IMAP_CMD_RESPOND)
{
mutt_debug(1, "Unexpected server continuation request.\n");
goto err_abort_cmd;
}
if (imap_code(idata->buf))
{
/* flush the security context */
mutt_debug(2, "Releasing GSS credentials\n");
maj_stat = gss_delete_sec_context(&min_stat, &context, &send_token);
if (maj_stat != GSS_S_COMPLETE)
mutt_debug(1, "Error releasing credentials\n");
/* send_token may contain a notification to the server to flush
* credentials. RFC1731 doesn't specify what to do, and since this
* support is only for authentication, we'll assume the server knows
* enough to flush its own credentials */
gss_release_buffer(&min_stat, &send_token);
return IMAP_AUTH_SUCCESS;
}
else
goto bail;
err_abort_cmd:
mutt_socket_send(idata->conn, "*\r\n");
do
rc = imap_cmd_step(idata);
while (rc == IMAP_CMD_CONTINUE);
bail:
mutt_error(_("GSSAPI authentication failed."));
return IMAP_AUTH_FAILURE;
} | 1190 | True | 1 |
CVE-2018-14359 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'name': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'name': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They have a buffer overflow via base64 data.'}] | 2020-05-19T17:13Z | 2018-07-17T17:29Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Kevin McCarthy | 2018-07-13 14:25:28-07:00 | Check outbuf length in mutt_to_base64()
The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c.
Thanks to Jeriko One for the bug report. | 6f163e07ae68654d7ac5268cbb7565f6df79ad85 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | rfc2047_decode_word | rfc2047_decode_word( const char * s , size_t len , enum ContentEncoding enc) | ['s', 'len', 'enc'] | static char *rfc2047_decode_word(const char *s, size_t len, enum ContentEncoding enc)
{
const char *it = s;
const char *end = s + len;
if (enc == ENCQUOTEDPRINTABLE)
{
struct Buffer buf = { 0 };
for (; it < end; ++it)
{
if (*it == '_')
{
mutt_buffer_addch(&buf, ' ');
}
else if ((*it == '=') && (!(it[1] & ~127) && hexval(it[1]) != -1) &&
(!(it[2] & ~127) && hexval(it[2]) != -1))
{
mutt_buffer_addch(&buf, (hexval(it[1]) << 4) | hexval(it[2]));
it += 2;
}
else
{
mutt_buffer_addch(&buf, *it);
}
}
mutt_buffer_addch(&buf, '\0');
return buf.data;
}
else if (enc == ENCBASE64)
{
char *out = mutt_mem_malloc(3 * len / 4 + 1);
int dlen = mutt_b64_decode(out, it);
if (dlen == -1)
{
FREE(&out);
return NULL;
}
out[dlen] = '\0';
return out;
}
assert(0); /* The enc parameter has an invalid value */
return NULL;
} | 261 | True | 1 |
CVE-2018-14359 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'name': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'name': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They have a buffer overflow via base64 data.'}] | 2020-05-19T17:13Z | 2018-07-17T17:29Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Kevin McCarthy | 2018-07-13 14:25:28-07:00 | Check outbuf length in mutt_to_base64()
The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c.
Thanks to Jeriko One for the bug report. | 6f163e07ae68654d7ac5268cbb7565f6df79ad85 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | test_base64_decode | test_base64_decode( void) | ['void'] | void test_base64_decode(void)
{
char buffer[16];
int len = mutt_b64_decode(buffer, encoded);
if (!TEST_CHECK(len == sizeof(clear) - 1))
{
TEST_MSG("Expected: %zu", sizeof(clear) - 1);
TEST_MSG("Actual : %zu", len);
}
buffer[len] = '\0';
if (!TEST_CHECK(strcmp(buffer, clear) == 0))
{
TEST_MSG("Expected: %s", clear);
TEST_MSG("Actual : %s", buffer);
}
} | 96 | True | 1 |
CVE-2018-14359 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | True | [{'url': 'https://neomutt.org/2018/07/16/release', 'name': 'https://neomutt.org/2018/07/16/release', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'name': 'https://gitlab.com/muttmua/mutt/commit/3d9028fec8f4d08db2251096307c0bbbebce669a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'name': 'https://github.com/neomutt/neomutt/commit/6f163e07ae68654d7ac5268cbb7565f6df79ad85', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.mutt.org/news.html', 'name': 'http://www.mutt.org/news.html', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3719-2/', 'name': 'USN-3719-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-1/', 'name': 'USN-3719-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/08/msg00001.html', 'name': '[debian-lts-announce] 20180802 [SECURITY] [DLA 1455-1] mutt security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4277', 'name': 'DSA-4277', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3719-3/', 'name': 'USN-3719-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-07', 'name': 'GLSA-201810-07', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:mutt:mutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.10.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:neomutt:neomutt:*:*:*:*:*:*:*:*', 'versionEndExcluding': '20180716', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in Mutt before 1.10.1 and NeoMutt before 2018-07-16. They have a buffer overflow via base64 data.'}] | 2020-05-19T17:13Z | 2018-07-17T17:29Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Kevin McCarthy | 2018-07-13 14:25:28-07:00 | Check outbuf length in mutt_to_base64()
The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c.
Thanks to Jeriko One for the bug report. | 6f163e07ae68654d7ac5268cbb7565f6df79ad85 | False | neomutt/neomutt | ✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat | 2015-12-21 02:12:54 | 2022-08-22 18:21:52 | https://neomutt.org/ | neomutt | 2535.0 | 261.0 | test_base64_lengths | test_base64_lengths( void) | ['void'] | void test_base64_lengths(void)
{
const char *in = "FuseMuse";
char out1[32];
char out2[32];
size_t enclen;
int declen;
/* Encoding a zero-length string should fail */
enclen = mutt_b64_encode(out1, in, 0, 32);
if (!TEST_CHECK(enclen == 0))
{
TEST_MSG("Expected: %zu", 0);
TEST_MSG("Actual : %zu", enclen);
}
/* Decoding a zero-length string should fail, too */
out1[0] = '\0';
declen = mutt_b64_decode(out2, out1);
if (!TEST_CHECK(declen == -1))
{
TEST_MSG("Expected: %zu", -1);
TEST_MSG("Actual : %zu", declen);
}
/* Encode one to eight bytes, check the lengths of the returned string */
for (size_t i = 1; i <= 8; ++i)
{
enclen = mutt_b64_encode(out1, in, i, 32);
size_t exp = ((i + 2) / 3) << 2;
if (!TEST_CHECK(enclen == exp))
{
TEST_MSG("Expected: %zu", exp);
TEST_MSG("Actual : %zu", enclen);
}
declen = mutt_b64_decode(out2, out1);
if (!TEST_CHECK(declen == i))
{
TEST_MSG("Expected: %zu", i);
TEST_MSG("Actual : %zu", declen);
}
out2[declen] = '\0';
if (!TEST_CHECK(strncmp(out2, in, i) == 0))
{
TEST_MSG("Expected: %s", in);
TEST_MSG("Actual : %s", out2);
}
}
} | 260 | True | 1 |
CVE-2018-15503 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/swoole/swoole-src/issues/1882', 'name': 'https://github.com/swoole/swoole-src/issues/1882', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://github.com/swoole/swoole-src/commit/4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76', 'name': 'https://github.com/swoole/swoole-src/commit/4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://x-c3ll.github.io/posts/swoole-deserialization-cve-2018-15503/', 'name': 'https://x-c3ll.github.io/posts/swoole-deserialization-cve-2018-15503/', 'refsource': 'MISC', 'tags': ['Technical Description', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-502'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:swoole:swoole:4.0.4:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The unpack implementation in Swoole version 4.0.4 lacks correct size checks in the deserialization process. An attacker can craft a serialized object to exploit this vulnerability and cause a SEGV.'}] | 2018-11-08T20:49Z | 2018-08-18T02:29Z | Deserialization of Untrusted Data | The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid. |
It is often convenient to serialize objects for communication or to save them for later use. However, deserialized data or code can often be modified without using the provided accessor functions if it does not use cryptography to protect itself. Furthermore, any cryptography would still be client-side security -- which is a dangerous security assumption.
Data that is untrusted can not be trusted to be well-formed.
When developers place no restrictions on "gadget chains," or series of instances and method invocations that can self-execute during the deserialization process (i.e., before the object is returned to the caller), it is sometimes possible for attackers to leverage them to perform unauthorized actions, like generating a shell.
| https://cwe.mitre.org/data/definitions/502.html | 0 | GXhua | 2018-08-15 19:21:06+08:00 | add buffer end check | 4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76 | False | swoole/swoole-src | 🚀 Coroutine-based concurrency library for PHP | 2012-07-21 13:49:59 | 2022-08-25 14:27:15 | https://www.swoole.com | swoole | 17549.0 | 3189.0 | php_swoole_unserialize | php_swoole_unserialize( void * buffer , size_t len , zval * return_value , zval * object_args , long flag) | ['buffer', 'len', 'return_value', 'object_args', 'flag'] | PHPAPI int php_swoole_unserialize(void *buffer, size_t len, zval *return_value, zval *object_args, long flag)
{
SBucketType type = *(SBucketType*) (buffer);
zend_uchar real_type = type.data_type;
buffer += sizeof (SBucketType);
switch (real_type)
{
case IS_NULL:
case IS_TRUE:
case IS_FALSE:
Z_TYPE_INFO_P(return_value) = real_type;
break;
case IS_LONG:
swoole_unserialize_long(buffer, return_value, type);
Z_TYPE_INFO_P(return_value) = real_type;
break;
case IS_DOUBLE:
swoole_unserialize_raw(buffer, return_value);
Z_TYPE_INFO_P(return_value) = real_type;
break;
case IS_STRING:
len -= sizeof (SBucketType);
zend_string *str = swoole_unserialize_string(buffer, len);
ZVAL_STR(return_value, str);
break;
case IS_ARRAY:
{
if (swoole_seria_check_eof(buffer, len) < 0)
{
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "detect the error eof");
return SW_FALSE;
}
unser_start = buffer - sizeof (SBucketType);
uint32_t num = 0;
buffer = get_array_real_len(buffer, type.data_len, &num);
if (!swoole_unserialize_arr(buffer, return_value, num, flag))
{
return SW_FALSE;
}
break;
}
case IS_UNDEF:
if (swoole_seria_check_eof(buffer, len) < 0)
{
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "detect the error eof");
return SW_FALSE;
}
unser_start = buffer - sizeof (SBucketType);
if (!swoole_unserialize_object(buffer, return_value, type.data_len, object_args, flag))
{
return SW_FALSE;
}
break;
default:
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "the type is not supported by swoole serialize.");
return SW_FALSE;
}
return SW_TRUE;
} | 303 | True | 1 |
CVE-2018-15503 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/swoole/swoole-src/issues/1882', 'name': 'https://github.com/swoole/swoole-src/issues/1882', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://github.com/swoole/swoole-src/commit/4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76', 'name': 'https://github.com/swoole/swoole-src/commit/4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://x-c3ll.github.io/posts/swoole-deserialization-cve-2018-15503/', 'name': 'https://x-c3ll.github.io/posts/swoole-deserialization-cve-2018-15503/', 'refsource': 'MISC', 'tags': ['Technical Description', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-502'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:swoole:swoole:4.0.4:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The unpack implementation in Swoole version 4.0.4 lacks correct size checks in the deserialization process. An attacker can craft a serialized object to exploit this vulnerability and cause a SEGV.'}] | 2018-11-08T20:49Z | 2018-08-18T02:29Z | Deserialization of Untrusted Data | The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid. |
It is often convenient to serialize objects for communication or to save them for later use. However, deserialized data or code can often be modified without using the provided accessor functions if it does not use cryptography to protect itself. Furthermore, any cryptography would still be client-side security -- which is a dangerous security assumption.
Data that is untrusted can not be trusted to be well-formed.
When developers place no restrictions on "gadget chains," or series of instances and method invocations that can self-execute during the deserialization process (i.e., before the object is returned to the caller), it is sometimes possible for attackers to leverage them to perform unauthorized actions, like generating a shell.
| https://cwe.mitre.org/data/definitions/502.html | 0 | GXhua | 2018-08-15 19:21:06+08:00 | add buffer end check | 4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76 | False | swoole/swoole-src | 🚀 Coroutine-based concurrency library for PHP | 2012-07-21 13:49:59 | 2022-08-25 14:27:15 | https://www.swoole.com | swoole | 17549.0 | 3189.0 | swoole_mini_memcpy | swoole_mini_memcpy( void * dst , const void * src , size_t len) | ['dst', 'src', 'len'] | void CPINLINE swoole_mini_memcpy(void *dst, const void *src, size_t len)
{
register unsigned char *dd = (unsigned char*) dst + len;
register const unsigned char *ss = (const unsigned char*) src + len;
switch (len)
{
case 68: *((int*) (dd - 68)) = *((int*) (ss - 68));
/* no break */
case 64: *((int*) (dd - 64)) = *((int*) (ss - 64));
/* no break */
case 60: *((int*) (dd - 60)) = *((int*) (ss - 60));
/* no break */
case 56: *((int*) (dd - 56)) = *((int*) (ss - 56));
/* no break */
case 52: *((int*) (dd - 52)) = *((int*) (ss - 52));
/* no break */
case 48: *((int*) (dd - 48)) = *((int*) (ss - 48));
/* no break */
case 44: *((int*) (dd - 44)) = *((int*) (ss - 44));
/* no break */
case 40: *((int*) (dd - 40)) = *((int*) (ss - 40));
/* no break */
case 36: *((int*) (dd - 36)) = *((int*) (ss - 36));
/* no break */
case 32: *((int*) (dd - 32)) = *((int*) (ss - 32));
/* no break */
case 28: *((int*) (dd - 28)) = *((int*) (ss - 28));
/* no break */
case 24: *((int*) (dd - 24)) = *((int*) (ss - 24));
/* no break */
case 20: *((int*) (dd - 20)) = *((int*) (ss - 20));
/* no break */
case 16: *((int*) (dd - 16)) = *((int*) (ss - 16));
/* no break */
case 12: *((int*) (dd - 12)) = *((int*) (ss - 12));
/* no break */
case 8: *((int*) (dd - 8)) = *((int*) (ss - 8));
/* no break */
case 4: *((int*) (dd - 4)) = *((int*) (ss - 4));
break;
case 67: *((int*) (dd - 67)) = *((int*) (ss - 67));
/* no break */
case 63: *((int*) (dd - 63)) = *((int*) (ss - 63));
/* no break */
case 59: *((int*) (dd - 59)) = *((int*) (ss - 59));
/* no break */
case 55: *((int*) (dd - 55)) = *((int*) (ss - 55));
/* no break */
case 51: *((int*) (dd - 51)) = *((int*) (ss - 51));
/* no break */
case 47: *((int*) (dd - 47)) = *((int*) (ss - 47));
/* no break */
case 43: *((int*) (dd - 43)) = *((int*) (ss - 43));
/* no break */
case 39: *((int*) (dd - 39)) = *((int*) (ss - 39));
/* no break */
case 35: *((int*) (dd - 35)) = *((int*) (ss - 35));
/* no break */
case 31: *((int*) (dd - 31)) = *((int*) (ss - 31));
/* no break */
case 27: *((int*) (dd - 27)) = *((int*) (ss - 27));
/* no break */
case 23: *((int*) (dd - 23)) = *((int*) (ss - 23));
/* no break */
case 19: *((int*) (dd - 19)) = *((int*) (ss - 19));
/* no break */
case 15: *((int*) (dd - 15)) = *((int*) (ss - 15));
/* no break */
case 11: *((int*) (dd - 11)) = *((int*) (ss - 11));
/* no break */
case 7: *((int*) (dd - 7)) = *((int*) (ss - 7));
*((int*) (dd - 4)) = *((int*) (ss - 4));
break;
case 3: *((short*) (dd - 3)) = *((short*) (ss - 3));
dd[-1] = ss[-1];
break;
case 66: *((int*) (dd - 66)) = *((int*) (ss - 66));
/* no break */
case 62: *((int*) (dd - 62)) = *((int*) (ss - 62));
/* no break */
case 58: *((int*) (dd - 58)) = *((int*) (ss - 58));
/* no break */
case 54: *((int*) (dd - 54)) = *((int*) (ss - 54));
/* no break */
case 50: *((int*) (dd - 50)) = *((int*) (ss - 50));
/* no break */
case 46: *((int*) (dd - 46)) = *((int*) (ss - 46));
/* no break */
case 42: *((int*) (dd - 42)) = *((int*) (ss - 42));
/* no break */
case 38: *((int*) (dd - 38)) = *((int*) (ss - 38));
/* no break */
case 34: *((int*) (dd - 34)) = *((int*) (ss - 34));
/* no break */
case 30: *((int*) (dd - 30)) = *((int*) (ss - 30));
/* no break */
case 26: *((int*) (dd - 26)) = *((int*) (ss - 26));
/* no break */
case 22: *((int*) (dd - 22)) = *((int*) (ss - 22));
/* no break */
case 18: *((int*) (dd - 18)) = *((int*) (ss - 18));
/* no break */
case 14: *((int*) (dd - 14)) = *((int*) (ss - 14));
/* no break */
case 10: *((int*) (dd - 10)) = *((int*) (ss - 10));
/* no break */
case 6: *((int*) (dd - 6)) = *((int*) (ss - 6));
/* no break */
case 2: *((short*) (dd - 2)) = *((short*) (ss - 2));
break;
case 65: *((int*) (dd - 65)) = *((int*) (ss - 65));
/* no break */
case 61: *((int*) (dd - 61)) = *((int*) (ss - 61));
/* no break */
case 57: *((int*) (dd - 57)) = *((int*) (ss - 57));
/* no break */
case 53: *((int*) (dd - 53)) = *((int*) (ss - 53));
/* no break */
case 49: *((int*) (dd - 49)) = *((int*) (ss - 49));
/* no break */
case 45: *((int*) (dd - 45)) = *((int*) (ss - 45));
/* no break */
case 41: *((int*) (dd - 41)) = *((int*) (ss - 41));
/* no break */
case 37: *((int*) (dd - 37)) = *((int*) (ss - 37));
/* no break */
case 33: *((int*) (dd - 33)) = *((int*) (ss - 33));
/* no break */
case 29: *((int*) (dd - 29)) = *((int*) (ss - 29));
/* no break */
case 25: *((int*) (dd - 25)) = *((int*) (ss - 25));
/* no break */
case 21: *((int*) (dd - 21)) = *((int*) (ss - 21));
/* no break */
case 17: *((int*) (dd - 17)) = *((int*) (ss - 17));
/* no break */
case 13: *((int*) (dd - 13)) = *((int*) (ss - 13));
/* no break */
case 9: *((int*) (dd - 9)) = *((int*) (ss - 9));
/* no break */
case 5: *((int*) (dd - 5)) = *((int*) (ss - 5));
/* no break */
case 1: dd[-1] = ss[-1];
break;
case 0:
default: break;
}
} | 2067 | True | 1 |
CVE-2018-15503 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/swoole/swoole-src/issues/1882', 'name': 'https://github.com/swoole/swoole-src/issues/1882', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://github.com/swoole/swoole-src/commit/4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76', 'name': 'https://github.com/swoole/swoole-src/commit/4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://x-c3ll.github.io/posts/swoole-deserialization-cve-2018-15503/', 'name': 'https://x-c3ll.github.io/posts/swoole-deserialization-cve-2018-15503/', 'refsource': 'MISC', 'tags': ['Technical Description', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-502'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:swoole:swoole:4.0.4:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The unpack implementation in Swoole version 4.0.4 lacks correct size checks in the deserialization process. An attacker can craft a serialized object to exploit this vulnerability and cause a SEGV.'}] | 2018-11-08T20:49Z | 2018-08-18T02:29Z | Deserialization of Untrusted Data | The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid. |
It is often convenient to serialize objects for communication or to save them for later use. However, deserialized data or code can often be modified without using the provided accessor functions if it does not use cryptography to protect itself. Furthermore, any cryptography would still be client-side security -- which is a dangerous security assumption.
Data that is untrusted can not be trusted to be well-formed.
When developers place no restrictions on "gadget chains," or series of instances and method invocations that can self-execute during the deserialization process (i.e., before the object is returned to the caller), it is sometimes possible for attackers to leverage them to perform unauthorized actions, like generating a shell.
| https://cwe.mitre.org/data/definitions/502.html | 0 | GXhua | 2018-08-15 19:21:06+08:00 | add buffer end check | 4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76 | False | swoole/swoole-src | 🚀 Coroutine-based concurrency library for PHP | 2012-07-21 13:49:59 | 2022-08-25 14:27:15 | https://www.swoole.com | swoole | 17549.0 | 3189.0 | swoole_serialize_arr | swoole_serialize_arr( seriaString * buffer , zend_array * zvalue) | ['buffer', 'zvalue'] | static void swoole_serialize_arr(seriaString *buffer, zend_array *zvalue)
{
zval *data;
zend_string *key;
zend_ulong index;
swPoolstr *swStr = NULL;
zend_uchar is_pack = zvalue->u.flags & HASH_FLAG_PACKED;
ZEND_HASH_FOREACH_KEY_VAL(zvalue, index, key, data)
{
SBucketType type = {0};
type.data_type = Z_TYPE_P(data);
//start point
size_t p = buffer->offset;
if (is_pack && zvalue->nNextFreeElement == zvalue->nNumOfElements)
{
type.key_type = KEY_TYPE_INDEX;
type.key_len = 0;
SERIA_SET_ENTRY_TYPE(buffer, type);
}
else
{
//seria key
if (key)
{
type.key_type = KEY_TYPE_STRING;
if ((swStr = swoole_mini_filter_find(key)))
{
type.key_len = 3; //means use same string
SERIA_SET_ENTRY_TYPE(buffer, type);
if (swStr->offset & 4)
{
SERIA_SET_ENTRY_SIZE4(buffer, swStr->offset);
}
else
{
SERIA_SET_ENTRY_SHORT(buffer, swStr->offset);
}
}
else
{
if (key->len <= 0xff)
{
type.key_len = 1;
SERIA_SET_ENTRY_TYPE(buffer, type);
swoole_mini_filter_add(key, buffer->offset, 1);
SERIA_SET_ENTRY_TYPE(buffer, key->len);
swoole_string_cpy(buffer, key->val, key->len);
}
else if (key->len <= 0xffff)
{//if more than this don't need optimize
type.key_len = 2;
SERIA_SET_ENTRY_TYPE(buffer, type);
swoole_mini_filter_add(key, buffer->offset, 2);
SERIA_SET_ENTRY_SHORT(buffer, key->len);
swoole_string_cpy(buffer, key->val, key->len);
}
else
{
type.key_len = 0;
SERIA_SET_ENTRY_TYPE(buffer, type);
swoole_mini_filter_add(key, buffer->offset, 3);
swoole_string_cpy(buffer, key + XtOffsetOf(zend_string, len), sizeof (size_t) + key->len);
}
}
}
else
{
type.key_type = KEY_TYPE_INDEX;
if (index <= 0xff)
{
type.key_len = 1;
SERIA_SET_ENTRY_TYPE(buffer, type);
SERIA_SET_ENTRY_TYPE(buffer, index);
}
else if (index <= 0xffff)
{
type.key_len = 2;
SERIA_SET_ENTRY_TYPE(buffer, type);
SERIA_SET_ENTRY_SHORT(buffer, index);
}
else
{
type.key_len = 3;
SERIA_SET_ENTRY_TYPE(buffer, type);
SERIA_SET_ENTRY_ULONG(buffer, index);
}
}
}
//seria data
try_again:
switch (Z_TYPE_P(data))
{
case IS_STRING:
{
if ((swStr = swoole_mini_filter_find(Z_STR_P(data))))
{
((SBucketType*) (buffer->buffer + p))->data_len = 3; //means use same string
if (swStr->offset & 4)
{
SERIA_SET_ENTRY_SIZE4(buffer, swStr->offset);
}
else
{
SERIA_SET_ENTRY_SHORT(buffer, swStr->offset);
}
}
else
{
if (Z_STRLEN_P(data) <= 0xff)
{
((SBucketType*) (buffer->buffer + p))->data_len = 1;
swoole_mini_filter_add(Z_STR_P(data), buffer->offset, 1);
SERIA_SET_ENTRY_TYPE(buffer, Z_STRLEN_P(data));
swoole_string_cpy(buffer, Z_STRVAL_P(data), Z_STRLEN_P(data));
}
else if (Z_STRLEN_P(data) <= 0xffff)
{
((SBucketType*) (buffer->buffer + p))->data_len = 2;
swoole_mini_filter_add(Z_STR_P(data), buffer->offset, 2);
SERIA_SET_ENTRY_SHORT(buffer, Z_STRLEN_P(data));
swoole_string_cpy(buffer, Z_STRVAL_P(data), Z_STRLEN_P(data));
}
else
{//if more than this don't need optimize
((SBucketType*) (buffer->buffer + p))->data_len = 0;
swoole_mini_filter_add(Z_STR_P(data), buffer->offset, 3);
swoole_string_cpy(buffer, (char*) Z_STR_P(data) + XtOffsetOf(zend_string, len), sizeof (size_t) + Z_STRLEN_P(data));
}
}
break;
}
case IS_LONG:
{
SBucketType* long_type = (SBucketType*) (buffer->buffer + p);
swoole_serialize_long(buffer, data, long_type);
break;
}
case IS_DOUBLE:
swoole_set_zend_value(buffer, &(data->value));
break;
case IS_REFERENCE:
data = Z_REFVAL_P(data);
((SBucketType*) (buffer->buffer + p))->data_type = Z_TYPE_P(data);
goto try_again;
break;
case IS_ARRAY:
{
zend_array *ht = Z_ARRVAL_P(data);
if (GC_IS_RECURSIVE(ht))
{
((SBucketType*) (buffer->buffer + p))->data_type = IS_NULL;//reset type null
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "the array has cycle ref");
}
else
{
seria_array_type(ht, buffer, p, buffer->offset);
if (ZEND_HASH_APPLY_PROTECTION(ht))
{
GC_PROTECT_RECURSION(ht);
swoole_serialize_arr(buffer, ht);
GC_UNPROTECT_RECURSION(ht);
}
else
{
swoole_serialize_arr(buffer, ht);
}
}
break;
}
//object propterty table is this type
case IS_INDIRECT:
data = Z_INDIRECT_P(data);
zend_uchar type = Z_TYPE_P(data);
((SBucketType*) (buffer->buffer + p))->data_type = (type == IS_UNDEF ? IS_NULL : type);
goto try_again;
break;
case IS_OBJECT:
{
/*
* layout
* type | key | namelen | name | bucket len |buckets
*/
((SBucketType*) (buffer->buffer + p))->data_type = IS_UNDEF;
if (ZEND_HASH_APPLY_PROTECTION(Z_OBJPROP_P(data)))
{
GC_PROTECT_RECURSION(Z_OBJPROP_P(data));
swoole_serialize_object(buffer, data, p);
GC_UNPROTECT_RECURSION(Z_OBJPROP_P(data));
}
else
{
swoole_serialize_object(buffer, data, p);
}
break;
}
default://
break;
}
}
ZEND_HASH_FOREACH_END();
} | 1045 | True | 1 |
CVE-2018-15503 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/swoole/swoole-src/issues/1882', 'name': 'https://github.com/swoole/swoole-src/issues/1882', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://github.com/swoole/swoole-src/commit/4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76', 'name': 'https://github.com/swoole/swoole-src/commit/4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://x-c3ll.github.io/posts/swoole-deserialization-cve-2018-15503/', 'name': 'https://x-c3ll.github.io/posts/swoole-deserialization-cve-2018-15503/', 'refsource': 'MISC', 'tags': ['Technical Description', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-502'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:swoole:swoole:4.0.4:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The unpack implementation in Swoole version 4.0.4 lacks correct size checks in the deserialization process. An attacker can craft a serialized object to exploit this vulnerability and cause a SEGV.'}] | 2018-11-08T20:49Z | 2018-08-18T02:29Z | Deserialization of Untrusted Data | The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid. |
It is often convenient to serialize objects for communication or to save them for later use. However, deserialized data or code can often be modified without using the provided accessor functions if it does not use cryptography to protect itself. Furthermore, any cryptography would still be client-side security -- which is a dangerous security assumption.
Data that is untrusted can not be trusted to be well-formed.
When developers place no restrictions on "gadget chains," or series of instances and method invocations that can self-execute during the deserialization process (i.e., before the object is returned to the caller), it is sometimes possible for attackers to leverage them to perform unauthorized actions, like generating a shell.
| https://cwe.mitre.org/data/definitions/502.html | 0 | GXhua | 2018-08-15 19:21:06+08:00 | add buffer end check | 4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76 | False | swoole/swoole-src | 🚀 Coroutine-based concurrency library for PHP | 2012-07-21 13:49:59 | 2022-08-25 14:27:15 | https://www.swoole.com | swoole | 17549.0 | 3189.0 | swoole_try_get_ce | swoole_try_get_ce( zend_string * class_name) | ['class_name'] | static CPINLINE zend_class_entry* swoole_try_get_ce(zend_string *class_name)
{
//user class , do not support incomplete class now
zend_class_entry *ce = zend_lookup_class(class_name);
if (ce)
{
return ce;
}
// try call unserialize callback and retry lookup
zval user_func, args[1], retval;
/* Check for unserialize callback */
if ((PG(unserialize_callback_func) == NULL) || (PG(unserialize_callback_func)[0] == '\0'))
{
zend_throw_exception_ex(NULL, 0, "can not find class %s", class_name->val TSRMLS_CC);
return NULL;
}
zend_string *fname = swoole_string_init(ZEND_STRL(PG(unserialize_callback_func)));
Z_STR(user_func) = fname;
Z_TYPE_INFO(user_func) = IS_STRING_EX;
ZVAL_STR(&args[0], class_name);
call_user_function_ex(CG(function_table), NULL, &user_func, &retval, 1, args, 0, NULL);
swoole_string_release(fname);
//user class , do not support incomplete class now
ce = zend_lookup_class(class_name);
if (!ce)
{
zend_throw_exception_ex(NULL, 0, "can not find class %s", class_name->val TSRMLS_CC);
return NULL;
}
else
{
return ce;
}
} | 184 | True | 1 |
CVE-2018-15503 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | True | [{'url': 'https://github.com/swoole/swoole-src/issues/1882', 'name': 'https://github.com/swoole/swoole-src/issues/1882', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://github.com/swoole/swoole-src/commit/4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76', 'name': 'https://github.com/swoole/swoole-src/commit/4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://x-c3ll.github.io/posts/swoole-deserialization-cve-2018-15503/', 'name': 'https://x-c3ll.github.io/posts/swoole-deserialization-cve-2018-15503/', 'refsource': 'MISC', 'tags': ['Technical Description', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-502'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:swoole:swoole:4.0.4:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The unpack implementation in Swoole version 4.0.4 lacks correct size checks in the deserialization process. An attacker can craft a serialized object to exploit this vulnerability and cause a SEGV.'}] | 2018-11-08T20:49Z | 2018-08-18T02:29Z | Deserialization of Untrusted Data | The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid. |
It is often convenient to serialize objects for communication or to save them for later use. However, deserialized data or code can often be modified without using the provided accessor functions if it does not use cryptography to protect itself. Furthermore, any cryptography would still be client-side security -- which is a dangerous security assumption.
Data that is untrusted can not be trusted to be well-formed.
When developers place no restrictions on "gadget chains," or series of instances and method invocations that can self-execute during the deserialization process (i.e., before the object is returned to the caller), it is sometimes possible for attackers to leverage them to perform unauthorized actions, like generating a shell.
| https://cwe.mitre.org/data/definitions/502.html | 0 | GXhua | 2018-08-15 19:21:06+08:00 | add buffer end check | 4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76 | False | swoole/swoole-src | 🚀 Coroutine-based concurrency library for PHP | 2012-07-21 13:49:59 | 2022-08-25 14:27:15 | https://www.swoole.com | swoole | 17549.0 | 3189.0 | swoole_unserialize_object | swoole_unserialize_object( void * buffer , zval * return_value , zend_uchar bucket_len , zval * args , long flag) | ['buffer', 'return_value', 'bucket_len', 'args', 'flag'] | static void* swoole_unserialize_object(void *buffer, zval *return_value, zend_uchar bucket_len, zval *args, long flag)
{
zval property;
uint32_t arr_num = 0;
size_t name_len = *((unsigned short*) buffer);
if (!name_len)
{
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "illegal unserialize data");
return NULL;
}
buffer += 2;
zend_string *class_name;
if (flag == UNSERIALIZE_OBJECT_TO_STDCLASS)
{
class_name = swoole_string_init(ZEND_STRL("StdClass"));
}
else
{
class_name = swoole_string_init((char*) buffer, name_len);
}
buffer += name_len;
zend_class_entry *ce = swoole_try_get_ce(class_name);
swoole_string_release(class_name);
if (!ce)
{
return NULL;
}
buffer = get_array_real_len(buffer, bucket_len, &arr_num);
buffer = swoole_unserialize_arr(buffer, &property, arr_num, flag);
object_init_ex(return_value, ce);
zval *data,*d;
zend_string *key;
zend_ulong index;
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL(property), index, key, data)
{
const char *prop_name, *tmp;
size_t prop_len;
if (key)
{
if ((d = zend_hash_find(Z_OBJPROP_P(return_value), key)) != NULL)
{
if (Z_TYPE_P(d) == IS_INDIRECT)
{
d = Z_INDIRECT_P(d);
}
zval_dtor(d);
ZVAL_COPY(d, data);
}
else
{
zend_unmangle_property_name_ex(key, &tmp, &prop_name, &prop_len);
zend_update_property(ce, return_value, prop_name, prop_len, data);
}
// zend_hash_update(Z_OBJPROP_P(return_value),key,data);
// zend_update_property(ce, return_value, ZSTR_VAL(key), ZSTR_LEN(key), data);
}
else
{
zend_hash_next_index_insert(Z_OBJPROP_P(return_value), data);
}
}
ZEND_HASH_FOREACH_END();
zval_dtor(&property);
if (ce->constructor)
{
// zend_fcall_info fci = {0};
// zend_fcall_info_cache fcc = {0};
// fci.size = sizeof (zend_fcall_info);
// zval retval;
// ZVAL_UNDEF(&fci.function_name);
// fci.retval = &retval;
// fci.param_count = 0;
// fci.params = NULL;
// fci.no_separation = 1;
// fci.object = Z_OBJ_P(return_value);
//
// zend_fcall_info_args_ex(&fci, ce->constructor, args);
//
// fcc.initialized = 1;
// fcc.function_handler = ce->constructor;
// // fcc.calling_scope = EG(scope);
// fcc.called_scope = Z_OBJCE_P(return_value);
// fcc.object = Z_OBJ_P(return_value);
//
// if (zend_call_function(&fci, &fcc) == FAILURE)
// {
// zend_throw_exception_ex(NULL, 0, "could not call class constructor");
// }
// zend_fcall_info_args_clear(&fci, 1);
}
//call object __wakeup
if (zend_hash_str_exists(&ce->function_table, ZEND_STRL("__wakeup")))
{
zval ret, wakeup;
zend_string *fname = swoole_string_init(ZEND_STRL("__wakeup"));
Z_STR(wakeup) = fname;
Z_TYPE_INFO(wakeup) = IS_STRING_EX;
call_user_function_ex(CG(function_table), return_value, &wakeup, &ret, 0, NULL, 1, NULL);
swoole_string_release(fname);
zval_ptr_dtor(&ret);
}
return buffer;
} | 409 | True | 1 |
CVE-2018-15836 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:P/A:N | NETWORK | LOW | NONE | NONE | PARTIAL | NONE | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | HIGH | NONE | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://lists.openswan.org/pipermail/users/2018-August/023761.html', 'name': '[openswan-users] 20180824 Xelerance has released Openswan 2.6.50.1', 'refsource': 'MLIST', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/xelerance/Openswan/commit/0b460be9e287fd335c8ce58129c67bf06065ef51', 'name': 'https://github.com/xelerance/Openswan/commit/0b460be9e287fd335c8ce58129c67bf06065ef51', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/xelerance/Openswan/commit/9eaa6c2a823c1d2b58913506a15f9474bf857a3d', 'name': 'https://github.com/xelerance/Openswan/commit/9eaa6c2a823c1d2b58913506a15f9474bf857a3d', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-347'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xelerance:openswan:*:*:*:*:*:*:*:*', 'versionEndExcluding': '2.6.50.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In verify_signed_hash() in lib/liboswkeys/signatures.c in Openswan before 2.6.50.1, the RSA implementation does not verify the value of padding string during PKCS#1 v1.5 signature verification. Consequently, a remote attacker can forge signatures when small public exponents are being used. IKEv2 signature verification is affected when RAW RSA keys are used.'}] | 2019-01-10T17:52Z | 2018-09-26T21:29Z | Improper Verification of Cryptographic Signature | The software does not verify, or incorrectly verifies, the cryptographic signature for data. | https://cwe.mitre.org/data/definitions/347.html | 0 | Bart Trojanowski | 2018-08-14 14:06:37-04:00 | wo#7449 . verify padding contents for IKEv2 RSA sig check
Special thanks to Sze Yiu Chau of Purdue University ([email protected])
who reported the issue. | 9eaa6c2a823c1d2b58913506a15f9474bf857a3d | False | xelerance/Openswan | Openswan | 2013-01-11 15:39:38 | 2021-09-04 03:15:17 | null | xelerance | 779.0 | 192.0 | verify_signed_hash | verify_signed_hash( const struct RSA_public_key * k , u_char * s , unsigned int s_max_octets , u_char ** psig , size_t hash_len , const u_char * sig_val , size_t sig_len) | ['k', 's', 's_max_octets', 'psig', 'hash_len', 'sig_val', 'sig_len'] | err_t verify_signed_hash(const struct RSA_public_key *k
, u_char *s, unsigned int s_max_octets
, u_char **psig
, size_t hash_len
, const u_char *sig_val, size_t sig_len)
{
unsigned int padlen;
/* actual exponentiation; see PKCS#1 v2.0 5.1 */
{
chunk_t temp_s;
MP_INT c;
n_to_mpz(&c, sig_val, sig_len);
oswcrypto.mod_exp(&c, &c, &k->e, &k->n);
temp_s = mpz_to_n(&c, sig_len); /* back to octets */
if(s_max_octets < sig_len) {
return "2""exponentiation failed; too many octets";
}
memcpy(s, temp_s.ptr, sig_len);
pfree(temp_s.ptr);
mpz_clear(&c);
}
/* check signature contents */
/* verify padding (not including any DER digest info! */
padlen = sig_len - 3 - hash_len;
/* now check padding */
DBG(DBG_CRYPT,
DBG_dump("verify_sh decrypted SIG1:", s, sig_len));
DBG(DBG_CRYPT, DBG_log("pad_len calculated: %d hash_len: %d", padlen, (int)hash_len));
/* skip padding */
if(s[0] != 0x00
|| s[1] != 0x01
|| s[padlen+2] != 0x00) {
return "3""SIG padding does not check out";
}
s += padlen + 3;
(*psig) = s;
/* return SUCCESS */
return NULL;
} | 208 | True | 1 |
|
CVE-2018-15853 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | True | [{'url': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html', 'name': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/xkbcommon/libxkbcommon/commit/1f9d1248c07cda8aaff762429c0dce146de8632a', 'name': 'https://github.com/xkbcommon/libxkbcommon/commit/1f9d1248c07cda8aaff762429c0dce146de8632a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-1/', 'name': 'USN-3786-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-05', 'name': 'GLSA-201810-05', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-2/', 'name': 'USN-3786-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2079', 'name': 'RHSA-2019:2079', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-400'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon:xkbcommon:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.8.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon:libxkbcommon:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.8.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Endless recursion exists in xkbcomp/expr.c in xkbcommon and libxkbcommon before 0.8.1, which could be used by local attackers to crash xkbcommon users by supplying a crafted keymap file that triggers boolean negation.'}] | 2019-08-06T17:15Z | 2018-08-25T21:29Z | Uncontrolled Resource Consumption | The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. |
Limited resources include memory, file system storage, database connection pool entries, and CPU. If an attacker can trigger the allocation of these limited resources, but the number or size of the resources is not controlled, then the attacker could cause a denial of service that consumes all available resources. This would prevent valid users from accessing the software, and it could potentially have an impact on the surrounding environment. For example, a memory exhaustion attack against an application could slow down the application as well as its host operating system.
There are at least three distinct scenarios which can commonly lead to resource exhaustion:
Lack of throttling for the number of allocated resources
Losing all references to a resource before reaching the shutdown stage
Not closing/returning a resource after processing
Resource exhaustion problems are often result due to an incorrect implementation of the following situations:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for releasing the resource.
| https://cwe.mitre.org/data/definitions/400.html | 0 | Ran Benita | 2018-03-10 23:10:47+02:00 | xkbcomp: fix stack overflow when evaluating boolean negation
The expression evaluator would go into an infinite recursion when
evaluating something like this as a boolean: `!True`. Instead of
recursing to just `True` and negating, it recursed to `!True` itself
again.
Bug inherited from xkbcomp.
Caught with the afl fuzzer.
Signed-off-by: Ran Benita <[email protected]> | 1f9d1248c07cda8aaff762429c0dce146de8632a | False | xkbcommon/libxkbcommon | keymap handling library for toolkits and window systems | 2013-04-01 17:31:10 | 2022-07-15 04:55:01 | https://xkbcommon.org | xkbcommon | 180.0 | 83.0 | ExprResolveBoolean | ExprResolveBoolean( struct xkb_context * ctx , const ExprDef * expr , bool * set_rtrn) | ['ctx', 'expr', 'set_rtrn'] | ExprResolveBoolean(struct xkb_context *ctx, const ExprDef *expr,
bool *set_rtrn)
{
bool ok = false;
const char *ident;
switch (expr->expr.op) {
case EXPR_VALUE:
if (expr->expr.value_type != EXPR_TYPE_BOOLEAN) {
log_err(ctx,
"Found constant of type %s where boolean was expected\n",
expr_value_type_to_string(expr->expr.value_type));
return false;
}
*set_rtrn = expr->boolean.set;
return true;
case EXPR_IDENT:
ident = xkb_atom_text(ctx, expr->ident.ident);
if (ident) {
if (istreq(ident, "true") ||
istreq(ident, "yes") ||
istreq(ident, "on")) {
*set_rtrn = true;
return true;
}
else if (istreq(ident, "false") ||
istreq(ident, "no") ||
istreq(ident, "off")) {
*set_rtrn = false;
return true;
}
}
log_err(ctx, "Identifier \"%s\" of type boolean is unknown\n", ident);
return false;
case EXPR_FIELD_REF:
log_err(ctx, "Default \"%s.%s\" of type boolean is unknown\n",
xkb_atom_text(ctx, expr->field_ref.element),
xkb_atom_text(ctx, expr->field_ref.field));
return false;
case EXPR_INVERT:
case EXPR_NOT:
ok = ExprResolveBoolean(ctx, expr, set_rtrn);
if (ok)
*set_rtrn = !*set_rtrn;
return ok;
case EXPR_ADD:
case EXPR_SUBTRACT:
case EXPR_MULTIPLY:
case EXPR_DIVIDE:
case EXPR_ASSIGN:
case EXPR_NEGATE:
case EXPR_UNARY_PLUS:
log_err(ctx, "%s of boolean values not permitted\n",
expr_op_type_to_string(expr->expr.op));
break;
default:
log_wsgo(ctx, "Unknown operator %d in ResolveBoolean\n",
expr->expr.op);
break;
}
return false;
} | 310 | True | 1 |
CVE-2018-15855 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html', 'name': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/xkbcommon/libxkbcommon/commit/917636b1d0d70205a13f89062b95e3a0fc31d4ff', 'name': 'https://github.com/xkbcommon/libxkbcommon/commit/917636b1d0d70205a13f89062b95e3a0fc31d4ff', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-1/', 'name': 'USN-3786-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-05', 'name': 'GLSA-201810-05', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-2/', 'name': 'USN-3786-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2079', 'name': 'RHSA-2019:2079', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon_project:xkbcommon:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.8.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Unchecked NULL pointer usage in xkbcommon before 0.8.1 could be used by local attackers to crash (NULL pointer dereference) the xkbcommon parser by supplying a crafted keymap file, because the XkbFile for an xkb_geometry section was mishandled.'}] | 2019-08-06T17:15Z | 2018-08-25T21:29Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Ran Benita | 2018-03-11 17:07:06+02:00 | xkbcomp: fix crash when parsing an xkb_geometry section
xkb_geometry sections are ignored; previously the had done so by
returning NULL for the section's XkbFile, however some sections of the
code do not expect this. Instead, create an XkbFile for it, it will
never be processes and discarded later.
Caught with the afl fuzzer.
Signed-off-by: Ran Benita <[email protected]> | 917636b1d0d70205a13f89062b95e3a0fc31d4ff | False | xkbcommon/libxkbcommon | keymap handling library for toolkits and window systems | 2013-04-01 17:31:10 | 2022-07-15 04:55:01 | https://xkbcommon.org | xkbcommon | 180.0 | 83.0 | CompileKeymap | CompileKeymap( XkbFile * file , struct xkb_keymap * keymap , enum merge_mode merge) | ['file', 'keymap', 'merge'] | CompileKeymap(XkbFile *file, struct xkb_keymap *keymap, enum merge_mode merge)
{
bool ok;
XkbFile *files[LAST_KEYMAP_FILE_TYPE + 1] = { NULL };
enum xkb_file_type type;
struct xkb_context *ctx = keymap->ctx;
/* Collect section files and check for duplicates. */
for (file = (XkbFile *) file->defs; file;
file = (XkbFile *) file->common.next) {
if (file->file_type < FIRST_KEYMAP_FILE_TYPE ||
file->file_type > LAST_KEYMAP_FILE_TYPE) {
log_err(ctx, "Cannot define %s in a keymap file\n",
xkb_file_type_to_string(file->file_type));
continue;
}
if (files[file->file_type]) {
log_err(ctx,
"More than one %s section in keymap file; "
"All sections after the first ignored\n",
xkb_file_type_to_string(file->file_type));
continue;
}
files[file->file_type] = file;
}
/*
* Check that all required section were provided.
* Report everything before failing.
*/
ok = true;
for (type = FIRST_KEYMAP_FILE_TYPE;
type <= LAST_KEYMAP_FILE_TYPE;
type++) {
if (files[type] == NULL) {
log_err(ctx, "Required section %s missing from keymap\n",
xkb_file_type_to_string(type));
ok = false;
}
}
if (!ok)
return false;
/* Compile sections. */
for (type = FIRST_KEYMAP_FILE_TYPE;
type <= LAST_KEYMAP_FILE_TYPE;
type++) {
log_dbg(ctx, "Compiling %s \"%s\"\n",
xkb_file_type_to_string(type), files[type]->name);
ok = compile_file_fns[type](files[type], keymap, merge);
if (!ok) {
log_err(ctx, "Failed to compile %s\n",
xkb_file_type_to_string(type));
return false;
}
}
return UpdateDerivedKeymapFields(keymap);
} | 276 | True | 1 |
CVE-2018-15856 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | True | [{'url': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html', 'name': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/xkbcommon/libxkbcommon/commit/842e4351c2c97de6051cab6ce36b4a81e709a0e1', 'name': 'https://github.com/xkbcommon/libxkbcommon/commit/842e4351c2c97de6051cab6ce36b4a81e709a0e1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-1/', 'name': 'USN-3786-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-05', 'name': 'GLSA-201810-05', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-2/', 'name': 'USN-3786-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2079', 'name': 'RHSA-2019:2079', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-835'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon:xkbcommon:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.8.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An infinite loop when reaching EOL unexpectedly in compose/parser.c (aka the keymap parser) in xkbcommon before 0.8.1 could be used by local attackers to cause a denial of service during parsing of crafted keymap files.'}] | 2019-10-03T00:03Z | 2018-08-25T21:29Z | Loop with Unreachable Exit Condition ('Infinite Loop') | The program contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. | If the loop can be influenced by an attacker, this weakness could allow attackers to consume excessive resources such as CPU or memory.
| https://cwe.mitre.org/data/definitions/835.html | 0 | Ran Benita | 2018-03-12 09:43:55+02:00 | compose: fix infinite loop in parser on some inputs
The parser would enter an infinite loop if an unterminated keysym
literal occurs at EOF.
Found with the afl fuzzer.
Signed-off-by: Ran Benita <[email protected]> | 842e4351c2c97de6051cab6ce36b4a81e709a0e1 | False | xkbcommon/libxkbcommon | keymap handling library for toolkits and window systems | 2013-04-01 17:31:10 | 2022-07-15 04:55:01 | https://xkbcommon.org | xkbcommon | 180.0 | 83.0 | lex | lex( struct scanner * s , union lvalue * val) | ['s', 'val'] | lex(struct scanner *s, union lvalue *val)
{
skip_more_whitespace_and_comments:
/* Skip spaces. */
while (is_space(peek(s)))
if (next(s) == '\n')
return TOK_END_OF_LINE;
/* Skip comments. */
if (chr(s, '#')) {
skip_to_eol(s);
goto skip_more_whitespace_and_comments;
}
/* See if we're done. */
if (eof(s)) return TOK_END_OF_FILE;
/* New token. */
s->token_line = s->line;
s->token_column = s->column;
s->buf_pos = 0;
/* LHS Keysym. */
if (chr(s, '<')) {
while (peek(s) != '>' && !eol(s))
buf_append(s, next(s));
if (!chr(s, '>')) {
scanner_err(s, "unterminated keysym literal");
return TOK_ERROR;
}
if (!buf_append(s, '\0')) {
scanner_err(s, "keysym literal is too long");
return TOK_ERROR;
}
val->string.str = s->buf;
val->string.len = s->buf_pos;
return TOK_LHS_KEYSYM;
}
/* Colon. */
if (chr(s, ':'))
return TOK_COLON;
if (chr(s, '!'))
return TOK_BANG;
if (chr(s, '~'))
return TOK_TILDE;
/* String literal. */
if (chr(s, '\"')) {
while (!eof(s) && !eol(s) && peek(s) != '\"') {
if (chr(s, '\\')) {
uint8_t o;
if (chr(s, '\\')) {
buf_append(s, '\\');
}
else if (chr(s, '"')) {
buf_append(s, '"');
}
else if (chr(s, 'x') || chr(s, 'X')) {
if (hex(s, &o))
buf_append(s, (char) o);
else
scanner_warn(s, "illegal hexadecimal escape sequence in string literal");
}
else if (oct(s, &o)) {
buf_append(s, (char) o);
}
else {
scanner_warn(s, "unknown escape sequence (%c) in string literal", peek(s));
/* Ignore. */
}
} else {
buf_append(s, next(s));
}
}
if (!chr(s, '\"')) {
scanner_err(s, "unterminated string literal");
return TOK_ERROR;
}
if (!buf_append(s, '\0')) {
scanner_err(s, "string literal is too long");
return TOK_ERROR;
}
if (!is_valid_utf8(s->buf, s->buf_pos - 1)) {
scanner_err(s, "string literal is not a valid UTF-8 string");
return TOK_ERROR;
}
val->string.str = s->buf;
val->string.len = s->buf_pos;
return TOK_STRING;
}
/* Identifier or include. */
if (is_alpha(peek(s)) || peek(s) == '_') {
s->buf_pos = 0;
while (is_alnum(peek(s)) || peek(s) == '_')
buf_append(s, next(s));
if (!buf_append(s, '\0')) {
scanner_err(s, "identifier is too long");
return TOK_ERROR;
}
if (streq(s->buf, "include"))
return TOK_INCLUDE;
val->string.str = s->buf;
val->string.len = s->buf_pos;
return TOK_IDENT;
}
/* Discard rest of line. */
skip_to_eol(s);
scanner_err(s, "unrecognized token");
return TOK_ERROR;
} | 632 | True | 1 |
CVE-2018-15858 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | True | [{'url': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html', 'name': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/xkbcommon/libxkbcommon/commit/badb428e63387140720f22486b3acbd3d738859f', 'name': 'https://github.com/xkbcommon/libxkbcommon/commit/badb428e63387140720f22486b3acbd3d738859f', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-1/', 'name': 'USN-3786-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-05', 'name': 'GLSA-201810-05', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-2/', 'name': 'USN-3786-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon:xkbcommon:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.8.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon:libxkbcommon:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.8.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Unchecked NULL pointer usage when handling invalid aliases in CopyKeyAliasesToKeymap in xkbcomp/keycodes.c in xkbcommon before 0.8.1 could be used by local attackers to crash (NULL pointer dereference) the xkbcommon parser by supplying a crafted keymap file.'}] | 2019-03-19T17:34Z | 2018-08-25T21:29Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Peter Hutterer | 2018-07-23 11:48:35+10:00 | keycodes: don't try to copy zero key aliases
Move the aliases copy to within the (num_key_aliases > 0) block.
Passing info->aliases into this fuction with invalid aliases will
cause log messages but num_key_aliases stays on 0. The key_aliases array
is never allocated and remains NULL. We then loop through the aliases, causing
a null-pointer dereference.
Signed-off-by: Peter Hutterer <[email protected]> | badb428e63387140720f22486b3acbd3d738859f | False | xkbcommon/libxkbcommon | keymap handling library for toolkits and window systems | 2013-04-01 17:31:10 | 2022-07-15 04:55:01 | https://xkbcommon.org | xkbcommon | 180.0 | 83.0 | CopyKeyAliasesToKeymap | CopyKeyAliasesToKeymap( struct xkb_keymap * keymap , KeyNamesInfo * info) | ['keymap', 'info'] | CopyKeyAliasesToKeymap(struct xkb_keymap *keymap, KeyNamesInfo *info)
{
AliasInfo *alias;
unsigned i, num_key_aliases;
struct xkb_key_alias *key_aliases;
/*
* Do some sanity checking on the aliases. We can't do it before
* because keys and their aliases may be added out-of-order.
*/
num_key_aliases = 0;
darray_foreach(alias, info->aliases) {
/* Check that ->real is a key. */
if (!XkbKeyByName(keymap, alias->real, false)) {
log_vrb(info->ctx, 5,
"Attempt to alias %s to non-existent key %s; Ignored\n",
KeyNameText(info->ctx, alias->alias),
KeyNameText(info->ctx, alias->real));
alias->real = XKB_ATOM_NONE;
continue;
}
/* Check that ->alias is not a key. */
if (XkbKeyByName(keymap, alias->alias, false)) {
log_vrb(info->ctx, 5,
"Attempt to create alias with the name of a real key; "
"Alias \"%s = %s\" ignored\n",
KeyNameText(info->ctx, alias->alias),
KeyNameText(info->ctx, alias->real));
alias->real = XKB_ATOM_NONE;
continue;
}
num_key_aliases++;
}
/* Copy key aliases. */
key_aliases = NULL;
if (num_key_aliases > 0) {
key_aliases = calloc(num_key_aliases, sizeof(*key_aliases));
if (!key_aliases)
return false;
}
i = 0;
darray_foreach(alias, info->aliases) {
if (alias->real != XKB_ATOM_NONE) {
key_aliases[i].alias = alias->alias;
key_aliases[i].real = alias->real;
i++;
}
}
keymap->num_key_aliases = num_key_aliases;
keymap->key_aliases = key_aliases;
return true;
} | 255 | True | 1 |
CVE-2018-15857 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:P/A:P | LOCAL | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 4.6 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | True | [{'url': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html', 'name': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/xkbcommon/libxkbcommon/commit/c1e5ac16e77a21f87bdf3bc4dea61b037a17dddb', 'name': 'https://github.com/xkbcommon/libxkbcommon/commit/c1e5ac16e77a21f87bdf3bc4dea61b037a17dddb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-1/', 'name': 'USN-3786-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-05', 'name': 'GLSA-201810-05', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-2/', 'name': 'USN-3786-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2079', 'name': 'RHSA-2019:2079', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon:xkbcommon:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.8.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon:libxkbcommon:*:*:*:*:*:*:*:*', 'versionEndExcluding': '0.8.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An invalid free in ExprAppendMultiKeysymList in xkbcomp/ast-build.c in xkbcommon before 0.8.1 could be used by local attackers to crash xkbcommon keymap parsers or possibly have unspecified other impact by supplying a crafted keymap file.'}] | 2019-08-06T17:15Z | 2018-08-25T21:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Peter Hutterer | 2018-07-30 14:11:46+10:00 | xkbcomp: fix pointer value for FreeStmt
Signed-off-by: Peter Hutterer <[email protected]> | c1e5ac16e77a21f87bdf3bc4dea61b037a17dddb | False | xkbcommon/libxkbcommon | keymap handling library for toolkits and window systems | 2013-04-01 17:31:10 | 2022-07-15 04:55:01 | https://xkbcommon.org | xkbcommon | 180.0 | 83.0 | ExprAppendMultiKeysymList | ExprAppendMultiKeysymList( ExprDef * expr , ExprDef * append) | ['expr', 'append'] | ExprAppendMultiKeysymList(ExprDef *expr, ExprDef *append)
{
unsigned nSyms = darray_size(expr->keysym_list.syms);
unsigned numEntries = darray_size(append->keysym_list.syms);
darray_append(expr->keysym_list.symsMapIndex, nSyms);
darray_append(expr->keysym_list.symsNumEntries, numEntries);
darray_concat(expr->keysym_list.syms, append->keysym_list.syms);
FreeStmt((ParseCommon *) &append);
return expr;
} | 86 | True | 1 |
CVE-2018-15863 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | True | [{'url': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039243.html', 'name': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039243.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/xkbcommon/libxkbcommon/commit/96df3106d49438e442510c59acad306e94f3db4d', 'name': 'https://github.com/xkbcommon/libxkbcommon/commit/96df3106d49438e442510c59acad306e94f3db4d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-1/', 'name': 'USN-3786-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-05', 'name': 'GLSA-201810-05', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-2/', 'name': 'USN-3786-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2079', 'name': 'RHSA-2019:2079', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon:xkbcommon:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.8.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon:libxkbcommon:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.8.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Unchecked NULL pointer usage in ResolveStateAndPredicate in xkbcomp/compat.c in xkbcommon before 0.8.2 could be used by local attackers to crash (NULL pointer dereference) the xkbcommon parser by supplying a crafted keymap file with a no-op modmask expression.'}] | 2019-08-06T17:15Z | 2018-08-25T21:29Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Daniel Stone | 2017-06-26 17:12:29+01:00 | xkbcomp: Don't crash on no-op modmask expressions
If we have an expression of the form 'l1' in an interp section, we
unconditionally try to dereference its args, even if it has none.
Signed-off-by: Daniel Stone <[email protected]> | 96df3106d49438e442510c59acad306e94f3db4d | False | xkbcommon/libxkbcommon | keymap handling library for toolkits and window systems | 2013-04-01 17:31:10 | 2022-07-15 04:55:01 | https://xkbcommon.org | xkbcommon | 180.0 | 83.0 | ResolveStateAndPredicate | ResolveStateAndPredicate( ExprDef * expr , enum xkb_match_operation * pred_rtrn , xkb_mod_mask_t * mods_rtrn , CompatInfo * info) | ['expr', 'pred_rtrn', 'mods_rtrn', 'info'] | ResolveStateAndPredicate(ExprDef *expr, enum xkb_match_operation *pred_rtrn,
xkb_mod_mask_t *mods_rtrn, CompatInfo *info)
{
if (expr == NULL) {
*pred_rtrn = MATCH_ANY_OR_NONE;
*mods_rtrn = MOD_REAL_MASK_ALL;
return true;
}
*pred_rtrn = MATCH_EXACTLY;
if (expr->expr.op == EXPR_ACTION_DECL) {
const char *pred_txt = xkb_atom_text(info->ctx, expr->action.name);
if (!LookupString(symInterpretMatchMaskNames, pred_txt, pred_rtrn)) {
log_err(info->ctx,
"Illegal modifier predicate \"%s\"; Ignored\n", pred_txt);
return false;
}
expr = expr->action.args;
}
else if (expr->expr.op == EXPR_IDENT) {
const char *pred_txt = xkb_atom_text(info->ctx, expr->ident.ident);
if (pred_txt && istreq(pred_txt, "any")) {
*pred_rtrn = MATCH_ANY;
*mods_rtrn = MOD_REAL_MASK_ALL;
return true;
}
}
return ExprResolveModMask(info->ctx, expr, MOD_REAL, &info->mods,
mods_rtrn);
} | 189 | True | 1 |
CVE-2018-15861 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | True | [{'url': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039243.html', 'name': 'https://lists.freedesktop.org/archives/wayland-devel/2018-August/039243.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/xkbcommon/libxkbcommon/commit/38e1766bc6e20108948aec8a0b222a4bad0254e9', 'name': 'https://github.com/xkbcommon/libxkbcommon/commit/38e1766bc6e20108948aec8a0b222a4bad0254e9', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-1/', 'name': 'USN-3786-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://security.gentoo.org/glsa/201810-05', 'name': 'GLSA-201810-05', 'refsource': 'GENTOO', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3786-2/', 'name': 'USN-3786-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2079', 'name': 'RHSA-2019:2079', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon:xkbcommon:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.8.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:xkbcommon:libxkbcommon:*:*:*:*:*:*:*:*', 'versionEndIncluding': '0.8.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Unchecked NULL pointer usage in ExprResolveLhs in xkbcomp/expr.c in xkbcommon before 0.8.2 could be used by local attackers to crash (NULL pointer dereference) the xkbcommon parser by supplying a crafted keymap file that triggers an xkb_intern_atom failure.'}] | 2019-08-06T17:15Z | 2018-08-25T21:29Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Daniel Stone | 2017-06-26 17:21:45+01:00 | xkbcomp: Don't falsely promise from ExprResolveLhs
Every user of ExprReturnLhs goes on to unconditionally dereference the
field return, which can be NULL if xkb_intern_atom fails. Return false
if this is the case, so we fail safely.
testcase: splice geometry data into interp
Signed-off-by: Daniel Stone <[email protected]> | 38e1766bc6e20108948aec8a0b222a4bad0254e9 | False | xkbcommon/libxkbcommon | keymap handling library for toolkits and window systems | 2013-04-01 17:31:10 | 2022-07-15 04:55:01 | https://xkbcommon.org | xkbcommon | 180.0 | 83.0 | ExprResolveLhs | ExprResolveLhs( struct xkb_context * ctx , const ExprDef * expr , const char ** elem_rtrn , const char ** field_rtrn , ExprDef ** index_rtrn) | ['ctx', 'expr', 'elem_rtrn', 'field_rtrn', 'index_rtrn'] | ExprResolveLhs(struct xkb_context *ctx, const ExprDef *expr,
const char **elem_rtrn, const char **field_rtrn,
ExprDef **index_rtrn)
{
switch (expr->expr.op) {
case EXPR_IDENT:
*elem_rtrn = NULL;
*field_rtrn = xkb_atom_text(ctx, expr->ident.ident);
*index_rtrn = NULL;
return true;
case EXPR_FIELD_REF:
*elem_rtrn = xkb_atom_text(ctx, expr->field_ref.element);
*field_rtrn = xkb_atom_text(ctx, expr->field_ref.field);
*index_rtrn = NULL;
return true;
case EXPR_ARRAY_REF:
*elem_rtrn = xkb_atom_text(ctx, expr->array_ref.element);
*field_rtrn = xkb_atom_text(ctx, expr->array_ref.field);
*index_rtrn = expr->array_ref.entry;
return true;
default:
break;
}
log_wsgo(ctx, "Unexpected operator %d in ResolveLhs\n", expr->expr.op);
return false;
} | 170 | True | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.