func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void MenuExit(GWindow UNUSED(base), struct gmenuitem *UNUSED(mi), GEvent *e) { if ( e==NULL ) /* Not from the menu directly, but a shortcut */ _MenuExit(NULL); else DelayEvent(_MenuExit,NULL); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
289,182,328,588,101,900,000,000,000,000,000,000,000
6
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
pfm_restore_pmds(unsigned long *pmds, unsigned long mask) { int i; unsigned long val, ovfl_val = pmu_conf->ovfl_val; for (i=0; mask; i++, mask>>=1) { if ((mask & 0x1) == 0) continue; val = PMD_IS_COUNTING(i) ? pmds[i] & ovfl_val : pmds[i]; ia64_set_pmd(i, val); } ia64_srlz_d(); }
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
254,499,257,325,140,550,000,000,000,000,000,000,000
12
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
_archive_filter_name(struct archive *_a, int n) { struct archive_read_filter *f = get_filter(_a, n); return f == NULL ? NULL : f->name; }
0
[ "CWE-125" ]
libarchive
e6c9668f3202215ddb71617b41c19b6f05acf008
112,423,731,111,942,530,000,000,000,000,000,000,000
5
Add a check to archive_read_filter_consume to reject any attempts to move the file pointer by a negative amount. Note: Either this or commit 3865cf2 provides a fix for Issue 394.
degraded_show(struct mddev *mddev, char *page) { return sprintf(page, "%d\n", mddev->degraded); }
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
121,605,742,188,602,860,000,000,000,000,000,000,000
4
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
rsvg_new_filter_primitive_erode (const char *element_name, RsvgNode *parent) { RsvgFilterPrimitiveErode *filter; filter = g_new0 (RsvgFilterPrimitiveErode, 1); filter->super.in = g_string_new ("none"); filter->super.result = g_string_new ("none"); filter->rx = 0; filter->ry = 0; filter->mod...
0
[ "CWE-369" ]
librsvg
ecf9267a24b2c3c0cd211dbdfa9ef2232511972a
275,452,019,576,348,800,000,000,000,000,000,000,000
20
bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs We were making the decision to use box blurs, instead of a true Gaussian kernel, based on the size of *both* x and y dimensions. Do them individually instead.
static int ZEND_FASTCALL ZEND_MUL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); mul_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
74,981,158,780,277,110,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static void packet_dec_pending(struct packet_ring_buffer *rb) { this_cpu_dec(*rb->pending_refcnt); }
0
[ "CWE-416", "CWE-362" ]
linux
84ac7260236a49c79eede91617700174c2c19b0c
243,878,229,595,338,600,000,000,000,000,000,000,000
4
packet: fix race condition in packet_set_ring When packet_set_ring creates a ring buffer it will initialize a struct timer_list if the packet version is TPACKET_V3. This value can then be raced by a different thread calling setsockopt to set the version to TPACKET_V1 before packet_set_ring has finished. This leads to...
TEST(BSONValidateFast, ErrorWithId) { BufBuilder bb; BSONObjBuilder ob(bb); ob.append("_id", 1); appendInvalidStringElement("not_id", &bb); const BSONObj x = ob.done(); const Status status = validateBSON(x.objdata(), x.objsize()); ASSERT_NOT_OK(status); ...
0
[ "CWE-20" ]
mongo
8f1c734c7f1862180f607c241fb167640889efba
179,382,471,253,836,600,000,000,000,000,000,000,000
10
SERVER-17264: improve bson validation for utf-8 strings (cherry picked from commit 394a8569ff14a215c0691aa34440227b2e62a4de)
static void construct_reply(char *inbuf, int size, size_t unread_bytes, uint32_t seqnum, bool encrypted, struct smb_perfcount_data *deferred_pcd) { connection_struct *conn; struct smb_request *req; if (!(req = talloc(talloc_tos(), struct smb_request))) { smb_panic("could not allocate smb_request"); ...
0
[]
samba
25452a2268ac7013da28125f3df22085139af12d
273,058,458,092,999,600,000,000,000,000,000,000,000
59
s3: Fix a NULL pointer dereference Found by Laurent Gaffie <laurent.gaffie@gmail.com>. Thanks! Volker
void make_sort_key(uchar *to, Item *item, const SORT_FIELD_ATTR *sort_field, Sort_param *param) const { type_handler()->make_sort_key(to, item, sort_field, param); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
326,605,207,482,876,330,000,000,000,000,000,000,000
5
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
int CBINDInstallDlg::MsgBox(int id, ...) { CString format; va_list va; char buf[BUFSIZ]; format.LoadString(id); memset(buf, 0, BUFSIZ); va_start(va, id); vsprintf(buf, format, va); va_end(va); return (MessageBox(buf)); }
0
[ "CWE-284" ]
bind9
967a3b9419a3c12b8c0870c86d1ee3840bcbbad7
159,160,112,191,859,410,000,000,000,000,000,000,000
14
[master] quote service registry paths 4532. [security] The BIND installer on Windows used an unquoted service path, which can enable privilege escalation. (CVE-2017-3141) [RT #45229]
ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) { struct ip6_tnl *t = netdev_priv(dev); struct iphdr *iph = ip_hdr(skb); int encap_limit = -1; struct flowi fl; __u8 dsfield; __u32 mtu; int err; if ((t->parms.proto != IPPROTO_IPIP && t->parms.proto != 0) || !ip6_tnl_xmit_ctl(t)) return -1; ...
0
[]
linux-2.6
d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
183,909,571,027,055,200,000,000,000,000,000,000,000
37
tunnels: fix netns vs proto registration ordering Same stuff as in ip_gre patch: receive hook can be called before netns setup is done, oopsing in net_generic(). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static MagickPixelPacket **DestroyPixelThreadSet(const Image *images, MagickPixelPacket **pixels) { register ssize_t i; size_t rows; assert(pixels != (MagickPixelPacket **) NULL); rows=MagickMax(GetImageListLength(images), (size_t) GetMagickResourceLimit(ThreadResource)); for (i=0; i < (ssize_...
0
[ "CWE-399", "CWE-190" ]
ImageMagick6
3e21bc8a58b4ae38d24c7e283837cc279f35b6a5
259,160,103,393,652,430,000,000,000,000,000,000,000
18
https://github.com/ImageMagick/ImageMagick/issues/1735
httpClientHandler(int status, FdEventHandlerPtr event, StreamRequestPtr request) { HTTPConnectionPtr connection = request->data; int i, body; int bufsize = (connection->flags & CONN_BIGREQBUF) ? bigBufferSize : CHUNK_SIZE; assert(connection->flags & CONN_READER); /* Ther...
0
[ "CWE-617" ]
polipo
0e2b44af619e46e365971ea52b97457bc0778cd3
78,297,602,450,819,940,000,000,000,000,000,000,000
80
Try to read POST requests to local configuration interface correctly.
void gf_fs_print_non_connected(GF_FilterSession *fsess) { gf_fs_print_not_connected_filters(fsess, NULL, GF_FALSE); }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
277,013,808,896,092,060,000,000,000,000,000,000,000
4
fixed crashes for very long path - cf #1908
pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) { return do_fork(flags|CLONE_VM|CLONE_UNTRACED, (unsigned long)fn, (unsigned long)arg, NULL, NULL); }
0
[ "CWE-284", "CWE-264" ]
linux
e66eded8309ebf679d3d3c1f5820d1f2ca332c71
319,187,994,726,627,500,000,000,000,000,000,000,000
5
userns: Don't allow CLONE_NEWUSER | CLONE_FS Don't allowing sharing the root directory with processes in a different user namespace. There doesn't seem to be any point, and to allow it would require the overhead of putting a user namespace reference in fs_struct (for permission checks) and incrementing that reference...
int xt_compat_match_to_user(struct xt_entry_match *m, void __user **dstptr, int *size) { struct xt_match *match = m->u.kernel.match; struct compat_xt_entry_match __user *cm = *dstptr; int off = xt_compat_match_offset(match); u_int16_t msize = m->u.user.match_size - off; if (copy_to_user(cm, m, sizeof(*cm))...
0
[ "CWE-787" ]
linux
9fa492cdc160cd27ce1046cb36f47d3b2b1efa21
250,288,332,588,927,270,000,000,000,000,000,000,000
24
[NETFILTER]: x_tables: simplify compat API Split the xt_compat_match/xt_compat_target into smaller type-safe functions performing just one operation. Handle all alignment and size-related conversions centrally in these function instead of requiring each module to implement a full-blown conversion function. Replace ->c...
static void OnRadioTxTimeout( void ) { LoRaMacRadioEvents.Events.TxTimeout = 1; if( ( MacCtx.MacCallbacks != NULL ) && ( MacCtx.MacCallbacks->MacProcessNotify != NULL ) ) { MacCtx.MacCallbacks->MacProcessNotify( ); } }
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
258,407,413,114,188,460,000,000,000,000,000,000,000
9
Added received buffer size checks.
static void ccp_update_sg_workarea(struct ccp_sg_workarea *wa, unsigned int len) { unsigned int nbytes = min_t(u64, len, wa->bytes_left); if (!wa->sg) return; wa->sg_used += nbytes; wa->bytes_left -= nbytes; if (wa->sg_used == wa->sg->length) { wa->sg = sg_next(wa->sg); wa->sg_used = 0; } }
0
[ "CWE-400", "CWE-401" ]
linux
128c66429247add5128c03dc1e144ca56f05a4e2
316,223,686,327,116,700,000,000,000,000,000,000,000
14
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...
struct sock *sk_alloc(struct net *net, int family, gfp_t priority, struct proto *prot) { struct sock *sk; sk = sk_prot_alloc(prot, priority | __GFP_ZERO, family); if (sk) { sk->sk_family = family; /* * See comment in struct sock definition to understand * why we need sk_prot_creator -acme */ ...
0
[ "CWE-264" ]
linux-2.6
df0bca049d01c0ee94afb7cd5dfd959541e6c8da
230,327,109,761,553,860,000,000,000,000,000,000,000
19
net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2 In function sock_getsockopt() located in net/core/sock.c, optval v.val is not correctly initialized and directly returned in userland in case we have SO_BSDCOMPAT option set. This dummy code should trigger the bug: int main(void) { unsigned char buf...
static inline struct sctp_chunk *sctp_make_op_error_limited( const struct sctp_association *asoc, const struct sctp_chunk *chunk) { size_t size = SCTP_DEFAULT_MAXSEGMENT; struct sctp_sock *sp = NULL; if (asoc) { size = min_t(size_t, size, asoc->pathmtu); sp = sctp_sk(asoc->base.sk); } size = sctp_m...
0
[ "CWE-704" ]
linux
a2d859e3fc97e79d907761550dbc03ff1b36479c
126,457,170,451,843,700,000,000,000,000,000,000,000
16
sctp: account stream padding length for reconf chunk sctp_make_strreset_req() makes repeated calls to sctp_addto_chunk() which will automatically account for padding on each call. inreq and outreq are already 4 bytes aligned, but the payload is not and doing SCTP_PAD4(a + b) (which _sctp_make_chunk() did implicitly he...
RList *r_bin_wasm_get_codes (RBinWasmObj *bin) { RBinWasmSection *code = NULL;; RList *codes = NULL; if (!bin || !bin->g_sections) { return NULL; } if (bin->g_codes) { return bin->g_codes; } if (!(codes = r_bin_wasm_get_sections_by_id (bin->g_sections, R_BIN_WASM_SECTION_CODE))) { return r_list_ne...
0
[ "CWE-125", "CWE-787" ]
radare2
d2632f6483a3ceb5d8e0a5fb11142c51c43978b4
268,968,520,997,992,680,000,000,000,000,000,000,000
26
Fix crash in fuzzed wasm r2_hoobr_consume_init_expr
size_t operator()(const ::rgw::IAM::Service& s) const noexcept { // Invoke a default-constructed hash object for int. return hash<int>()(static_cast<int>(s)); }
0
[ "CWE-617" ]
ceph
b3118cabb8060a8cc6a01c4e8264cb18e7b1745a
20,122,148,220,202,373,000,000,000,000,000,000,000
4
rgw: Remove assertions in IAM Policy A couple of them could be triggered by user input. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
static int _clean_unfinished_results(zend_rsrc_list_entry *le, void *db TSRMLS_DC) { if (Z_TYPE_P(le) == le_sqlite_result) { struct php_sqlite_result *res = (struct php_sqlite_result *)le->ptr; if (res->db->rsrc_id == ((struct php_sqlite_db*)db)->rsrc_id) { return ZEND_HASH_APPLY_REMOVE; } } return ZEND_HAS...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
4,886,107,357,729,011,400,000,000,000,000,000,000
10
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, const ECDSA_SIG *sig, EC_KEY *eckey) { int ret = -1, i; BN_CTX *ctx; BIGNUM *order, *u1, *u2, *m, *X; EC_POINT *point = NULL; const EC_GROUP *group; const EC_POINT *pub_key; /* check input values */ if (eckey == NULL || (group = EC_KEY_g...
0
[ "CWE-320" ]
openssl
8aed2a7548362e88e84a7feb795a3a97e8395008
219,938,490,872,231,760,000,000,000,000,000,000,000
131
Reserve option to use BN_mod_exp_mont_consttime in ECDSA. Submitted by Shay Gueron, Intel Corp. RT: 3149 Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit f54be179aa4cbbd944728771d7d59ed588158a12)
ssize_t single_hugepage_flag_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count, enum transparent_hugepage_flag flag) { unsigned long value; int ret; ret = kstrtoul(buf, 10, &value); if (ret < 0) return ret; if (value > 1) return -EINVAL; if (value) set_b...
0
[ "CWE-362" ]
linux
a8f97366452ed491d13cf1e44241bc0b5740b1f0
251,493,554,143,591,900,000,000,000,000,000,000,000
21
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d() Currently, we unconditionally make page table dirty in touch_pmd(). It may result in false-positive can_follow_write_pmd(). We may avoid the situation, if we would only make the page table entry dirty if caller asks for write access -- FOLL_WRITE...
vhost_scsi_send_evt(struct vhost_scsi *vs, struct vhost_scsi_tpg *tpg, struct se_lun *lun, u32 event, u32 reason) { struct vhost_scsi_evt *evt; evt = vhost_scsi_allocate_evt(vs, event, reason); if (!evt) return; if (tpg && lun) { /* TODO: share lun setup code with virtio-scsi.ko */ /* ...
1
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
281,088,775,098,974,470,000,000,000,000,000,000,000
28
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] arr...
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { OpData* data = reinterpret_cast<OpData*>(node->user_data); auto* params = reinterpret_cast<TfLiteSubParams*>(node->builtin_data); TF_LITE_ENSURE_EQ(context, NumInputs(node), 2); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTens...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
202,173,992,095,032,470,000,000,000,000,000,000,000
79
[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...
bool InstanceKlass::verify_code(TRAPS) { // 1) Verify the bytecodes return Verifier::verify(this, should_verify_class(), THREAD); }
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
141,821,762,204,654,860,000,000,000,000,000,000,000
4
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
static void uat_umts_fp_record_free_cb(void*r) { uat_umts_fp_ep_and_ch_record_t *rec = (uat_umts_fp_ep_and_ch_record_t *)r; g_free(rec->srcIP); g_free(rec->dstIP); }
0
[ "CWE-20" ]
wireshark
7d7190695ce2ff269fdffb04e87139995cde21f4
226,828,317,837,396,800,000,000,000,000,000,000,000
6
UMTS_FP: fix handling reserved C/T value The spec puts the reserved value at 0xf but our internal table has 'unknown' at 0; since all the other values seem to be offset-by-one, just take the modulus 0xf to avoid running off the end of the table. Bug: 12191 Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0 Reviewed...
void SetIsolatedWorldInfo(v8::Isolate* isolate, int world_id, const gin_helper::Dictionary& options) { content::RenderFrame* render_frame; if (!MaybeGetRenderFrame(isolate, "setIsolatedWorldInfo", &render_frame)) return; std::string origin_url...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
79,714,384,772,105,440,000,000,000,000,000,000,000
25
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
static void hci_cc_read_buffer_size(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_rp_read_buffer_size *rp = (void *) skb->data; BT_DBG("%s status 0x%2.2x", hdev->name, rp->status); if (rp->status) return; hdev->acl_mtu = __le16_to_cpu(rp->acl_mtu); hdev->sco_mtu = rp->sco_mtu; hdev->acl_pkts = __...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
250,580,068,541,777,250,000,000,000,000,000,000,000
25
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
void __init vfs_caches_init_early(void) { int i; for (i = 0; i < ARRAY_SIZE(in_lookup_hashtable); i++) INIT_HLIST_BL_HEAD(&in_lookup_hashtable[i]); dcache_init_early(); inode_init_early(); }
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
222,468,535,503,914,070,000,000,000,000,000,000,000
10
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
struct tevent_req *smb2cli_validate_negotiate_info_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, struct smbXcli_tcon *tcon) { struct tevent_req *req; struct smb2cli_validate_negotiate_info_state *st...
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
310,455,222,054,123,680,000,000,000,000,000,000,000
108
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
write_viminfo_marks(FILE *fp_out, garray_T *buflist) { buf_T *buf; int is_mark_set; int i; win_T *win; tabpage_T *tp; // Set b_last_cursor for the all buffers that have a window. FOR_ALL_TAB_WINDOWS(tp, win) set_last_cursor(win); fputs(_("\n# History of marks within files (newest to...
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
89,662,938,392,531,150,000,000,000,000,000,000,000
43
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
int ext4_mb_init(struct super_block *sb) { struct ext4_sb_info *sbi = EXT4_SB(sb); unsigned i, j; unsigned offset, offset_incr; unsigned max; int ret; i = (sb->s_blocksize_bits + 2) * sizeof(*sbi->s_mb_offsets); sbi->s_mb_offsets = kmalloc(i, GFP_KERNEL); if (sbi->s_mb_offsets == NULL) { ret = -ENOMEM; go...
0
[ "CWE-416" ]
linux
8844618d8aa7a9973e7b527d038a2a589665002c
15,145,331,887,511,026,000,000,000,000,000,000,000
112
ext4: only look at the bg_flags field if it is valid The bg_flags field in the block group descripts is only valid if the uninit_bg or metadata_csum feature is enabled. We were not consistently looking at this field; fix this. Also block group #0 must never have uninitialized allocation bitmaps, or need to be zeroed...
static int ldb_kv_dn_list_store(struct ldb_module *module, struct ldb_dn *dn, struct dn_list *list) { struct ldb_kv_private *ldb_kv = talloc_get_type( ldb_module_get_private(module), struct ldb_kv_private); TDB_DATA rec, key; int ret; struct dn_list *list2; if (ldb_kv->idxptr == NULL) { return ldb_...
0
[ "CWE-20" ]
samba
0998f2f1bced019db4000ef4b55887abcb65f6d2
329,678,465,845,592,850,000,000,000,000,000,000,000
62
CVE-2018-1140 Add NULL check for ldb_dn_get_casefold() in ltdb_index_dn_attr() Signed-off-by: Andrej Gessel <Andrej.Gessel@janztec.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374
alist_set( alist_T *al, int count, char_u **files, int use_curbuf, int *fnum_list, int fnum_len) { int i; if (check_arglist_locked() == FAIL) return; alist_clear(al); if (GA_GROW_OK(&al->al_ga, count)) { for (i = 0; i < count; ++i) { if (got_int) { // Wh...
0
[ "CWE-416", "CWE-125" ]
vim
6f98371532fcff911b462d51bc64f2ce8a6ae682
27,094,139,066,914,467,000,000,000,000,000,000,000
46
patch 8.2.3884: crash when clearing the argument list while using it Problem: Crash when clearing the argument list while using it. Solution: Lock the argument list for ":all".
symbols_token_translations_init (void) { bool code_256_available_p = true; /* Find the highest token code, and whether 256, the POSIX preferred token code for the error token, is used. */ max_code = 0; for (int i = 0; i < ntokens; ++i) { sym_content *sym = symbols[i]->content; if (sym->co...
0
[]
bison
b7aab2dbad43aaf14eebe78d54aafa245a000988
98,185,300,948,053,470,000,000,000,000,000,000,000
53
fix: crash when redefining the EOF token Reported by Agency for Defense Development. https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html On an empty such as %token FOO BAR FOO 0 %% input: %empty we crash because when we find FOO 0, we decrement ntokens (since FOO was discovered...
static inline void mp_report_port(struct uart_driver *drv, struct sb_uart_port *port) { char address[64]; switch (port->iotype) { case UPIO_PORT: snprintf(address, sizeof(address),"I/O 0x%x", port->iobase); break; case UPIO_HUB6: snprintf(address, sizeof(address),"I/O 0x%x offset 0x%x", port->iobase, po...
0
[ "CWE-200" ]
linux
a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
144,617,685,599,249,350,000,000,000,000,000,000,000
24
Staging: sb105x: info leak in mp_get_count() The icount.reserved[] array isn't initialized so it leaks stack information to userspace. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Li...
void quicklistBookmarksClear(quicklist *ql) { while (ql->bookmark_count) zfree(ql->bookmarks[--ql->bookmark_count].name); /* NOTE: We do not shrink (realloc) the quick list. main use case for this * function is just before releasing the allocation. */ }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
250,494,574,518,900,200,000,000,000,000,000,000,000
6
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
TEST(BSONValidate, MuckingData1) { BSONObj theObject; { BSONObjBuilder b; b.append( "name" , "eliot was here" ); b.append( "yippee" , "asd" ); BSONArrayBuilder a( b.subarrayStart( "arr" ) ); for ( int i=0; i<100; i++ ) { a...
0
[ "CWE-20" ]
mongo
6889d1658136c753998b4a408dc8d1a3ec28e3b9
308,786,641,794,996,340,000,000,000,000,000,000,000
45
SERVER-7769 - fast bson validate
pg_rewrite_query(Query *query) { List *querytree_list; if (Debug_print_parse) elog_node_display(LOG, "parse tree", query, Debug_pretty_print); if (log_parser_stats) ResetUsage(); if (query->commandType == CMD_UTILITY) { /* don't rewrite utilities, just dump 'em into result list */ querytree_l...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
236,875,068,251,491,500,000,000,000,000,000,000,000
45
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
static void esp_dma_done(ESPState *s) { s->rregs[ESP_RSTAT] |= STAT_TC; s->rregs[ESP_RINTR] |= INTR_BS; s->rregs[ESP_RSEQ] = 0; s->rregs[ESP_RFLAGS] = 0; esp_set_tc(s, 0); esp_raise_irq(s); }
0
[ "CWE-476" ]
qemu
0db895361b8a82e1114372ff9f4857abea605701
99,759,109,418,486,970,000,000,000,000,000,000,000
9
esp: always check current_req is not NULL before use in DMA callbacks After issuing a SCSI command the SCSI layer can call the SCSIBusInfo .cancel callback which resets both current_req and current_dev to NULL. If any data is left in the transfer buffer (async_len != 0) then the next TI (Transfer Information) command ...
static void __dentry_kill(struct dentry *dentry) { struct dentry *parent = NULL; bool can_free = true; if (!IS_ROOT(dentry)) parent = dentry->d_parent; /* * The dentry is now unrecoverably dead to the world. */ lockref_mark_dead(&dentry->d_lockref); /* * inform the fs via d_prune that this dentry is abo...
0
[ "CWE-401", "CWE-254" ]
linux
cde93be45a8a90d8c264c776fab63487b5038a65
97,278,583,767,247,570,000,000,000,000,000,000,000
52
dcache: Handle escaped paths in prepend_path A rename can result in a dentry that by walking up d_parent will never reach it's mnt_root. For lack of a better term I call this an escaped path. prepend_path is called by four different functions __d_path, d_absolute_path, d_path, and getcwd. __d_path only wants to see...
getvcol( win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end) { colnr_T vcol; char_u *ptr; // points to current char char_u *posptr; // points to char at pos->col char_u *line; // start of the line int incr; int head; #ifdef FEAT_VARTABS int *vts = w...
0
[ "CWE-125", "CWE-787" ]
vim
94f3192b03ed27474db80b4d3a409e107140738b
86,542,655,495,167,760,000,000,000,000,000,000,000
140
patch 8.2.3950: going beyond the end of the line with /\%V Problem: Going beyond the end of the line with /\%V. Solution: Check for valid column in getvcol().
static int io_submit_sqe(struct io_ring_ctx *ctx, struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_submit_link *link = &ctx->submit_state.link; int ret; ret = io_init_req(ctx, req, sqe); if (unlikely(ret)) { fail_req: if (link->head) { /* fail even hard links since we don't submit */ ...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
301,032,589,699,699,430,000,000,000,000,000,000,000
74
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
static int __init eventpoll_init(void) { struct sysinfo si; si_meminfo(&si); /* * Allows top 4% of lomem to be allocated for epoll watches (per user). */ max_user_watches = (((si.totalram - si.totalhigh) / 25) << PAGE_SHIFT) / EP_ITEM_COST; BUG_ON(max_user_watches < 0); /* * Initialize the structure use...
0
[ "CWE-416" ]
linux
a9ed4a6560b8562b7e2e2bed9527e88001f7b682
170,002,017,510,695,970,000,000,000,000,000,000,000
34
epoll: Keep a reference on files added to the check list When adding a new fd to an epoll, and that this new fd is an epoll fd itself, we recursively scan the fds attached to it to detect cycles, and add non-epool files to a "check list" that gets subsequently parsed. However, this check list isn't completely safe wh...
static int econet_create(struct net *net, struct socket *sock, int protocol) { struct sock *sk; struct econet_sock *eo; int err; if (net != &init_net) return -EAFNOSUPPORT; /* Econet only provides datagram services. */ if (sock->type != SOCK_DGRAM) return -ESOCKTNOSUPPORT; sock->state = SS_UNCONNECTED; ...
0
[ "CWE-200" ]
linux-2.6
80922bbb12a105f858a8f0abb879cb4302d0ecaa
404,536,188,742,799,100,000,000,000,000,000,000
34
econet: Fix econet_getname() leak econet_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static void perf_event_init_userpage(struct perf_event *event) { struct perf_event_mmap_page *userpg; struct ring_buffer *rb; rcu_read_lock(); rb = rcu_dereference(event->rb); if (!rb) goto unlock; userpg = rb->user_page; /* Allow new userspace to detect that bit 0 is deprecated */ userpg->cap_bit0_is_depr...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
173,151,282,920,057,700,000,000,000,000,000,000,000
19
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
static inline bool op_affect_dst(RAnalOp* op) { switch (op->type) { case R_ANAL_OP_TYPE_ADD: case R_ANAL_OP_TYPE_SUB: case R_ANAL_OP_TYPE_MUL: case R_ANAL_OP_TYPE_DIV: case R_ANAL_OP_TYPE_SHR: case R_ANAL_OP_TYPE_SHL: case R_ANAL_OP_TYPE_SAL: case R_ANAL_OP_TYPE_SAR: case R_ANAL_OP_TYPE_OR: case R_ANAL_OP_TY...
0
[ "CWE-416" ]
radare2
a7ce29647fcb38386d7439696375e16e093d6acb
112,281,595,730,636,990,000,000,000,000,000,000,000
23
Fix UAF in aaaa on arm/thumb switching ##crash * Reported by @peacock-doris via huntr.dev * Reproducer tests_65185 * This is a logic fix, but not the fully safe as changes in the code can result on UAF again, to properly protect r2 from crashing we need to break the ABI and add refcounting to RRegItem, which can't...
void SampleInterleavedLSScan::FindComponentDimensions(void) { #if ACCUSOFT_CODE UBYTE cx; JPEGLSScan::FindComponentDimensions(); // // Check that all MCU dimensions are 1. for(cx = 0;cx < m_ucCount;cx++) { class Component *comp = ComponentOf(cx); if (comp->MCUHeightOf() != 1 || comp->MCUWidthOf()...
0
[ "CWE-617", "CWE-703" ]
libjpeg
4746b577931e926a49e50de9720a4946de3069a7
309,886,949,278,282,440,000,000,000,000,000,000,000
17
Fixed handling of empty JPEG-LS scans.
static int get_rdrand_seed() { DEBUG_SEED("get_rdrand_seed"); int r; while (_rdrand32_step(&r) == 0); return r; }
0
[ "CWE-119", "CWE-310" ]
json-c
64e36901a0614bf64a19bc3396469c66dcd0b015
330,033,677,679,255,000,000,000,000,000,000,000,000
7
Patch to address the following issues: * CVE-2013-6371: hash collision denial of service * CVE-2013-6370: buffer overflow if size_t is larger than int
xmlGetPredefinedEntity(const xmlChar *name) { if (name == NULL) return(NULL); switch (name[0]) { case 'l': if (xmlStrEqual(name, BAD_CAST "lt")) return(&xmlEntityLt); break; case 'g': if (xmlStrEqual(name, BAD_CAST "gt")) return(&xmlEntityGt); break; ...
0
[ "CWE-189" ]
libxml2
4f9fdc709c4861c390cd84e2ed1fd878b3442e28
264,286,027,445,710,880,000,000,000,000,000,000,000
26
Fix entities local buffers size problems
void writecb(struct ev_loop *loop, ev_io *w, int revents) { int rv; auto handler = static_cast<Http2Handler *>(w->data); rv = handler->on_write(); if (rv == -1) { delete_handler(handler); } }
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
209,736,322,758,368,850,000,000,000,000,000,000,000
9
Don't read too greedily
tty_check_codeset(struct tty *tty, const struct grid_cell *gc) { static struct grid_cell new; u_int n; /* Characters less than 0x7f are always fine, no matter what. */ if (gc->data.size == 1 && *gc->data.data < 0x7f) return (gc); /* UTF-8 terminal and a UTF-8 character - fine. */ if (tty->flags & TTY_UTF8) ...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
267,996,005,159,375,400,000,000,000,000,000,000,000
22
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
TEST(FormatterTest, FormatNaN) { double nan = std::numeric_limits<double>::quiet_NaN(); EXPECT_EQ("nan", format("{}", nan)); EXPECT_EQ("+nan", format("{:+}", nan)); EXPECT_EQ(" nan", format("{: }", nan)); EXPECT_EQ("NAN", format("{:F}", nan)); EXPECT_EQ("nan ", format("{:<7}", nan)); EXPECT_EQ(" nan ...
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
55,146,762,275,581,330,000,000,000,000,000,000,000
10
Fix segfault on complex pointer formatting (#642)
GF_Err gf_isom_box_array_read(GF_Box *parent, GF_BitStream *bs) { return gf_isom_box_array_read_ex(parent, bs, parent->type); }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
240,263,696,140,371,380,000,000,000,000,000,000,000
4
fixed #1768
static void do_cgm_get(const char *name, const char *lxcpath, const char *filename, int outp, bool sendvalue) { char *controller, *key, *cgroup = NULL, *cglast; int len = -1; int ret; nih_local char *result = NULL; controller = alloca(strlen(filename)+1); strcpy(controller, filename); key = strchr(controller, '...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
25,445,688,596,015,990,000,000,000,000,000,000,000
79
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
diff_check(win_T *wp, linenr_T lnum) { int idx; // index in tp_diffbuf[] for this buffer diff_T *dp; int maxcount; int i; buf_T *buf = wp->w_buffer; int cmp; if (curtab->tp_diff_invalid) ex_diffupdate(NULL); // update after a big change if (curtab->tp_first_diff == NULL || !wp->...
0
[ "CWE-787" ]
vim
c101abff4c6756db4f5e740fde289decb9452efa
225,747,626,705,888,600,000,000,000,000,000,000,000
88
patch 8.2.5164: invalid memory access after diff buffer manipulations Problem: Invalid memory access after diff buffer manipulations. Solution: Use zero offset when change removes all lines in a diff block.
unsigned int lcdGetPixel_ArrayBuffer(JsGraphics *gfx, short x, short y) { unsigned int col = 0; JsVar *buf = (JsVar*)gfx->backendData; unsigned int idx = lcdGetPixelIndex_ArrayBuffer(gfx,x,y,1); JsvArrayBufferIterator it; jsvArrayBufferIteratorNew(&it, buf, idx>>3 ); if (gfx->data.bpp&7/*not a multiple of o...
0
[ "CWE-125" ]
Espruino
8a44b04b584b3d3ab1cb68fed410f7ecb165e50e
223,603,001,264,822,180,000,000,000,000,000,000,000
22
Add height check for Graphics.createArrayBuffer(...vertical_byte:true) (fix #1421)
PHP_FUNCTION(mb_ereg) { _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); }
0
[ "CWE-415" ]
php-src
5b597a2e5b28e2d5a52fc1be13f425f08f47cb62
151,118,720,824,574,100,000,000,000,000,000,000,000
4
Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free
Status NestedStackRaggedTensors( const std::vector<RaggedTensorVariant>& ragged_components, const std::vector<int>& nested_dim_sizes, const int input_ragged_rank, const int output_ragged_rank, RaggedTensorVariant* output_ragged) { output_ragged->mutable_nested_splits()->reserve(output_ragged_rank); cons...
0
[ "CWE-703", "CWE-681" ]
tensorflow
4e2565483d0ffcadc719bd44893fb7f609bb5f12
106,771,299,191,862,950,000,000,000,000,000,000,000
129
Fix bug that could cause map_fn to produce incorrect results (rather than an error) when mapping over a ragged tensor with an inappropriate fn_output_signature. (Note: there are cases where the default value for fn_output_signature is not appropriate, so the user needs to explicitly specify the correct output signatur...
ppp_hdlc_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, register const u_char *p) { register u_int length = h->len; register u_int caplen = h->caplen; u_int proto; u_int hdrlen = 0; if (caplen < 2) { ND_PRINT((ndo, "[|ppp]")); return (caplen); } switch (p[0]) { case PPP_...
0
[ "CWE-703", "CWE-770" ]
tcpdump
32027e199368dad9508965aae8cd8de5b6ab5231
251,055,364,998,739,870,000,000,000,000,000,000,000
62
PPP: When un-escaping, don't allocate a too-large buffer. The buffer should be big enough to hold the captured data, but it doesn't need to be big enough to hold the entire on-the-network packet, if we haven't captured all of it. (backported from commit e4add0b010ed6f2180dcb05a13026242ed935334)
unsigned long smt_get_time(void) { return jiffies; } // smt_get_time
0
[ "CWE-264" ]
linux-2.6
c25b9abbc2c2c0da88e180c3933d6e773245815a
48,732,052,925,725,950,000,000,000,000,000,000,000
4
drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic Fix inverted logic Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
evdev_notify_resumed_device(struct evdev_device *device) { struct libinput_device *it; if (!device->is_suspended) return; list_for_each(it, &device->base.seat->devices_list, link) { struct evdev_device *d = evdev_device(it); if (it == &device->base) continue; if (d->dispatch->interface->device_resumed)...
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
322,287,951,324,528,900,000,000,000,000,000,000,000
18
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
void snd_pcm_stream_lock(struct snd_pcm_substream *substream) { snd_pcm_group_lock(&substream->self_group, substream->pcm->nonatomic); }
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
323,623,465,097,263,520,000,000,000,000,000,000,000
4
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
dir_signing_key_is_trusted(crypto_pk_env_t *key) { char digest[DIGEST_LEN]; if (!key) return 0; if (crypto_pk_get_digest(key, digest) < 0) { log_warn(LD_DIR, "Error computing dir-signing-key digest"); return 0; } if (!router_digest_is_trusted_dir(digest)) { log_warn(LD_DIR, "Listed dir-signing-key...
0
[ "CWE-399" ]
tor
57e35ad3d91724882c345ac709666a551a977f0f
44,143,177,551,128,280,000,000,000,000,000,000,000
14
Avoid possible segfault when handling networkstatus vote with bad flavor Fix for 6530; fix on 0.2.2.6-alpha.
TDStretch * TDStretch::newInstance() { uint uExtensions; uExtensions = detectCPUextensions(); // Check if MMX/SSE instruction set extensions supported by CPU #ifdef SOUNDTOUCH_ALLOW_MMX // MMX routines available only with integer sample types if (uExtensions & SUPPORT_MMX) { ...
0
[ "CWE-617" ]
soundtouch
107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260
18,266,557,138,821,334,000,000,000,000,000,000,000
32
Replaced illegal-number-of-channel assertions with run-time exception
static struct bpf_blk *_gen_bpf_syscall(struct bpf_state *state, const struct db_sys_list *sys, uint64_t nxt_hash, bool acc_reset) { int rc; struct bpf_instr instr; struct bpf_blk *blk_c, *blk_s; struct bpf_jump def_jump; struct acc_state a_state; /* we do the memset before the assignment to keep ...
0
[]
libseccomp
cf5d1538d243fb6f1839db70b69469d3d7e9e077
287,673,785,545,433,800,000,000,000,000,000,000,000
63
bpf: pass the correct accumulator state to the next level We were mistakenly passing the wrong accumulator state (the state at the start of the instruction block, not at the end) which was causing us to generate unnecessary load instructions. Signed-off-by: Paul Moore <paul@paul-moore.com>
void kvm_hv_destroy_vm(struct kvm *kvm) { struct kvm_hv *hv = to_kvm_hv(kvm); struct eventfd_ctx *eventfd; int i; idr_for_each_entry(&hv->conn_to_evt, eventfd, i) eventfd_ctx_put(eventfd); idr_destroy(&hv->conn_to_evt); }
0
[ "CWE-476" ]
linux
919f4ebc598701670e80e31573a58f1f2d2bf918
245,598,686,878,757,920,000,000,000,000,000,000,000
10
KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref Reported by syzkaller: KASAN: null-ptr-deref in range [0x0000000000000140-0x0000000000000147] CPU: 1 PID: 8370 Comm: syz-executor859 Not tainted 5.11.0-syzkaller #0 RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline] RIP: 0010:kvm_hv_set_sint_gs...
void ovs_nla_free_flow_actions_rcu(struct sw_flow_actions *sf_acts) { call_rcu(&sf_acts->rcu, __ovs_nla_free_flow_actions); }
0
[ "CWE-362", "CWE-787" ]
linux
cefa91b2332d7009bc0be5d951d6cbbf349f90f8
246,645,092,762,923,330,000,000,000,000,000,000,000
4
openvswitch: fix OOB access in reserve_sfa_size() Given a sufficiently large number of actions, while copying and reserving memory for a new action of a new flow, if next_offset is greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS...
MakeArg(const T &value) : Arg(MakeValue<Formatter>(value)) { type = static_cast<Arg::Type>(MakeValue<Formatter>::type(value)); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
216,161,915,213,570,100,000,000,000,000,000,000,000
4
Fix segfault on complex pointer formatting (#642)
int store(longlong nr, bool unsigned_val) { null[0]=1; return 0; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
4,345,344,430,421,161,000,000,000,000,000,000,000
1
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static ssize_t map_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos, int cap_setid, struct uid_gid_map *map, struct uid_gid_map *parent_map) { struct seq_file *seq = file->private_data; struct user_namespace *ns = seq->private; struct uid_gid_map new_map; unsigned idx; st...
1
[ "CWE-20", "CWE-862", "CWE-863" ]
linux
d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd
262,991,182,050,408,200,000,000,000,000,000,000,000
183
userns: also map extents in the reverse map to kernel IDs The current logic first clones the extent array and sorts both copies, then maps the lower IDs of the forward mapping into the lower namespace, but doesn't map the lower IDs of the reverse mapping. This means that code in a nested user namespace with >5 extent...
bool IsSameOp(const OptimizedNodesGroup& group, const NodeDef& node) const { return group.root_node->op() == node.op(); }
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
164,391,988,156,894,780,000,000,000,000,000,000,000
3
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
unsigned long nr_iowait_cpu(int cpu) { struct rq *this = cpu_rq(cpu); return atomic_read(&this->nr_iowait); }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
264,618,999,360,383,300,000,000,000,000,000,000,000
5
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
static void ipmi_panic_request_and_wait(struct ipmi_smi *intf, struct ipmi_addr *addr, struct kernel_ipmi_msg *msg) { struct ipmi_smi_msg smi_msg; struct ipmi_recv_msg recv_msg; int rv; smi_msg.done = dummy_smi_done_handler; recv_msg.done = dummy_recv_done_handler; atomic_add(2, &panic_done_count); r...
0
[ "CWE-416", "CWE-284" ]
linux
77f8269606bf95fcb232ee86f6da80886f1dfae8
75,438,741,237,401,770,000,000,000,000,000,000,000
31
ipmi: fix use-after-free of user->release_barrier.rda When we do the following test, we got oops in ipmi_msghandler driver while((1)) do service ipmievd restart & service ipmievd restart done --------------------------------------------------------------- [ 294.230186] Unable to handle kernel paging request at virt...
INST_HANDLER (rjmp) { // RJMP k op->jump = (op->addr #ifdef _MSC_VER #pragma message ("anal_avr.c: WARNING: Probably broken on windows") + ((((( buf[1] & 0xf) << 9) | (buf[0] << 1))) | (buf[1] & 0x8 ? ~(0x1fff) : 0)) #else + ((((( (typeof (op->jump)) buf[1] & 0xf) << 9) | ((typeof (op->jump)) buf[0] << 1))) ...
0
[ "CWE-125" ]
radare2
041e53cab7ca33481ae45ecd65ad596976d78e68
279,609,698,160,463,800,000,000,000,000,000,000,000
13
Fix crash in anal.avr
poppler_fonts_iter_get_file_name (PopplerFontsIter *iter) { GooString *file; FontInfo *info; info = (FontInfo *)iter->items->get (iter->index); file = info->getFile(); if (file != nullptr) { return file->getCString(); } else { return nullptr; } }
0
[ "CWE-476" ]
poppler
f162ecdea0dda5dbbdb45503c1d55d9afaa41d44
160,648,443,719,070,840,000,000,000,000,000,000,000
14
Fix crash on missing embedded file Check whether an embedded file is actually present in the PDF and show warning in that case. https://bugs.freedesktop.org/show_bug.cgi?id=106137 https://gitlab.freedesktop.org/poppler/poppler/issues/236
gx_dc_pattern2_load(gx_device_color *pdevc, const gs_gstate *ignore_pgs, gx_device *ignore_dev, gs_color_select_t ignore_select) { return 0; }
0
[ "CWE-704" ]
ghostpdl
693baf02152119af6e6afd30bb8ec76d14f84bbf
145,449,351,377,846,990,000,000,000,000,000,000,000
5
PS interpreter - check the Implementation of a Pattern before use Bug #700141 "Type confusion in setpattern" As the bug thread says, we were not checking that the Implementation of a pattern dictionary was a structure type, leading to a crash when we tried to treat it as one. Here we make the st_pattern1_instance an...
static TraceNo trace_exit_find(jit_State *J, MCode *pc) { TraceNo traceno; for (traceno = 1; traceno < J->sizetrace; traceno++) { GCtrace *T = traceref(J, traceno); if (T && pc >= T->mcode && pc < (MCode *)((char *)T->mcode + T->szmcode)) return traceno; } lua_assert(0); return 0; }
0
[ "CWE-125" ]
LuaJIT
12ab596997b9cb27846a5b254d11230c3f9c50c8
114,969,803,445,767,640,000,000,000,000,000,000,000
11
Fix handling of errors during snapshot restore.
size_t recv_body(char* buf, size_t max) override { auto& message = parser.get(); auto& body_remaining = message.body(); body_remaining.data = buf; body_remaining.size = max; while (body_remaining.size && !parser.is_done()) { boost::system::error_code ec; http::async_read_some(stream, ...
0
[ "CWE-400" ]
ceph
ff72c50a2c43c57aead933eb4903ad1ca6d1748a
297,732,611,702,424,970,000,000,000,000,000,000,000
19
rgw: improve beast Avoid leaking connections that had partially-consumed client data on unexpected disconnect. Resolves CVE-2020-1700 (moderate impact flaw). Fixes: https://tracker.ceph.com/issues/42531 Signed-off-by: Or Friedmann <ofriedma@redhat.com> Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
GF_DOMEventTarget *gf_dom_event_get_target_from_node(GF_Node *n) { GF_DOMEventTarget *target = NULL; //GF_HTML_MediaElement *me = html_media_element_get_from_node(c, n); //*target = me->evt_target; if (!n->sgprivate->interact) { GF_SAFEALLOC(n->sgprivate->interact, struct _node_interactive_ext); if (!n->sgpriv...
0
[ "CWE-416" ]
gpac
9723dd0955894f2cb7be13b94cf7a47f2754b893
207,276,449,381,965,670,000,000,000,000,000,000,000
17
fixed #2109
checkhttpprefix(struct Curl_easy *data, const char *s, size_t len) { struct curl_slist *head = data->set.http200aliases; statusline rc = STATUS_BAD; statusline onmatch = len >= 5? STATUS_DONE : STATUS_UNKNOWN; while(head) { if(checkprefixmax(head->data, s, len)) { rc = onmatch; ...
0
[]
curl
48d7064a49148f03942380967da739dcde1cdc24
176,847,202,973,123,450,000,000,000,000,000,000,000
20
cookie: apply limits - Send no more than 150 cookies per request - Cap the max length used for a cookie: header to 8K - Cap the max number of received Set-Cookie: headers to 50 Bug: https://curl.se/docs/CVE-2022-32205.html CVE-2022-32205 Reported-by: Harry Sintonen Closes #9048
uint purge_log_get_error_code(int res) { uint errcode= 0; switch (res) { case 0: break; case LOG_INFO_EOF: errcode= ER_UNKNOWN_TARGET_BINLOG; break; case LOG_INFO_IO: errcode= ER_IO_ERR_LOG_INDEX_READ; break; case LOG_INFO_INVALID:errcode= ER_BINLOG_PURGE_PROHIBITED; break; case LOG_INFO_SEEK: errcode= ...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
51,492,728,490,517,130,000,000,000,000,000,000,000
19
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
PHP_FUNCTION(curl_strerror) { zend_long code; const char *str; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &code) == FAILURE) { return; } str = curl_easy_strerror(code); if (str) { RETURN_STRING(str); } else { RETURN_NULL(); } }
0
[]
php-src
124fb22a13fafa3648e4e15b4f207c7096d8155e
16,445,376,839,860,765,000,000,000,000,000,000,000
16
Fixed bug #68739 #68740 #68741
RGWSetRequestPaymentParser() {}
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
17,941,545,339,409,966,000,000,000,000,000,000,000
1
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
static int nft_value_init(const struct nft_ctx *ctx, struct nft_data *data, struct nft_data_desc *desc, const struct nlattr *nla) { unsigned int len; len = nla_len(nla); if (len == 0) return -EINVAL; if (len > sizeof(data->data)) return -EOVERFLOW; nla_memcpy(data->data, nla, sizeof(data->data)); desc-...
0
[ "CWE-19" ]
nf
a2f18db0c68fec96631c10cad9384c196e9008ac
7,872,447,958,988,911,000,000,000,000,000,000,000
16
netfilter: nf_tables: fix flush ruleset chain dependencies Jumping between chains doesn't mix well with flush ruleset. Rules from a different chain and set elements may still refer to us. [ 353.373791] ------------[ cut here ]------------ [ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159! [ 353.373896...
bool match_collation_to_optimize_range() const { return true; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
120,000,328,609,441,770,000,000,000,000,000,000,000
1
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
void yajl_string_decode(yajl_buf buf, const unsigned char * str, unsigned int len) { unsigned int beg = 0; unsigned int end = 0; while (end < len) { if (str[end] == '\\') { char utf8Buf[5]; const char * unescaped = "?"; yajl_buf_append...
0
[ "CWE-134" ]
yajl-ruby
a8ca8f476655adaa187eedc60bdc770fff3c51ce
310,070,501,432,923,980,000,000,000,000,000,000,000
63
Don't advance our end pointer until we've checked we have enough buffer left and have peeked ahead to see that a unicode escape is approaching. Thanks @kivikakk for helping me track down the actual bug here!
void OSDService::agent_stop() { { Mutex::Locker l(agent_lock); // By this time all ops should be cancelled assert(agent_ops == 0); // By this time all PGs are shutdown and dequeued if (!agent_queue.empty()) { set<PGRef>& top = agent_queue.rbegin()->second; derr << "agent queue not emp...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
291,575,199,850,572,100,000,000,000,000,000,000,000
19
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
int parse_sequence_header(davs2_mgr_t *mgr, davs2_seq_t *seq, davs2_bs_t *bs) { static const float FRAME_RATE[8] = { 24000.0f / 1001.0f, 24.0f, 25.0f, 30000.0f / 1001.0f, 30.0f, 50.0f, 60000.0f / 1001.0f, 60.0f }; rps_t *p_rps = NULL; int i, j; int num_of_rps; bs->i_bit_pos += 32;...
1
[ "CWE-787" ]
davs2
b41cf117452e2d73d827f02d3e30aa20f1c721ac
195,592,106,749,551,730,000,000,000,000,000,000,000
158
Add checking for `frame_rate_code`. Signed-off-by: luofl <falei.luo@gmail.com>
tiff_document_render (EvDocument *document, EvRenderContext *rc) { TiffDocument *tiff_document = TIFF_DOCUMENT (document); int width, height; int scaled_width, scaled_height; float x_res, y_res; gint rowstride, bytes; guchar *pixels = NULL; guchar *p; int orientation; cairo_surface_t *surface; ca...
1
[]
evince
e02fe9170ad0ac2fd46c75329c4f1d4502d4a362
322,197,536,936,793,970,000,000,000,000,000,000,000
113
Fix overflow checks in tiff backend The overflow checks in tiff_document_render and tiff_document_get_thumbnail don't work when optimizations are enabled. Change the checks so they don't rely on undefined behavior. https://bugzilla.gnome.org/show_bug.cgi?id=788980
void __might_fault(const char *file, int line) { /* * Some code (nfs/sunrpc) uses socket ops on kernel memory while * holding the mmap_sem, this is safe because kernel memory doesn't * get paged out, therefore we'll never actually fault, and the * below annotations will generate false positives. */ if (segm...
0
[ "CWE-20" ]
linux
6b7339f4c31ad69c8e9c0b2859276e22cf72176d
293,359,654,587,840,020,000,000,000,000,000,000,000
18
mm: avoid setting up anonymous pages into file mapping Reading page fault handler code I've noticed that under right circumstances kernel would map anonymous pages into file mappings: if the VMA doesn't have vm_ops->fault() and the VMA wasn't fully populated on ->mmap(), kernel would handle page fault to not populated...
void rfbClientAuthFailed(rfbClientPtr cl, char *reason) { int reasonLen; char buf[8]; CARD32 *buf32 = (CARD32 *)buf; if (cl->protocol_minor_ver < 8) reason = NULL; /* invalidate the pointer */ reasonLen = (reason == NULL) ? 0 : strlen(reason); buf32[0] = Swap32IfLE(rfbAuthFailed); buf32...
0
[ "CWE-787" ]
turbovnc
cea98166008301e614e0d36776bf9435a536136e
264,264,078,730,796,540,000,000,000,000,000,000,000
23
Server: Fix two issues identified by ASan 1. If the TLSPlain and X509Plain security types were both disabled, then rfbOptPamAuth() would overflow the name field in the secTypes structure when testing the "none" security type, since the name of that security type has less than five characters. This issue was ...
ipmi_sdr_print_sensor_mask(struct ipmi_intf *intf, struct sdr_record_mask *mask, uint8_t sensor_type, uint8_t event_type, int numeric_fmt) { /* iceblink - don't print some event status fields - CVS rev1.53 */ return 0; switch (numeric_fmt) { case DISCRETE_SENSOR: ipmi_sdr_print_discrete_state(intf, "Ass...
0
[ "CWE-120" ]
ipmitool
7ccea283dd62a05a320c1921e3d8d71a87772637
217,992,912,481,746,770,000,000,000,000,000,000,000
86
fru, sdr: Fix id_string buffer overflows Final part of the fixes for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp 9 variants of stack buffer overflow when parsing `id_string` field of SDR records returned from `CMD_GET_SDR` command. SDR record structs have an `id_co...
int udf_get_filename(struct super_block *sb, uint8_t *sname, uint8_t *dname, int flen) { struct ustr *filename, *unifilename; int len = 0; filename = kmalloc(sizeof(struct ustr), GFP_NOFS); if (!filename) return 0; unifilename = kmalloc(sizeof(struct ustr), GFP_NOFS); if (!unifilename) goto out1; i...
1
[ "CWE-17" ]
linux
0e5cc9a40ada6046e6bc3bdfcd0c0d7e4b706b14
107,302,440,240,380,370,000,000,000,000,000,000,000
41
udf: Check path length when reading symlink Symlink reading code does not check whether the resulting path fits into the page provided by the generic code. This isn't as easy as just checking the symlink size because of various encoding conversions we perform on path. So we have to check whether there is still enough ...
hostkey_method_ssh_rsa_sig_verify(LIBSSH2_SESSION * session, const unsigned char *sig, size_t sig_len, const unsigned char *m, size_t m_len, void **abstract) { libssh2_rsa_ctx *rsa...
1
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
269,762,447,502,407,800,000,000,000,000,000,000,000
14
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
void Compute(OpKernelContext* ctx) override { const Tensor* inputs; const Tensor* labels_indices; const Tensor* labels_values; const Tensor* seq_len; OP_REQUIRES_OK(ctx, ctx->input("inputs", &inputs)); OP_REQUIRES_OK(ctx, ctx->input("labels_indices", &labels_indices)); OP_REQUIRES_OK(ctx, ...
1
[ "CWE-665" ]
tensorflow
14607c0707040d775e06b6817325640cb4b5864c
244,510,717,646,897,700,000,000,000,000,000,000,000
125
Fix nullptr deref in `tf.raw_ops.CTCLoss`. PiperOrigin-RevId: 372266334 Change-Id: Ic52c3e9f13a38f54482d670907eda1688450862b