func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { const TfLiteTensor* input = GetInput(context, node, kInputTensor); TfLiteTensor* output = GetOutput(context, node, kOutputTensor); TF_LITE_ENSURE_EQ(context, NumInputs(node), 1); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); TF_LITE_ENSURE_TY...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
135,502,329,697,958,610,000,000,000,000,000,000,000
10
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
check_for_unknown_arg(typval_T *args, int idx) { if (args[idx].v_type != VAR_UNKNOWN) { semsg(_(e_too_many_arguments), idx + 1); return FAIL; } return OK; }
0
[ "CWE-125", "CWE-122" ]
vim
1e56bda9048a9625bce6e660938c834c5c15b07d
258,961,499,555,488,670,000,000,000,000,000,000,000
9
patch 9.0.0104: going beyond allocated memory when evaluating string constant Problem: Going beyond allocated memory when evaluating string constant. Solution: Properly skip over <Key> form.
static inline void set_p4d(p4d_t *p4dp, p4d_t p4d) { p4dval_t val = native_p4d_val(p4d); PVOP_VCALL2(mmu.set_p4d, p4dp, val); }
0
[ "CWE-276" ]
linux
cadfad870154e14f745ec845708bc17d166065f2
144,247,368,782,114,390,000,000,000,000,000,000,000
6
x86/ioperm: Fix io bitmap invalidation on Xen PV tss_invalidate_io_bitmap() wasn't wired up properly through the pvop machinery, so the TSS and Xen's io bitmap would get out of sync whenever disabling a valid io bitmap. Add a new pvop for tss_invalidate_io_bitmap() to fix it. This is XSA-329. Fixes: 22fe5b0439dd ("...
int migrate_page(struct address_space *mapping, struct page *newpage, struct page *page, enum migrate_mode mode) { int rc; BUG_ON(PageWriteback(page)); /* Writeback must be complete */ rc = migrate_page_move_mapping(mapping, newpage, page, NULL, mode, 0); if (rc != MIGRATEPAGE_SUCCESS) return rc; migrate...
0
[ "CWE-476" ]
linux
42cb14b110a5698ccf26ce59c4441722605a3743
21,863,034,273,001,217,000,000,000,000,000,000,000
16
mm: migrate dirty page without clear_page_dirty_for_io etc clear_page_dirty_for_io() has accumulated writeback and memcg subtleties since v2.6.16 first introduced page migration; and the set_page_dirty() which completed its migration of PageDirty, later had to be moderated to __set_page_dirty_nobuffers(); then PageSwa...
int cil_resolve_classperms(struct cil_tree_node *current, struct cil_classperms *cp, void *extra_args) { int rc = SEPOL_ERR; struct cil_symtab_datum *datum = NULL; symtab_t *common_symtab = NULL; struct cil_class *class; rc = cil_resolve_name(current, cp->class_str, CIL_SYM_CLASSES, extra_args, &datum); if (rc !...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
333,712,609,451,184,800,000,000,000,000,000,000,000
30
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
static void rtps_util_add_coherent_set_general_cases_case( proto_tree *tree, tvbuff_t *tvb, guint64 coherent_seq_number, coherent_set_entity_info *coherent_set_entity_info_object) { coherent_set_entity_info *register_entry; proto_tree *marked_item_tree; coherent_set_info *coherent_set_info_entry; coher...
1
[ "CWE-401" ]
wireshark
33e63d19e5496c151bad69f65cdbc7cba2b4c211
318,000,594,690,029,620,000,000,000,000,000,000,000
85
RTPS: Fixup our coherent set map. coherent_set_tracking.coherent_set_registry_map uses a struct as a key, but the hash and comparison routines treat keys as a sequence of bytes. Make sure every key byte is initialized. Fixes #16994. Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead of creating ...
enum hrtimer_restart tcp_pace_kick(struct hrtimer *timer) { struct tcp_sock *tp = container_of(timer, struct tcp_sock, pacing_timer); struct sock *sk = (struct sock *)tp; tcp_tsq_handler(sk); sock_put(sk); return HRTIMER_NORESTART; }
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
69,386,802,595,675,740,000,000,000,000,000,000,000
10
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
static void cirrus_vga_mem_write(void *opaque, hwaddr addr, uint64_t mem_value, uint32_t size) { CirrusVGAState *s = opaque; unsigned bank_index; unsigned bank_offset; unsigned mode; if ((s->vga.sr[0x...
0
[ "CWE-119" ]
qemu
026aeffcb4752054830ba203020ed6eb05bcaba8
339,585,824,368,318,950,000,000,000,000,000,000,000
64
cirrus: stop passing around dst pointers in the blitter Instead pass around the address (aka offset into vga memory). Calculate the pointer in the rop_* functions, after applying the mask to the address, to make sure the address stays within the valid range. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-i...
int btrfs_end_transaction_throttle(struct btrfs_trans_handle *trans, struct btrfs_root *root) { int ret; ret = __btrfs_end_transaction(trans, root, 1); if (ret) return ret; return 0; }
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
112,172,428,685,803,630,000,000,000,000,000,000,000
10
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
static int mailimf_domain_parse(const char * message, size_t length, size_t * indx, char ** result) { int r; r = mailimf_dot_atom_parse(message, length, indx, result); switch (r) { case MAILIMF_NO_ERROR: return r; case MAILIMF_ERROR_PARSE: break; default: return r; } r = mailimf_do...
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
60,882,162,894,734,410,000,000,000,000,000,000,000
22
Fixed crash #274
proto_reg_handoff_fb_zero(void) { heur_dissector_add("tcp", dissect_fb_zero_heur, "FBZero (QUIC) over TCP", "fb_zero", proto_fb_zero, HEURISTIC_ENABLE); }
0
[ "CWE-835" ]
wireshark
3ff940652962c099b73ae3233322b8697b0d10ab
335,919,565,478,062,230,000,000,000,000,000,000,000
6
FBZERO: Make sure our offset advances. Make sure our offset advances so that we don't infinitely loop. Fixes #16887.
int paste_selection(struct tty_struct *tty) { struct vc_data *vc = tty->driver_data; int pasted = 0; unsigned int count; struct tty_ldisc *ld; DECLARE_WAITQUEUE(wait, current); acquire_console_sem(); poke_blanked_console(); release_console_sem(); ld = tty_ldisc_ref_wait(tty); add_wait_queue(&vc->paste_wa...
0
[ "CWE-399" ]
linux-2.6
878b8619f711280fd05845e21956434b5e588cc4
237,216,369,764,271,670,000,000,000,000,000,000,000
33
Fix memory corruption in console selection Fix an off-by-two memory error in console selection. The loop below goes from sel_start to sel_end (inclusive), so it writes one more character. This one more character was added to the allocated size (+1), but it was not multiplied by an UTF-8 multiplier. This patch fixes...
long VideoTrack::Parse(Segment* pSegment, const Info& info, long long element_start, long long element_size, VideoTrack*& pResult) { if (pResult) return -1; if (info.type != Track::kVideo) return -1; long long width = 0; long long height = 0; long long d...
1
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
211,506,726,147,143,800,000,000,000,000,000,000,000
130
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
static void xfrm_state_look_at(struct xfrm_policy *pol, struct xfrm_state *x, const struct flowi *fl, unsigned short family, struct xfrm_state **best, int *acq_in_progress, int *error) { /* Resolution logic: * 1. There is a valid state with matching selector. Done. * 2. Valid state wi...
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
303,615,985,701,533,250,000,000,000,000,000,000,000
36
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
static int hhf_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) { struct hhf_sched_data *q = qdisc_priv(sch); struct nlattr *tb[TCA_HHF_MAX + 1]; unsigned int qlen, prev_backlog; int err; u64 non_hh_quantum; u32 new_quantum = q->quantum; u32 new_hhf_non_hh_weight = q->hhf_non...
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
260,774,506,310,699,560,000,000,000,000,000,000,000
68
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
static int sfq_change(struct Qdisc *sch, struct nlattr *opt) { struct sfq_sched_data *q = qdisc_priv(sch); struct tc_sfq_qopt *ctl = nla_data(opt); struct tc_sfq_qopt_v1 *ctl_v1 = NULL; unsigned int qlen, dropped = 0; struct red_parms *p = NULL; struct sk_buff *to_free = NULL; struct sk_buff *tail = NULL; if (...
1
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
175,672,034,546,095,830,000,000,000,000,000,000,000
76
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
static void sas_unregister_ex_tree(struct asd_sas_port *port, struct domain_device *dev) { struct expander_device *ex = &dev->ex_dev; struct domain_device *child, *n; list_for_each_entry_safe(child, n, &ex->children, siblings) { set_bit(SAS_DEV_GONE, &child->state); if (child->dev_type == SAS_EDGE_EXPANDER_DEVI...
0
[ "CWE-399", "CWE-772" ]
linux
4a491b1ab11ca0556d2fda1ff1301e862a2d44c4
267,787,289,387,680,000,000,000,000,000,000,000,000
15
scsi: libsas: fix memory leak in sas_smp_get_phy_events() We've got a memory leak with the following producer: while true; do cat /sys/class/sas_phy/phy-1:0:12/invalid_dword_count >/dev/null; done The buffer req is allocated and not freed after we return. Fix it. Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") S...
bool check_single_table_access(THD *thd, ulong privilege, TABLE_LIST *tables, bool no_errors) { if (tables->derived) return 0; Switch_to_definer_security_ctx backup_sctx(thd, tables); const char *db_name; if ((tables->view || tables->field_translation) && !tables->schema_tab...
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
143,387,990,139,673,680,000,000,000,000,000,000,000
26
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
static void voice_compress(void) { struct VOICE_S *p_voice; struct SYMBOL *s, *s2, *s3, *ns; for (p_voice = first_voice; p_voice; p_voice = p_voice->next) { //8.7.0 - for fmt at end of music line // if (p_voice->ignore) // continue; p_voice->ignore = 0; for (s = p_voice->sym; s; s = s->next) { if (s->time...
0
[ "CWE-787" ]
abcm2ps
dc0372993674d0b50fedfbf7b9fad1239b8efc5f
228,125,516,395,162,730,000,000,000,000,000,000,000
143
fix: crash when too many accidentals in K: (signature + explicit) Issue #17.
XkbSendMap(ClientPtr client, XkbDescPtr xkb, xkbGetMapReply * rep) { unsigned i, len; char *desc, *start; len = (rep->length * 4) - (SIZEOF(xkbGetMapReply) - SIZEOF(xGenericReply)); start = desc = calloc(1, len); if (!start) return BadAlloc; if (rep->nTypes > 0) desc = XkbWriteK...
0
[ "CWE-119" ]
xserver
f7cd1276bbd4fe3a9700096dec33b52b8440788d
27,596,587,985,031,950,000,000,000,000,000,000,000
50
Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
qmp_guest_fstrim(bool has_minimum, int64_t minimum, Error **errp) { GuestFilesystemTrimResponse *resp; HANDLE handle; WCHAR guid[MAX_PATH] = L""; handle = FindFirstVolumeW(guid, ARRAYSIZE(guid)); if (handle == INVALID_HANDLE_VALUE) { error_setg_win32(errp, GetLastError(), "failed to find an...
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
231,272,101,735,160,530,000,000,000,000,000,000,000
96
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...
static js_Ast *shift(js_State *J) { js_Ast *a = additive(J); loop: if (jsP_accept(J, TK_SHL)) { a = EXP2(SHL, a, additive(J)); goto loop; } if (jsP_accept(J, TK_SHR)) { a = EXP2(SHR, a, additive(J)); goto loop; } if (jsP_accept(J, TK_USHR)) { a = EXP2(USHR, a, additive(J)); goto loop; } return a; }
1
[ "CWE-674" ]
mujs
4d45a96e57fbabf00a7378b337d0ddcace6f38c1
269,667,825,082,978,120,000,000,000,000,000,000,000
9
Guard binary expressions from too much recursion.
static bool io_get_sqring(struct io_ring_ctx *ctx, struct sqe_submit *s) { struct io_rings *rings = ctx->rings; u32 *sq_array = ctx->sq_array; unsigned head; /* * The cached sq head (or cq tail) serves two purposes: * * 1) allows us to batch the cost of updating the user visible * head updates. * 2) a...
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
268,983,096,095,413,300,000,000,000,000,000,000,000
34
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
static void analPaths(RzCoreAnalPaths *p, PJ *pj) { RzAnalysisBlock *cur = p->cur; if (!cur) { // eprintf ("eof\n"); return; } /* handle ^C */ if (rz_cons_is_breaked()) { return; } ht_uu_insert(p->visited, cur->addr, 1); rz_list_append(p->path, cur); if (p->followDepth && --p->followDepth == 0) { retur...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
241,715,606,139,547,730,000,000,000,000,000,000,000
45
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
bool LEX::check_main_unit_semantics() { if (unit.set_nest_level(0) || unit.check_parameters(first_select_lex())) return TRUE; if (check_cte_dependencies_and_resolve_references()) return TRUE; return FALSE; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
270,005,870,329,999,700,000,000,000,000,000,000,000
9
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static void free_statement(pdo_stmt_t *stmt TSRMLS_DC) { if (stmt->bound_params) { zend_hash_destroy(stmt->bound_params); FREE_HASHTABLE(stmt->bound_params); stmt->bound_params = NULL; } if (stmt->bound_param_map) { zend_hash_destroy(stmt->bound_param_map); FREE_HASHTABLE(stmt->bound_param_map); stmt->b...
0
[ "CWE-476" ]
php-src
6045de69c7dedcba3eadf7c4bba424b19c81d00d
298,568,554,363,269,500,000,000,000,000,000,000,000
53
Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle Proper soltion would be to call serialize/unserialize and deal with the result, but this requires more work that should be done by wddx maintainer (not me).
int my_wc_mb_utf8_escape_double_quote(CHARSET_INFO *cs, my_wc_t wc, uchar *str, uchar *end) { return my_wc_mb_utf8_escape(cs, wc, str, end, '"', 0); }
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
269,928,795,734,594,770,000,000,000,000,000,000,000
5
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
static void hide_next_step_button() { /* replace 'Forward' with 'Close' button */ /* 1. hide next button */ gtk_widget_hide(g_btn_next); /* 2. move close button to the last position */ gtk_box_set_child_packing(g_box_buttons, g_btn_close, false, false, 5, GTK_PACK_END); }
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
106,339,255,005,733,700,000,000,000,000,000,000,000
8
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...
const TracingConnectionManagerConfig* tracingConfig() override { return tracing_config_.get(); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
248,594,177,565,160,840,000,000,000,000,000,000,000
1
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static int __floppy_read_block_0(struct block_device *bdev, int drive) { struct bio bio; struct bio_vec bio_vec; struct page *page; struct rb0_cbdata cbdata; page = alloc_page(GFP_NOIO); if (!page) { process_fd_request(); return -ENOMEM; } cbdata.drive = drive; bio_init(&bio, bdev, &bio_vec, 1, REQ_OP_R...
0
[ "CWE-416" ]
linux
233087ca063686964a53c829d547c7571e3f67bf
205,035,959,855,820,200,000,000,000,000,000,000,000
34
floppy: disable FDRAWCMD by default Minh Yuan reported a concurrency use-after-free issue in the floppy code between raw_cmd_ioctl and seek_interrupt. [ It turns out this has been around, and that others have reported the KASAN splats over the years, but Minh Yuan had a reproducer for it and so gets primary credi...
static int invoke_bpf(const struct btf_func_model *m, u8 **pprog, struct bpf_tramp_progs *tp, int stack_size) { int i; u8 *prog = *pprog; for (i = 0; i < tp->nr_progs; i++) { if (invoke_bpf_prog(m, &prog, tp->progs[i], stack_size, false)) return -EINVAL; } *pprog = prog; return 0; }
0
[ "CWE-77" ]
linux
e4d4d456436bfb2fe412ee2cd489f7658449b098
162,176,795,582,506,080,000,000,000,000,000,000,000
13
bpf, x86: Validate computation of branch displacements for x86-64 The branch displacement logic in the BPF JIT compilers for x86 assumes that, for any generated branch instruction, the distance cannot increase between optimization passes. But this assumption can be violated due to how the distances are computed. Spec...
GF_Err colr_dump(GF_Box *a, FILE * trace) { GF_ColourInformationBox *ptr = (GF_ColourInformationBox *)a; if (!a) return GF_BAD_PARAM; gf_isom_box_dump_start(a, "ColourInformationBox", trace); fprintf(trace, "colour_type=\"%s\" colour_primaries=\"%d\" transfer_characteristics=\"%d\" matrix_coefficients=\"%d\" full_r...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
236,342,236,177,918,280,000,000,000,000,000,000,000
9
fixed 2 possible heap overflows (inc. #1088)
input_buffer& ServerHello::set(input_buffer& in) { return in >> *this; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
207,254,668,317,313,020,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
const char *CLASS foveon_camf_param(const char *block, const char *param) { unsigned idx, num; char *pos, *cp, *dp; for (idx = 0; idx < meta_length; idx += sget4(pos + 8)) { pos = meta_data + idx; if (strncmp(pos, "CMb", 3)) break; if (pos[3] != 'P') continue; if (strcmp(block, pos ...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
168,141,587,153,674,200,000,000,000,000,000,000,000
26
Secunia SA75000 advisory: several buffer overruns
afterTriggerCheckState(AfterTriggerShared evtshared) { Oid tgoid = evtshared->ats_tgoid; SetConstraintState state = afterTriggers->state; int i; /* * For not-deferrable triggers (i.e. normal AFTER ROW triggers and * constraints declared NOT DEFERRABLE), the state is always false. */ if ((evtshared->ats_...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
79,080,845,972,541,150,000,000,000,000,000,000,000
33
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
void* IOBuf::operator new(size_t /* size */, void* ptr) { return ptr; }
0
[ "CWE-787" ]
folly
4f304af1411e68851bdd00ef6140e9de4616f7d3
305,083,405,991,122,500,000,000,000,000,000,000,000
3
[folly] Add additional overflow checks to IOBuf - CVE-2021-24036 Summary: As per title CVE-2021-24036 Reviewed By: jan Differential Revision: D27938605 fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c
SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len, unsigned long, new_len, unsigned long, flags, unsigned long, new_addr) { unsigned long ret; down_write(&current->mm->mmap_sem); ret = do_mremap(addr, old_len, new_len, flags, new_addr); up_write(&current->mm->mmap_sem); return ret; }
0
[ "CWE-703", "CWE-189" ]
linux
982134ba62618c2d69fbbbd166d0a11ee3b7e3d8
235,473,269,106,799,130,000,000,000,000,000,000,000
11
mm: avoid wrapping vm_pgoff in mremap() The normal mmap paths all avoid creating a mapping where the pgoff inside the mapping could wrap around due to overflow. However, an expanding mremap() can take such a non-wrapping mapping and make it bigger and cause a wrapping condition. Noticed by Robert Swiecki when runnin...
s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr, unsigned short flags, char read_write, u8 command, int protocol, union i2c_smbus_data *data) { unsigned long orig_jiffies; int try; s32 res; /* If enabled, the following two tracepoints are conditional on * read_write and protocol. */ trace_s...
0
[ "CWE-787" ]
linux
89c6efa61f5709327ecfa24bff18e57a4e80c7fa
280,893,935,435,564,530,000,000,000,000,000,000,000
55
i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA On a I2C_SMBUS_I2C_BLOCK_DATA read request, if data->block[0] is greater than I2C_SMBUS_BLOCK_MAX + 1, the underlying I2C driver writes data out of the msgbuf1 array boundary. It is possible from a user application to run into that issue by calling the ...
xmlRelaxNGSimplify(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr cur, xmlRelaxNGDefinePtr parent) { xmlRelaxNGDefinePtr prev = NULL; while (cur != NULL) { if ((cur->type == XML_RELAXNG_REF) || (cur->type == XML_RELAXNG_PARENTREF)) { if (cur->depth != -3) {...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
14,529,081,392,613,010,000,000,000,000,000,000,000
157
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
static void add_slave_skip_errors(const uint* errors, uint n_errors) { DBUG_ENTER("add_slave_skip_errors"); DBUG_ASSERT(errors); DBUG_ASSERT(use_slave_mask); for (uint i = 0; i < n_errors; i++) { const uint err_code = errors[i]; if (err_code < MAX_SLAVE_ERROR) bitmap_set_bit(&slave_error_mask,...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
316,725,242,135,478,600,000,000,000,000,000,000,000
14
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
CImg<T> operator&(const CImg<t>& img) const { return (+*this)&=img; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
106,186,163,481,236,340,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int bnx2x_set_mac_one(struct bnx2x *bp, u8 *mac, struct bnx2x_vlan_mac_obj *obj, bool set, int mac_type, unsigned long *ramrod_flags) { int rc; struct bnx2x_vlan_mac_ramrod_params ramrod_param; memset(&ramrod_param, 0, sizeof(ramrod_param)); /* Fill general parameters */ ramrod_param.vlan_mac_obj...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
24,445,845,722,085,586,000,000,000,000,000,000,000
37
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
void MainWindow::on_actionYadifSpatial_triggered(bool checked) { changeDeinterlacer(checked, "yadif"); }
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
112,316,208,634,145,100,000,000,000,000,000,000,000
4
fix upgrade check is not using TLS correctly
i915_gem_context_create_gvt(struct drm_device *dev) { struct i915_gem_context *ctx; int ret; if (!IS_ENABLED(CONFIG_DRM_I915_GVT)) return ERR_PTR(-ENODEV); ret = i915_mutex_lock_interruptible(dev); if (ret) return ERR_PTR(ret); ctx = i915_gem_create_context(to_i915(dev)); if (IS_ERR(ctx)) goto out; ct...
0
[ "CWE-416" ]
linux
7dc40713618c884bf07c030d1ab1f47a9dc1f310
27,252,606,594,732,813,000,000,000,000,000,000,000
28
drm/i915: Introduce a mutex for file_priv->context_idr Define a mutex for the exclusive use of interacting with the per-file context-idr, that was previously guarded by struct_mutex. This allows us to reduce the coverage of struct_mutex, with a view to removing the last bits coordinating GEM context later. (In the sho...
option_add_generic_policy_cb (const gchar *option_name, const gchar *value, gpointer data, GError **error) { FlatpakContext *context = data; char *t; g_autofree char *key = NULL; const char *policy_value; t = st...
0
[ "CWE-94", "CWE-74" ]
flatpak
6e5ae7a109cdfa9735ea7ccbd8cb79f9e8d3ae8b
134,989,369,742,788,640,000,000,000,000,000,000,000
37
context: Add --env-fd option This allows environment variables to be added to the context without making their values visible to processes running under a different uid, which might be significant if the variable's value is a token or some other secret value. Signed-off-by: Simon McVittie <smcv@collabora.com> Part-of...
setup_autos (void) { static gboolean setup_autos = FALSE; if (!setup_autos) { setup_autos = TRUE; eel_preferences_add_auto_boolean (NAUTILUS_PREFERENCES_CONFIRM_TRASH, &confirm_trash_auto_value); } }
0
[]
nautilus
ca2fd475297946f163c32dcea897f25da892b89d
69,449,028,997,446,960,000,000,000,000,000,000,000
9
Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if th...
void update_process_times(int user_tick) { struct task_struct *p = current; /* Note: this timer irq context must be accounted for as well. */ account_process_tick(p, user_tick); run_local_timers(); rcu_sched_clock_irq(user_tick); #ifdef CONFIG_IRQ_WORK if (in_irq()) irq_work_tick(); #endif scheduler_tick(); ...
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
323,752,415,478,194,050,000,000,000,000,000,000,000
23
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
static int vhci_hcd_filter(const struct dirent *dirent) { return strcmp(dirent->d_name, "vhci_hcd") >= 0; }
0
[ "CWE-200" ]
linux
2f2d0088eb93db5c649d2a5e34a3800a8a935fc5
274,738,418,337,726,940,000,000,000,000,000,000,000
4
usbip: prevent vhci_hcd driver from leaking a socket pointer address When a client has a USB device attached over IP, the vhci_hcd driver is locally leaking a socket pointer address via the /sys/devices/platform/vhci_hcd/status file (world-readable) and in debug output when "usbip --debug port" is run. Fix it to not...
refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap, char relpersistence) { finish_heap_swap(matviewOid, OIDNewHeap, false, false, true, true, RecentXmin, ReadNextMultiXactId(), relpersistence); }
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
302,599,866,227,893,660,000,000,000,000,000,000,000
5
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
print_just_file_entry_details(Dwarf_Debug dbg, Dwarf_Line_Context line_context) { unsigned fiu = 0; Dwarf_File_Entry fe = line_context->lc_file_entries; Dwarf_File_Entry fe2 = fe; dwarfstring m3; dwarfstring_constructor_static(&m3,locallinebuf, sizeof(locallinebuf)); dwarfstring_app...
1
[]
libdwarf-code
faf99408e3f9f706fc3809dd400e831f989778d3
305,047,332,333,399,800,000,000,000,000,000,000,000
86
modified: libdwarf/dwarf_print_lines.c * dwarf_print_lines.c: In case of corrupted DWARF5 line header the fi_file_name field for a file entry can be null. Now we print a <no file name> string in that case to avoid passing a null to dwarfstring_append. Dwarfbug DW202010-003. Als...
mono_image_fill_module_table (MonoDomain *domain, MonoReflectionModuleBuilder *mb, MonoDynamicImage *assembly) { MonoDynamicTable *table; int i; table = &assembly->tables [MONO_TABLE_MODULE]; mb->table_idx = table->next_idx ++; table->values [mb->table_idx * MONO_MODULE_SIZE + MONO_MODULE_NAME] = string_heap_inse...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
28,064,129,325,173,726,000,000,000,000,000,000,000
16
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static bool torture_winbind_struct_list_trustdom(struct torture_context *torture) { struct winbindd_request req; struct winbindd_response rep; char *list1; char *list2; bool ok; struct torture_trust_domain *listd = NULL; uint32_t i; torture_comment(torture, "Running WINBINDD_LIST_TRUSTDOM (struct based)\n"); ...
0
[ "CWE-476" ]
samba
0b259a48a70bde4dfd482e0720e593ae5a9c414a
274,244,914,435,438,740,000,000,000,000,000,000,000
74
CVE-2020-14323 torture4: Add a simple test for invalid lookup_sids winbind call We can't add this test before the fix, add it to knownfail and have the fix remove the knownfail entry again. As this crashes winbind, many tests after this one will fail. Reported by Bas Alberts of the GitHub Security Lab Team as GHSL-20...
Expression::Parser makeConversionAlias(const StringData shortcutName, BSONType toType) { return [=](ExpressionContext* const expCtx, BSONElement elem, const VariablesParseState& vps) -> intrusive_ptr<Expression> { // Use parseArguments to allow for a singleton array, or the unw...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
147,915,273,606,136,020,000,000,000,000,000,000,000
14
SERVER-49404 Enforce additional checks in $arrayToObject
vte_sequence_handler_horizontal_and_vertical_position (VteTerminal *terminal, GValueArray *params) { vte_sequence_handler_offset(terminal, params, -1, vte_sequence_handler_cm); }
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
35,652,820,009,186,020,000,000,000,000,000,000,000
4
fix bug #548272 svn path=/trunk/; revision=2365
static int flattenSubquery( Parse *pParse, /* Parsing context */ Select *p, /* The parent or outer SELECT statement */ int iFrom, /* Index in p->pSrc->a[] of the inner subquery */ int isAgg /* True if outer SELECT uses aggregate functions */ ){ const char *zSavedAuthContex...
0
[ "CWE-476" ]
sqlite
396afe6f6aa90a31303c183e11b2b2d4b7956b35
72,132,402,538,504,380,000,000,000,000,000,000,000
395
Continue to back away from the LEFT JOIN optimization of check-in [41c27bc0ff1d3135] by disallowing query flattening if the outer query is DISTINCT. Without this fix, if an index scan is run on the table within the view on the right-hand side of the LEFT JOIN, stale result registers might be accessed yielding incorrec...
static long ns_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { struct user_namespace *user_ns; struct ns_common *ns = get_proc_ns(file_inode(filp)); uid_t __user *argp; uid_t uid; switch (ioctl) { case NS_GET_USERNS: return open_related_ns(ns, ns_get_owner); case NS_GET_PARENT: if (!ns-...
0
[ "CWE-416", "CWE-362" ]
linux
073c516ff73557a8f7315066856c04b50383ac34
109,163,228,301,494,230,000,000,000,000,000,000,000
28
nsfs: mark dentry with DCACHE_RCUACCESS Andrey reported a use-after-free in __ns_get_path(): spin_lock include/linux/spinlock.h:299 [inline] lockref_get_not_dead+0x19/0x80 lib/lockref.c:179 __ns_get_path+0x197/0x860 fs/nsfs.c:66 open_related_ns+0xda/0x200 fs/nsfs.c:143 sock_ioctl+0x39d/0x440 net/socket.c:10...
cmsBool _Remove2Op(cmsPipeline* Lut, cmsStageSignature Op1, cmsStageSignature Op2) { cmsStage** pt1; cmsStage** pt2; cmsBool AnyOpt = FALSE; pt1 = &Lut ->Elements; if (*pt1 == NULL) return AnyOpt; while (*pt1 != NULL) { pt2 = &((*pt1) -> Next); if (*pt2 == NULL) return AnyOpt;...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
111,986,103,575,531,920,000,000,000,000,000,000,000
25
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
static int cmpedges(const void *_a, const void *_b) { const RAnalFunction *a = _a, *b = _b; int as, bs; r_anal_function_count_edges (a, &as); r_anal_function_count_edges (b, &bs); return (as > bs)? 1: (as < bs)? -1: 0; }
0
[ "CWE-416" ]
radare2
10517e3ff0e609697eb8cde60ec8dc999ee5ea24
111,372,082,747,782,730,000,000,000,000,000,000,000
7
aaef on arm/thumb switches causes uaf ##crash * Reported by peacock-doris via huntr.dev * Reproducer: poc_uaf_r_reg_get
CImg<ulongT> _label(const unsigned int nb, const int *const dx, const int *const dy, const int *const dz, const Tfloat tolerance) const { CImg<ulongT> res(_width,_height,_depth,_spectrum); cimg_forC(*this,c) { CImg<ulongT> _res = res.get_shared_ch...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
234,216,015,309,210,930,000,000,000,000,000,000,000
60
.
static void print_section(char *text, u8 *addr, unsigned int length) { int i, offset; int newline = 1; char ascii[17]; ascii[16] = 0; for (i = 0; i < length; i++) { if (newline) { printk(KERN_ERR "%8s 0x%p: ", text, addr + i); newline = 0; } printk(KERN_CONT " %02x", addr[i]); offset = i % 16; as...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
59,874,402,257,149,460,000,000,000,000,000,000,000
31
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static CURLcode do_init(struct connectdata *conn) { struct SessionHandle *data = conn->data; struct SingleRequest *k = &data->req; conn->bits.done = FALSE; /* Curl_done() is not called yet */ conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to use */ data->state.expect100header = FALSE; ...
0
[ "CWE-200" ]
curl
b3875606925536f82fc61f3114ac42f29eaf6945
235,656,550,917,782,300,000,000,000,000,000,000,000
38
curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of bounds When duplicating a handle, the data to post was duplicated using strdup() when it could be binary and contain zeroes and it was not even zero terminated! This caused read out of bounds crashes/segfaults. Since the lib/strdup.c file no longer is easily sha...
static bool parse_notify(struct pool *pool, json_t *val) { char *job_id, *prev_hash, *coinbase1, *coinbase2, *bbversion, *nbit, *ntime, header[228]; unsigned char *cb1 = NULL, *cb2 = NULL; size_t cb1_len, cb2_len, alloc_len; bool clean, ret = false; int merkles, i; json_t *arr; arr = json_array_get(val, 4...
1
[ "CWE-119", "CWE-787" ]
cgminer
e1c5050734123973b99d181c45e74b2cbb00272e
147,840,811,858,650,030,000,000,000,000,000,000,000
147
Do some random sanity checking for stratum message parsing
xfs_itruncate_clear_reflink_flags( struct xfs_inode *ip) { struct xfs_ifork *dfork; struct xfs_ifork *cfork; if (!xfs_is_reflink_inode(ip)) return; dfork = XFS_IFORK_PTR(ip, XFS_DATA_FORK); cfork = XFS_IFORK_PTR(ip, XFS_COW_FORK); if (dfork->if_bytes == 0 && cfork->if_bytes == 0) ip->i_d.di_flags2 &= ~XFS_D...
0
[]
linux
01ea173e103edd5ec41acec65b9261b87e123fc2
89,188,880,103,673,570,000,000,000,000,000,000,000
15
xfs: fix up non-directory creation in SGID directories XFS always inherits the SGID bit if it is set on the parent inode, while the generic inode_init_owner does not do this in a few cases where it can create a possible security problem, see commit 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") for...
LogLuvCleanup(TIFF* tif) { LogLuvState* sp = (LogLuvState *)tif->tif_data; assert(sp != 0); tif->tif_tagmethods.vgetfield = sp->vgetparent; tif->tif_tagmethods.vsetfield = sp->vsetparent; if (sp->tbuf) _TIFFfree(sp->tbuf); _TIFFfree(sp); tif->tif_data = NULL; _TIFFSetDefaultCompressionState(tif); }
0
[ "CWE-787" ]
libtiff
aaab5c3c9d2a2c6984f23ccbc79702610439bc65
116,480,910,828,646,600,000,000,000,000,000,000,000
16
* libtiff/tif_luv.c: fix potential out-of-bound writes in decode functions in non debug builds by replacing assert()s by regular if checks (bugzilla #2522). Fix potential out-of-bound reads in case of short input data.
int32_t Downstream::get_assoc_stream_id() const { return assoc_stream_id_; }
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
272,722,412,169,777,430,000,000,000,000,000,000,000
1
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
static void ccp_free_data(struct ccp_data *data, struct ccp_cmd_queue *cmd_q) { ccp_dm_free(&data->dm_wa); ccp_sg_free(&data->sg_wa); }
0
[ "CWE-400", "CWE-401" ]
linux
128c66429247add5128c03dc1e144ca56f05a4e2
162,275,487,009,492,060,000,000,000,000,000,000,000
5
crypto: ccp - Release all allocated memory if sha type is invalid Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Acked-by: Gary R Hook <gary...
int bcf_index_build3(const char *fn, const char *fnidx, int min_shift, int n_threads) { htsFile *fp; hts_idx_t *idx; tbx_t *tbx; int ret; if ((fp = hts_open(fn, "rb")) == 0) return -2; if (n_threads) hts_set_threads(fp, n_threads); if ( fp->format.compression!=bgzf ) { hts_close(fp);...
0
[ "CWE-787" ]
htslib
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
142,185,075,871,967,560,000,000,000,000,000,000,000
43
Fix check for VCF record size The check for excessive record size in vcf_parse_format() only looked at individual fields. It was therefore possible to exceed the limit and overflow fmt_aux_t::offset by having multiple fields with a combined size that went over INT_MAX. Fix by including the amount of memory used so fa...
static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata, struct ieee80211_mgmt *mgmt, size_t len) { struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; u16 reason_code = le16_to_cpu(mgmt->u.deauth.reason_code); sdata_assert_lock(sdata); if (len < 24 + 2) return; if (!ether_addr_equal...
0
[]
linux
79c92ca42b5a3e0ea172ea2ce8df8e125af237da
18,792,828,712,151,167,000,000,000,000,000,000,000
46
mac80211: handle deauthentication/disassociation from TDLS peer When receiving a deauthentication/disassociation frame from a TDLS peer, a station should not disconnect the current AP, but only disable the current TDLS link if it's enabled. Without this change, a TDLS issue can be reproduced by following the steps as...
static void make_tx_response(struct xenvif *vif, struct xen_netif_tx_request *txp, s8 st) { RING_IDX i = vif->tx.rsp_prod_pvt; struct xen_netif_tx_response *resp; int notify; resp = RING_GET_RESPONSE(&vif->tx, i); resp->id = txp->id; resp->status = st; if (txp->flags & XEN_NETTXF_extr...
0
[ "CWE-399" ]
linux
7d5145d8eb2b9791533ffe4dc003b129b9696c48
215,194,384,909,957,530,000,000,000,000,000,000,000
20
xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop. Signed-off-by: Matthew Daley <mattjd@gmail.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <JBeulich@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
FileSystem CreateFileSystemStruct(content::WebContents* web_contents, const std::string& file_system_id, const std::string& file_system_path, const std::string& type) { const GURL origin = web_contents->GetURL().GetO...
0
[ "CWE-200", "CWE-668" ]
electron
07a1c2a3e5845901f7e2eda9506695be58edc73c
56,834,486,927,867,080,000,000,000,000,000,000,000
11
fix: restrict sendToFrame to same-process frames by default (#26875)
static void parse_cfg(int flags, int argc, const char **argv, cfg_t *cfg) { struct stat st; FILE *file = NULL; int fd = -1; int i; memset(cfg, 0, sizeof(cfg_t)); cfg->debug_file = stderr; for (i = 0; i < argc; i++) { if (strncmp(argv[i], "max_devices=", 12) == 0) sscanf(argv[i], "max_devices=%...
0
[ "CWE-200" ]
pam-u2f
18b1914e32b74ff52000f10e97067e841e5fff62
54,216,262,344,931,880,000,000,000,000,000,000,000
92
Do not leak file descriptor when doing exec When opening a custom debug file, the descriptor would stay open when calling exec and leak to the child process. Make sure all files are opened with close-on-exec. This fixes CVE-2019-12210. Thanks to Matthias Gerstner of the SUSE Security Team for reporting the issue.
int user_match(const struct key *key, const struct key_match_data *match_data) { return strcmp(key->description, match_data->raw_data) == 0; }
1
[ "CWE-476" ]
linux
c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81
108,404,794,336,580,630,000,000,000,000,000,000,000
4
KEYS: Remove key_type::match in favour of overriding default by match_preparse A previous patch added a ->match_preparse() method to the key type. This is allowed to override the function called by the iteration algorithm. Therefore, we can just set a default that simply checks for an exact match of the key descripti...
static void reparent_thread(struct task_struct *p, struct task_struct *father) { if (p->pdeath_signal) /* We already hold the tasklist_lock here. */ group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p); list_move_tail(&p->sibling, &p->real_parent->children); /* If this is a threaded reparent there is no ...
0
[ "CWE-284", "CWE-264" ]
linux
8141c7f3e7aee618312fa1c15109e1219de784a7
76,707,520,216,073,560,000,000,000,000,000,000,000
28
Move "exit_robust_list" into mm_release() We don't want to get rid of the futexes just at exit() time, we want to drop them when doing an execve() too, since that gets rid of the previous VM image too. Doing it at mm_release() time means that we automatically always do it when we disassociate a VM map from the task. ...
void die_path_inside_submodule(const struct index_state *istate, const struct pathspec *ps) { int i, j; for (i = 0; i < istate->cache_nr; i++) { struct cache_entry *ce = istate->cache[i]; int ce_len = ce_namelen(ce); if (!S_ISGITLINK(ce->ce_mode)) continue; for (j = 0; j < ps->nr ; j++) { c...
0
[]
git
a8dee3ca610f5a1d403634492136c887f83b59d2
246,128,442,932,093,500,000,000,000,000,000,000,000
29
Disallow dubiously-nested submodule git directories Currently it is technically possible to let a submodule's git directory point right into the git dir of a sibling submodule. Example: the git directories of two submodules with the names `hippo` and `hippo/hooks` would be `.git/modules/hippo/` and `.git/modules/hipp...
BOOL ber_read_contextual_tag(wStream* s, BYTE tag, int* length, BOOL pc) { BYTE byte; if (Stream_GetRemainingLength(s) < 1) return FALSE; Stream_Read_UINT8(s, byte); if (byte != ((BER_CLASS_CTXT | BER_PC(pc)) | (BER_TAG_MASK & tag))) { Stream_Rewind(s, 1); return FALSE; } return ber_read_length(s, lengt...
0
[ "CWE-476" ]
FreeRDP
0dc22d5a30a1c7d146b2a835b2032668127c33e9
21,387,269,328,905,713,000,000,000,000,000,000,000
16
Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically.
void hns_rcb_int_clr_hw(struct hnae_queue *q, u32 flag) { if (flag & RCB_INT_FLAG_TX) { dsaf_write_dev(q, RCB_RING_INTSTS_TX_RING_REG, 1); dsaf_write_dev(q, RCB_RING_INTSTS_TX_OVERTIME_REG, 1); } if (flag & RCB_INT_FLAG_RX) { dsaf_write_dev(q, RCB_RING_INTSTS_RX_RING_REG, 1); dsaf_write_dev(q, RCB_RING_INTS...
0
[ "CWE-119", "CWE-703" ]
linux
412b65d15a7f8a93794653968308fc100f2aa87c
101,428,527,200,454,550,000,000,000,000,000,000,000
12
net: hns: fix ethtool_get_strings overflow in hns driver hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated is not enough for ethtool_get_strings(), which will cause random memory corruption. When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the the following can be observed ...
static inline struct mm_struct *mm_from_sdma_node(struct sdma_mmu_node *node) { return node->rb.handler->mn.mm; }
0
[ "CWE-416" ]
linux
3d2a9d642512c21a12d19b9250e7a835dcb41a79
237,875,714,592,469,640,000,000,000,000,000,000,000
4
IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a ...
static int tc_get_tfilter(struct sk_buff *skb, struct nlmsghdr *n, struct netlink_ext_ack *extack) { struct net *net = sock_net(skb->sk); struct nlattr *tca[TCA_MAX + 1]; char name[IFNAMSIZ]; struct tcmsg *t; u32 protocol; u32 prio; u32 parent; u32 chain_index; struct Qdisc *q = NULL; struct tcf_chain_in...
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
339,621,850,295,991,720,000,000,000,000,000,000,000
121
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
static int recvline_fh(FILE *helper, struct strbuf *buffer, const char *name) { strbuf_reset(buffer); if (debug) fprintf(stderr, "Debug: Remote helper: Waiting...\n"); if (strbuf_getline(buffer, helper) == EOF) { if (debug) fprintf(stderr, "Debug: Remote helper quit.\n"); return 1; } if (debug) fprintf...
0
[]
git
68061e3470210703cb15594194718d35094afdc0
40,928,812,342,192,754,000,000,000,000,000,000,000
15
fast-import: disallow "feature export-marks" by default The fast-import stream command "feature export-marks=<path>" lets the stream write marks to an arbitrary path. This may be surprising if you are running fast-import against an untrusted input (which otherwise cannot do anything except update Git objects and refs)...
kb_to_bytes(uint32_t bw) { return (bw > (INT32_MAX/1000)) ? INT32_MAX : bw*1000; }
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
58,270,650,279,059,350,000,000,000,000,000,000,000
4
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
bool checkAuthorizationImplPreParse(OperationContext* opCtx, const Command* command, const OpMsgRequest& request) { auto client = opCtx->getClient(); if (client->isInDirectClient()) return true; uassert(ErrorCodes::Unauthorized,...
0
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
68,381,738,637,104,090,000,000,000,000,000,000,000
28
SERVER-38275 ban find explain with UUID
malloc_init_state (mstate av) { int i; mbinptr bin; /* Establish circular links for normal bins */ for (i = 1; i < NBINS; ++i) { bin = bin_at (av, i); bin->fd = bin->bk = bin; } #if MORECORE_CONTIGUOUS if (av != &main_arena) #endif set_noncontiguous (av); if (av == &main_arena) s...
0
[ "CWE-787" ]
glibc
d6db68e66dff25d12c3bc5641b60cbd7fb6ab44f
187,528,382,176,114,600,000,000,000,000,000,000,000
22
malloc: Mitigate null-byte overflow attacks * malloc/malloc.c (_int_free): Check for corrupt prev_size vs size. (malloc_consolidate): Likewise.
static inline size_t round_up_cluster(struct inode *inode, size_t length) { struct super_block *sb = inode->i_sb; size_t cluster_size = 1 << (EXT4_SB(sb)->s_cluster_bits + inode->i_blkbits); size_t mask = ~(cluster_size - 1); return (length + cluster_size - 1) & mask; }
0
[]
linux
54dd0e0a1b255f115f8647fc6fb93273251b01b9
237,051,955,520,970,000,000,000,000,000,000,000,000
9
ext4: add extra checks to ext4_xattr_block_get() Add explicit checks in ext4_xattr_block_get() just in case the e_value_offs and e_value_size fields in the the xattr block are corrupted in memory after the buffer_verified bit is set on the xattr block. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.or...
ExecCreateTableAs(CreateTableAsStmt *stmt, const char *queryString, ParamListInfo params, char *completionTag) { Query *query = (Query *) stmt->query; IntoClause *into = stmt->into; bool is_matview = (into->viewQuery != NULL); DestReceiver *dest; Oid save_userid = InvalidOid; int save_sec_context = ...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
60,337,259,291,661,780,000,000,000,000,000,000,000
150
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
TEST_P(Http2CodecImplTest, WatermarkUnderEndStream) { initialize(); MockStreamCallbacks callbacks; request_encoder_->getStream().addCallbacks(callbacks); TestRequestHeaderMapImpl request_headers; HttpTestUtility::addDefaultHeaders(request_headers); EXPECT_CALL(request_decoder_, decodeHeaders_(_, false)); ...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
36,368,219,652,964,693,000,000,000,000,000,000,000
43
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
Item* convert_charset_partition_constant(Item *item, CHARSET_INFO *cs) { THD *thd= current_thd; Name_resolution_context *context= &thd->lex->current_select->context; TABLE_LIST *save_list= context->table_list; const char *save_where= thd->where; item= item->safe_charset_converter(thd, cs); context->table_l...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
221,988,780,726,834,780,000,000,000,000,000,000,000
16
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
void InstanceKlass::print_class_load_logging(ClassLoaderData* loader_data, const ModuleEntry* module_entry, const ClassFileStream* cfs) const { log_to_classlist(); if (!log_is_enabled(Info, class, load)) { return; } ...
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
117,650,356,586,314,830,000,000,000,000,000,000,000
90
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
void sctp_generate_proto_unreach_event(unsigned long data) { struct sctp_transport *transport = (struct sctp_transport *) data; struct sctp_association *asoc = transport->asoc; struct sock *sk = asoc->base.sk; struct net *net = sock_net(sk); bh_lock_sock(sk); if (sock_owned_by_user(sk)) { pr_debug("%s: sock is...
0
[ "CWE-362" ]
linux
635682a14427d241bab7bbdeebb48a7d7b91638e
324,503,207,480,040,070,000,000,000,000,000,000,000
32
sctp: Prevent soft lockup when sctp_accept() is called during a timeout event A case can occur when sctp_accept() is called by the user during a heartbeat timeout event after the 4-way handshake. Since sctp_assoc_migrate() changes both assoc->base.sk and assoc->ep, the bh_sock_lock in sctp_generate_heartbeat_event() ...
bool check_table_name_processor(void *arg) { Check_table_name_prm &p= *(Check_table_name_prm *) arg; if (!field && p.table_name.length && table_name) { DBUG_ASSERT(p.db.length); if ((db_name && my_strcasecmp(table_alias_charset, p.db.str, db_name)) || my_strcasecmp(table_...
0
[ "CWE-89" ]
server
e4e25d2bacc067417c35750f5f6c44cad10c81de
96,107,571,154,885,960,000,000,000,000,000,000,000
18
MDEV-26423 MariaDB server crash in Create_tmp_table::finalize Removed prohibition of creating temporary field of Item_default_value (added by mistake by 1d9b043a1f5db7ff229d5200652cff7a78ea6266 fix of MDEV-10780 and MDEV-11265).
static int __init init(void) { return crypto_register_alg(&alg); }
0
[ "CWE-20", "CWE-200" ]
linux
ecaaab5649781c5a0effdaf298a925063020500e
296,980,161,476,890,220,000,000,000,000,000,000,000
4
crypto: salsa20 - fix blkcipher_walk API usage When asked to encrypt or decrypt 0 bytes, both the generic and x86 implementations of Salsa20 crash in blkcipher_walk_done(), either when doing 'kfree(walk->buffer)' or 'free_page((unsigned long)walk->page)', because walk->buffer and walk->page have not been initialized. ...
bool ReadFile(const fs::path& path, std::string* output) { // Flag "ate": seek to the end of stream immediately after open. fs::ifstream stream{ path, std::ios::binary | std::ios::ate }; if (stream.fail()) { return false; } auto size = stream.tellg(); output->resize(static_cast<std::size_t>(size), '\0'...
0
[ "CWE-22" ]
webcc
55a45fd5039061d5cc62e9f1b9d1f7e97a15143f
212,838,831,819,116,400,000,000,000,000,000,000,000
16
fix static file serving security issue; fix url path encoding issue
static int copy_files(unsigned long clone_flags, struct task_struct *tsk) { struct files_struct *oldf, *newf; int error = 0; /* * A background process may not have any files ... */ oldf = current->files; if (!oldf) goto out; if (clone_flags & CLONE_FILES) { atomic_inc(&oldf->count); goto out; } new...
0
[ "CWE-665", "CWE-362" ]
linux
b4e00444cab4c3f3fec876dc0cccc8cbb0d1a948
182,055,609,492,995,040,000,000,000,000,000,000,000
26
fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent current->group_leader->exit_signal may change during copy_process() if current->real_parent exits. Move the assignment inside tasklist_lock to avoid the race. Signed-off-by: Eddy Wu <eddy_wu@trendmicro.com> Acked-by: Oleg Nesterov <oleg@redhat....
if (my_strcasecmp(&my_charset_latin1, argument, "required")) { fprintf(stderr, "Unknown value to --ssl-mode: '%s'. Use --ssl-mode=REQUIRED\n", argument); exit(1); }
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
37,526,217,096,843,543,000,000,000,000,000,000,000
7
WL#9072: Backport WL#8785 to 5.5
rdp_parse_bounds(STREAM s, BOUNDS * bounds) { uint8 present; in_uint8(s, present); if (present & 1) rdp_in_coord(s, &bounds->left, False); else if (present & 16) rdp_in_coord(s, &bounds->left, True); if (present & 2) rdp_in_coord(s, &bounds->top, False); else if (present & 32) rdp_in_coord(s, &bounds->...
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
320,559,750,702,915,250,000,000,000,000,000,000,000
28
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
static struct sctp_cookie_param *sctp_pack_cookie( const struct sctp_endpoint *ep, const struct sctp_association *asoc, const struct sctp_chunk *init_chunk, int *cookie_len, const __u8 *raw_addrs, int addrs_len) { struct sctp_signed_cookie *cookie; struct sctp_cookie_param *retval; int heade...
0
[ "CWE-20" ]
linux
07f2c7ab6f8d0a7e7c5764c4e6cc9c52951b9d9c
179,646,666,071,586,000,000,000,000,000,000,000,000
89
sctp: verify size of a new chunk in _sctp_make_chunk() When SCTP makes INIT or INIT_ACK packet the total chunk length can exceed SCTP_MAX_CHUNK_LEN which leads to kernel panic when transmitting these packets, e.g. the crash on sending INIT_ACK: [ 597.804948] skbuff: skb_over_panic: text:00000000ffae06e4 len:120168 ...
parse_branch(Node** top, OnigToken* tok, int term, UChar** src, UChar* end, ScanEnv* env) { int r; Node *node, **headp; *top = NULL; r = parse_exp(&node, tok, term, src, end, env); if (r < 0) return r; if (r == TK_EOT || r == term || r == TK_ALT) { *top = node; } else { *top = node_new_...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
18,556,683,285,307,934,000,000,000,000,000,000,000
34
onig-5.9.2
static int TCPGetWscaleTest03(void) { int retval = 0; static uint8_t raw_tcp[] = {0xda, 0xc1, 0x00, 0x50, 0xb6, 0x21, 0x7f, 0x59, 0xdd, 0xa3, 0x6f, 0xf8, 0x80, 0x10, 0x05, 0xb4, 0x7c, 0x70, 0x00, 0x00, 0x01, 0x01, 0x08, 0x0a, ...
0
[]
suricata
50e2b973eeec7172991bf8f544ab06fb782b97df
101,410,337,400,269,840,000,000,000,000,000,000,000
43
stream/tcp: handle RST with MD5 or AO header Special handling for RST packets if they have an TCP MD5 or AO header option. The options hash can't be validated. The end host might be able to validate it, as it can have a key/password that was communicated out of band. The sender could use this to move the TCP state to...
static void xt_dummy_timeout_cb(XtPointer closure, XtIntervalId *id) { /* dummy function, never called */ npw_printf("ERROR: xt_dummy_timeout_cb() should never be called\n"); }
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
258,636,860,436,926,000,000,000,000,000,000,000,000
5
Support all the new variables added
static void cirrus_bitblt_rop_nop(CirrusVGAState *s, uint8_t *dst,const uint8_t *src, int dstpitch,int srcpitch, int bltwidth,int bltheight) { }
1
[ "CWE-119" ]
qemu
026aeffcb4752054830ba203020ed6eb05bcaba8
49,887,327,527,751,400,000,000,000,000,000,000,000
6
cirrus: stop passing around dst pointers in the blitter Instead pass around the address (aka offset into vga memory). Calculate the pointer in the rop_* functions, after applying the mask to the address, to make sure the address stays within the valid range. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-i...
void handle_invalid_sa_file(int fd, struct file_magic *file_magic, char *file, int n) { fprintf(stderr, _("Invalid system activity file: %s\n"), file); if (n == FILE_MAGIC_SIZE) { if ((file_magic->sysstat_magic == SYSSTAT_MAGIC) || (file_magic->sysstat_magic == SYSSTAT_MAGIC_SWAPPED)) { /* This is a syss...
0
[ "CWE-125" ]
sysstat
fbc691eaaa10d0bcea6741d5a223dc3906106548
299,645,793,769,440,240,000,000,000,000,000,000,000
20
Fix #196 and #199: Out of bound reads security issues Check args before calling memmove() and memset() in remap_struct() function to avoid out of bound reads which would possibly lead to unknown code execution and/or sadf command crash. Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>