func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void fdctrl_handle_sense_interrupt_status(FDCtrl *fdctrl, int direction) { FDrive *cur_drv = get_cur_drv(fdctrl); if (fdctrl->reset_sensei > 0) { fdctrl->fifo[0] = FD_SR0_RDYCHG + FD_RESET_SENSEI_COUNT - fdctrl->reset_sensei; fdctrl->reset_sensei--; } else if (!(fdctrl->s...
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
34,158,605,080,317,457,000,000,000,000,000,000,000
23
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index i...
static long mem_seek(jas_stream_obj_t *obj, long offset, int origin) { jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj; long newpos; switch (origin) { case SEEK_SET: newpos = offset; break; case SEEK_END: newpos = m->len_ - offset; break; case SEEK_CUR: newpos = m->pos_ + offset; break; default:...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
135,709,311,483,314,780,000,000,000,000,000,000,000
26
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static int ip6mr_rule_configure(struct fib_rule *rule, struct sk_buff *skb, struct fib_rule_hdr *frh, struct nlattr **tb) { return 0; }
0
[ "CWE-20" ]
linux
99253eb750fda6a644d5188fb26c43bad8d5a745
329,249,168,360,892,470,000,000,000,000,000,000,000
5
ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") fixed the issue for ipv4 ipmr: ip_mroute_setsockopt() & ip_mroute_getsockopt() should not access/set raw_sk(sk)->ipmr_table before making sure the socket is a raw socket, and prot...
static void ssl_ticket_keys_free( ssl_ticket_keys *tkeys ) { aes_free( &tkeys->enc ); aes_free( &tkeys->dec ); polarssl_zeroize( tkeys, sizeof(ssl_ticket_keys) ); }
0
[ "CWE-119" ]
mbedtls
c988f32adde62a169ba340fee0da15aecd40e76e
242,193,939,190,001,970,000,000,000,000,000,000,000
7
Added max length checking of hostname
void X509Certificate::MemoryInfo(MemoryTracker* tracker) const { tracker->TrackField("cert", cert_); }
0
[ "CWE-295" ]
node
466e5415a2b7b3574ab5403acb87e89a94a980d1
272,736,595,995,075,840,000,000,000,000,000,000,000
3
crypto,tls: implement safe x509 GeneralName format This change introduces JSON-compatible escaping rules for strings that include X.509 GeneralName components (see RFC 5280). This non-standard format avoids ambiguities and prevents injection attacks that could previously lead to X.509 certificates being accepted even ...
njs_value_property(njs_vm_t *vm, njs_value_t *value, njs_value_t *key, njs_value_t *retval) { double num; uint32_t index; njs_int_t ret; njs_array_t *array; njs_object_prop_t *prop; njs_typed_array_t *tarray; njs_property_query_t ...
0
[]
njs
6549d49630ce5f5ac823fd3ae0c6c8558b8716ae
231,700,686,690,156,180,000,000,000,000,000,000,000
126
Fixed redefinition of special props in Object.defineProperty(). Previously, when NJS_PROPERTY_HANDLER property was updated it might be left in inconsistent state. Namely, prop->type was left unchanged, but prop->value did not have an expected property handler. As a result consecutive reference to the property may re...
MultiPartInputFile::Data::chunkOffsetReconstruction(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, const vector<InputPartData*>& parts) { // // Reconstruct broken chunk offset tables. Stop once we received any exception. // Int64 position = is.tellg(); // // check we understand all the part...
0
[ "CWE-94", "CWE-787" ]
openexr
8b5370c688a7362673c3a5256d93695617a4cd9a
184,157,926,472,251,480,000,000,000,000,000,000,000
246
Fix #491, issue with part number range check reconstructing chunk offset table The chunk offset was incorrectly testing for a part number that was the same size (i.e. an invalid index) Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
pci_emul_add_msicap(struct pci_vdev *dev, int msgnum) { struct msicap msicap; pci_populate_msicap(&msicap, msgnum, 0); return pci_emul_add_capability(dev, (u_char *)&msicap, sizeof(msicap)); }
1
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
2b3dedfb9ba13f15887f22b935d373f36c9a59fa
143,686,842,863,687,380,000,000,000,000,000,000,000
8
dm: pci: clean up assert() in pci core Tracked-On: #3252 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
static void vrend_renderer_blit_int(struct vrend_context *ctx, struct vrend_resource *src_res, struct vrend_resource *dst_res, const struct pipe_blit_info *info) { struct vrend_blit_info blit_info = { .b...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
242,792,255,250,786,460,000,000,000,000,000,000,000
40
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
xps_sample_gradient_stops(fz_shade *shade, struct stop *stops, int count) { float offset, d; int i, k; k = 0; for (i = 0; i < 256; i++) { offset = i / 255.0f; while (k + 1 < count && offset > stops[k+1].offset) k++; d = (offset - stops[k].offset) / (stops[k+1].offset - stops[k].offset); shade->functi...
0
[ "CWE-119" ]
mupdf
60dabde18d7fe12b19da8b509bdfee9cc886aafc
277,967,186,598,600,300,000,000,000,000,000,000,000
20
Bug 694957: fix stack buffer overflow in xps_parse_color xps_parse_color happily reads more than FZ_MAX_COLORS values out of a ContextColor array which overflows the passed in samples array. Limiting the number of allowed samples to FZ_MAX_COLORS and make sure to use that constant for all callers fixes the problem. T...
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_ADD, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_ADD_LONG_NO_OVERFLOW, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(NO_CONST_CONST,COMMUTATIVE)) { USE_OPLINE zval *op1, *op2, *result; op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); op2 = GET_OP2_ZVAL_PTR...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
248,813,125,663,254,050,000,000,000,000,000,000,000
11
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static bool add_line(String &buffer,char *line,char *in_string, bool *ml_comment, bool truncated) { uchar inchar; char buff[80], *pos, *out; COMMANDS *com; bool need_space= 0; bool ss_comment= 0; DBUG_ENTER("add_line"); if (!line[0] && buffer.is_empty()) DBUG_RETURN(0); #ifdef HA...
0
[ "CWE-863" ]
mysql-server
5ac61b2af0cf37eeed5050a91819d6d273f037a5
285,186,072,972,697,900,000,000,000,000,000,000,000
276
Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASH DESCRIPTION: =========== The bug is related to incorrect parsing of SQL queries when typed in on the CLI. The incorrect parsing can result in unexpected results. ANALYSIS: ======== The scenarios mainly happens for identifier names with a typical combination of bac...
rsvg_start_element (void *data, const xmlChar * name, const xmlChar ** atts) { RsvgPropertyBag *bag; RsvgHandle *ctx = (RsvgHandle *) data; bag = rsvg_property_bag_new ((const char **) atts); if (ctx->priv->handler) { ctx->priv->handler_nest++; if (ctx->priv->handler->start_element != ...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
303,583,435,426,924,960,000,000,000,000,000,000,000
33
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
static void test_bug23383() { const char *insert_query= "INSERT INTO t1 VALUES (1), (2)"; const char *update_query= "UPDATE t1 SET i= 4 WHERE i = 3"; MYSQL_STMT *stmt; my_ulonglong row_count; int rc; DBUG_ENTER("test_bug23383"); myheader("test_bug23383"); rc= mysql_query(mysql, "DROP TABLE IF EXISTS t...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
59,389,826,210,803,905,000,000,000,000,000,000,000
67
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...
static int oidc_target_link_uri_matches_configuration(request_rec *r, oidc_cfg *cfg, const char *target_link_uri) { apr_uri_t o_uri; apr_uri_parse(r->pool, target_link_uri, &o_uri); if (o_uri.hostname == NULL) { oidc_error(r, "could not parse the \"target_link_uri\" (%s) in to a valid URL: aborting.", t...
0
[ "CWE-601" ]
mod_auth_openidc
5c15dfb08106c2451c2c44ce7ace6813c216ba75
334,084,043,826,084,130,000,000,000,000,000,000,000
60
improve validation of the post-logout URL; closes #449 - to avoid an open redirect; thanks AIMOTO Norihito - release 2.4.0.1 Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
int crypt_reencrypt_init_by_keyring(struct crypt_device *cd, const char *name, const char *passphrase_description, int keyslot_old, int keyslot_new, const char *cipher, const char *cipher_mode, const struct crypt_params_reencrypt *params) { int r; char *passphrase; size_t passphrase_size; if (onlyLUKS2mask(...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
197,530,844,538,327,600,000,000,000,000,000,000,000
31
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static void nft_obj_commit_update(struct nft_trans *trans) { struct nft_object *newobj; struct nft_object *obj; obj = nft_trans_obj(trans); newobj = nft_trans_obj_newobj(trans); if (obj->ops->update) obj->ops->update(obj, newobj); kfree(newobj); }
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
88,353,146,612,376,850,000,000,000,000,000,000,000
13
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
MagickExport void *ResizeQuantumMemory(void *memory,const size_t count, const size_t quantum) { size_t size; if ((HeapOverflowSanityCheckGetSize(count,quantum,&size) != MagickFalse) || (size > GetMaxMemoryRequest())) { errno=ENOMEM; memory=RelinquishMagickMemory(memory); return(NU...
0
[ "CWE-369" ]
ImageMagick
70aa86f5d5d8aa605a918ed51f7574f433a18482
63,154,273,122,459,310,000,000,000,000,000,000,000
15
possible divide by zero + clear buffers
void Item_field::load_data_print_for_log_event(THD *thd, String *to) const { append_identifier(thd, to, name, (uint) strlen(name)); }
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
93,855,685,168,631,370,000,000,000,000,000,000,000
4
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
scm_dir_free (SCM p) { if (SCM_DIR_OPEN_P (p)) closedir ((DIR *) SCM_SMOB_DATA_1 (p)); return 0; }
0
[]
guile
245608911698adb3472803856019bdd5670b6614
135,942,811,407,281,230,000,000,000,000,000,000,000
6
Remove 'umask' calls from 'mkdir'. Fixes <http://bugs.gnu.org/24659>. * libguile/filesys.c (SCM_DEFINE): Remove calls to 'umask' when MODE is unbound; instead, use 0777 as the mode. Update docstring to clarify this. * doc/ref/posix.texi (File System): Adjust accordingly. * NEWS: Mention it.
static inline void tcp_end_cwnd_reduction(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); if (inet_csk(sk)->icsk_ca_ops->cong_control) return; /* Reset cwnd to ssthresh in CWR or Recovery (unless it's undone) */ if (tp->snd_ssthresh < TCP_INFINITE_SSTHRESH && (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR...
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
220,235,733,798,240,360,000,000,000,000,000,000,000
15
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 int snd_disconnect_fasync(int fd, struct file *file, int on) { return -ENODEV; }
0
[ "CWE-416" ]
linux
2a3f7221acddfe1caa9ff09b3a8158c39b2fdeac
18,974,872,308,083,340,000,000,000,000,000,000,000
4
ALSA: core: Fix card races between register and disconnect There is a small race window in the card disconnection code that allows the registration of another card with the very same card id. This leads to a warning in procfs creation as caught by syzkaller. The problem is that we delete snd_cards and snd_cards_lock ...
virtual Item *derived_field_transformer_for_where(THD *thd, uchar *arg) { return this; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
87,752,045,583,628,480,000,000,000,000,000,000,000
2
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....
Http2Session::Http2Ping* Http2Session::PopPing() { Http2Ping* ping = nullptr; if (!outstanding_pings_.empty()) { ping = outstanding_pings_.front(); outstanding_pings_.pop(); DecrementCurrentSessionMemory(sizeof(*ping)); } return ping; }
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
223,937,998,700,247,050,000,000,000,000,000,000,000
9
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
create_distinct_group(THD *thd, Ref_ptr_array ref_pointer_array, ORDER *order_list, List<Item> &fields, List<Item> &all_fields, bool *all_order_by_fields_used) { List_iterator<Item> li(fields); Item *item; Ref_ptr_array orig_ref_pointer_array= ref_pointer_array;...
0
[]
server
8c34eab9688b4face54f15f89f5d62bdfd93b8a7
238,220,693,315,422,570,000,000,000,000,000,000,000
85
MDEV-28094 Window function in expression in ORDER BY call item->split_sum_func() in setup_order() just as it's done in setup_fields()
TEST_F(HttpConnectionManagerConfigTest, HeadersWithUnderscoresRequestRejectedByConfig) { const std::string yaml_string = R"EOF( stat_prefix: ingress_http common_http_protocol_options: headers_with_underscores_action: REJECT_REQUEST route_config: name: local_route http_filters: - name: envoy.filters....
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
168,383,373,492,604,440,000,000,000,000,000,000,000
18
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
void tcp_clear_retrans(struct tcp_sock *tp) { tp->retrans_out = 0; tp->lost_out = 0; tp->undo_marker = 0; tp->undo_retrans = -1; tp->fackets_out = 0; tp->sacked_out = 0; }
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
248,841,180,352,648,350,000,000,000,000,000,000,000
9
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
_gdm_display_set_session_type (GdmDisplay *self, const char *session_type) { GdmDisplayPrivate *priv; priv = gdm_display_get_instance_private (self); g_debug ("GdmDisplay: session type: %s", session_type); g_free (priv->session_type); priv->session...
0
[ "CWE-754" ]
gdm
4e6e5335d29c039bed820c43bfd1c19cb62539ff
57,756,867,858,899,010,000,000,000,000,000,000,000
10
display: Use autoptr to handle errors in look for existing users It will make things just cleaner
const EVP_CIPHER *EVP_rc4_hmac_md5(void) { return (&r4_hmac_md5_cipher); }
0
[ "CWE-125" ]
openssl
8e20499629b6bcf868d0072c7011e590b5c2294d
113,113,850,989,502,790,000,000,000,000,000,000,000
4
crypto/evp: harden RC4_MD5 cipher. Originally a crash in 32-bit build was reported CHACHA20-POLY1305 cipher. The crash is triggered by truncated packet and is result of excessive hashing to the edge of accessible memory (or bogus MAC value is produced if x86 MD5 assembly module is involved). Since hash operation is re...
njs_generate_global_reference(njs_vm_t *vm, njs_generator_t *generator, njs_parser_node_t *node, njs_bool_t exception) { ssize_t length; njs_int_t ret; njs_index_t index; njs_value_t property; njs_vmcode_prop_get_t *prop_get; const...
0
[ "CWE-703", "CWE-754" ]
njs
404553896792b8f5f429dc8852d15784a59d8d3e
167,142,344,262,090,200,000,000,000,000,000,000,000
56
Fixed break instruction in a try-catch block. Previously, JUMP offset for a break instruction inside a try-catch block was not set to a correct offset during code generation when a return instruction was present in inner try-catch block. The fix is to update the JUMP offset appropriately. This closes #553 issue on G...
png_colorspace_set_xy_and_XYZ(png_const_structrp png_ptr, png_colorspacerp colorspace, const png_xy *xy, const png_XYZ *XYZ, int preferred) { if ((colorspace->flags & PNG_COLORSPACE_INVALID) != 0) return 0; /* The consistency check is performed on the chromaticities; this factors out * variatio...
0
[ "CWE-476" ]
libpng
812768d7a9c973452222d454634496b25ed415eb
250,984,962,666,705,400,000,000,000,000,000,000,000
46
[libpng16] Fixed a potential null pointer dereference in png_set_text_2() (bug report and patch by Patrick Keshishian).
int g_dhcpv6_create_duid(GDHCPDuidType duid_type, int index, int type, unsigned char **duid, int *duid_len) { time_t duid_time; switch (duid_type) { case G_DHCPV6_DUID_LLT: *duid_len = 2 + 2 + 4 + ETH_ALEN; *duid = g_try_malloc(*duid_len); if (!*duid) return -ENOMEM; (*duid)[0] = 0; (*duid)[1] = 1;...
0
[]
connman
a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1
198,522,862,949,732,660,000,000,000,000,000,000,000
41
gdhcp: Avoid leaking stack data via unitiialized variable Fixes: CVE-2021-26676
GF_Err EncodeBIFSChunk(GF_SceneManager *ctx, char *bifsOutputFile, GF_Err (*AUCallback)(GF_ISOSample *)) { GF_Err e; u8 *data; u32 data_len; GF_BifsEncoder *bifsenc; GF_InitialObjectDescriptor *iod; u32 i, j, count; Bool encode_names, delete_bcfg; GF_BIFSConfig *bcfg; GF_AUContext *au; char szRad[GF_MAX_PA...
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
133,578,735,108,548,550,000,000,000,000,000,000,000
136
fixed crashes for very long path - cf #1908
info_provider_idle_callback (gpointer user_data) { InfoProviderResponse *response; NautilusDirectory *directory; response = user_data; directory = response->directory; if (response->handle != directory->details->extension_info_in_progress || response->provider != directory->details->extension_info_provider)...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
284,772,178,149,883,960,000,000,000,000,000,000,000
27
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
pdf14_push_transparency_group(pdf14_ctx *ctx, gs_int_rect *rect, bool isolated, bool knockout, byte alpha, byte shape, gs_blend_mode_t blend_mode, bool idle, uint mask_id, int numcomps, bool cm_back_drop, ...
0
[]
ghostpdl
c432131c3fdb2143e148e8ba88555f7f7a63b25e
299,748,567,418,926,900,000,000,000,000,000,000,000
141
Bug 699661: Avoid sharing pointers between pdf14 compositors If a copdevice is triggered when the pdf14 compositor is the device, we make a copy of the device, then throw an error because, by default we're only allowed to copy the device prototype - then freeing it calls the finalize, which frees several pointers shar...
static void dummy_free_image(void *a) { }
0
[ "CWE-20" ]
evince
d4139205b010ed06310d14284e63114e88ec6de2
97,945,474,571,876,360,000,000,000,000,000,000,000
3
backends: Fix several security issues in the dvi-backend. See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643.
DEFINE_RUN_ONCE_STATIC_ALT(ossl_init_no_add_all_digests, ossl_init_add_all_digests) { /* Do nothing */ return 1; }
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
137,995,410,166,521,020,000,000,000,000,000,000,000
6
drbg: ensure fork-safety without using a pthread_atfork handler When the new OpenSSL CSPRNG was introduced in version 1.1.1, it was announced in the release notes that it would be fork-safe, which the old CSPRNG hadn't been. The fork-safety was implemented using a fork count, which was incremented by a pthread_atfork...
void auth_policy_deinit(void) { if (http_client != NULL) http_client_deinit(&http_client); i_free(auth_policy_json_template); }
0
[ "CWE-20" ]
core
1f2c35da2b96905bec6e45f88af0f33ee63789e6
28,074,374,642,816,624,000,000,000,000,000,000,000
6
auth: Fix auth-policy crash when username is NULL If SASL request is invalid, or incomplete, and username is left NULL, handle it gracefully by adding just NUL byte in auth policy digest for username.
__must_hold(&ctx->uring_lock) { struct task_struct *task = NULL; int task_refs = 0; do { struct io_kiocb *req = container_of(node, struct io_kiocb, comp_list); if (unlikely(req->flags & REQ_F_REFCOUNT)) { node = req->comp_list.next; if (!req_ref_put_and_test(req)) continue; } io_req_p...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
245,603,785,603,455,850,000,000,000,000,000,000,000
33
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
PHP_METHOD(Phar, getSupportedCompression) { if (zend_parse_parameters_none() == FAILURE) { return; } array_init(return_value); phar_request_initialize(TSRMLS_C); if (PHAR_G(has_zlib)) { add_next_index_stringl(return_value, "GZ", 2, 1); } if (PHAR_G(has_bz2)) { add_next_index_stringl(return_value, "BZIP...
0
[ "CWE-416" ]
php-src
b2cf3f064b8f5efef89bb084521b61318c71781b
103,700,509,863,967,380,000,000,000,000,000,000,000
17
Fixed bug #68901 (use after free)
static void annotation_get_freespace_total(annotate_state_t *state, struct annotate_entry_list *entry) { uint64_t tavail = 0; uint64_t ttotal = 0; struct buf value = BUF_INITIALIZER; (void) partlist_local_find_freespace_most(0, NULL, NULL, &tavail, &ttotal); buf_printf(&value, ...
0
[ "CWE-732" ]
cyrus-imapd
621f9e41465b521399f691c241181300fab55995
338,713,621,093,802,800,000,000,000,000,000,000,000
12
annotate: don't allow everyone to write shared server entries
static void reallymarkobject (global_State *g, GCObject *o) { white2gray(o); switch (o->tt) { case LUA_VSHRSTR: case LUA_VLNGSTR: { gray2black(o); break; } case LUA_VUPVAL: { UpVal *uv = gco2upv(o); if (!upisopen(uv)) /* open upvalues are kept gray */ gray2black(o); ...
0
[ "CWE-125" ]
lua
127e7a6c8942b362aa3c6627f44d660a4fb75312
111,719,968,132,781,600,000,000,000,000,000,000,000
32
Fixed bug of old finalized objects in the GC When an object aged OLD1 is finalized, it is moved from the list 'finobj' to the *beginning* of the list 'allgc'. So, this part of the list (and not only the survival list) must be visited by 'markold'.
com_tee(String *buffer __attribute__((unused)), char *line __attribute__((unused))) { char file_name[FN_REFLEN], *end, *param; if (status.batch) return 0; while (my_isspace(charset_info,*line)) line++; if (!(param = strchr(line, ' '))) // if outfile wasn't given, use the default { if (!st...
0
[]
server
383007c75d6ef5043fa5781956a6a02b24e2b79e
305,599,810,001,724,880,000,000,000,000,000,000,000
42
mysql cli: fix USE command quoting * use proper sql quoting rules for USE, while preserving as much of historical behavior as possible * short commands (\u) behave as before
static void vhost_iotlb_notify_vq(struct vhost_dev *d, struct vhost_iotlb_msg *msg) { struct vhost_msg_node *node, *n; spin_lock(&d->iotlb_lock); list_for_each_entry_safe(node, n, &d->pending_list, node) { struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb; if (msg->iova <= vq_msg->iova && msg->iova...
0
[ "CWE-120" ]
linux
060423bfdee3f8bc6e2c1bac97de24d5415e2bc4
297,208,213,765,360,600,000,000,000,000,000,000,000
20
vhost: make sure log_num < in_num The code assumes log_num < in_num everywhere, and that is true as long as in_num is incremented by descriptor iov count, and log_num by 1. However this breaks if there's a zero sized descriptor. As a result, if a malicious guest creates a vring desc with desc.len = 0, it may cause th...
static int64_t add_ctts_entry(MOVStts** ctts_data, unsigned int* ctts_count, unsigned int* allocated_size, int count, int duration) { MOVStts *ctts_buf_new; const size_t min_size_needed = (*ctts_count + 1) * sizeof(MOVStts); const size_t requested_size = min_size_needed...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
9cb4eb772839c5e1de2855d126bf74ff16d13382
191,753,385,915,252,400,000,000,000,000,000,000,000
26
avformat/mov: Fix DoS in read_tfra() Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static void vnc_desktop_resize(VncState *vs) { if (vs->csock == -1 || !vnc_has_feature(vs, VNC_FEATURE_RESIZE)) { return; } if (vs->client_width == pixman_image_get_width(vs->vd->server) && vs->client_height == pixman_image_get_height(vs->vd->server)) { return; } vs->client_w...
0
[ "CWE-125" ]
qemu
bea60dd7679364493a0d7f5b54316c767cf894ef
3,996,155,731,955,215,500,000,000,000,000,000,000
20
ui/vnc: fix potential memory corruption issues this patch makes the VNC server work correctly if the server surface and the guest surface have different sizes. Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of VNC_DIRTY_PIXELS...
PHPAPI void php_register_variable_safe(char *var, char *strval, size_t str_len, zval *track_vars_array) { zval new_entry; assert(strval != NULL); /* Prepare value */ ZVAL_NEW_STR(&new_entry, zend_string_init(strval, str_len, 0)); php_register_variable_ex(var, &new_entry, track_vars_array); }
0
[ "CWE-400", "CWE-703" ]
php-src
a15bffd105ac28fd0dd9b596632dbf035238fda3
227,466,766,342,466,630,000,000,000,000,000,000,000
9
Fix bug #73807
void Context::onDelete() { if (in_vm_context_created_ && wasm_->onDelete_) { wasm_->onDelete_(this, id_); } }
0
[ "CWE-476" ]
envoy
8788a3cf255b647fd14e6b5e2585abaaedb28153
98,652,352,867,023,050,000,000,000,000,000,000,000
5
1.4 - Do not call into the VM unless the VM Context has been created. (#24) * Ensure that the in VM Context is created before onDone is called. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Update as per offline discussion. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Set in_vm_context_created_ in onNet...
content::WebContents* WebContents::GetDevToolsWebContents() const { if (!inspectable_web_contents_) return nullptr; return inspectable_web_contents_->GetDevToolsWebContents(); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
149,923,682,491,555,040,000,000,000,000,000,000,000
5
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 int nfs41_free_stateid(struct nfs_server *server, const nfs4_stateid *stateid, const struct cred *cred, bool privileged) { struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_FREE_STATEID], .rpc_cred = cred, }; struct rpc_task_setup task_setup = { .rpc_client = server->client, ...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
302,702,843,864,597,500,000,000,000,000,000,000,000
39
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) { struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata; if (!capable(CAP_SYS_RAWIO)) return -EPERM; return aac_compat_do_ioctl(dev, cmd, (unsigned long)arg); }
0
[ "CWE-284", "CWE-264" ]
linux
f856567b930dfcdbc3323261bf77240ccdde01f5
142,047,906,756,792,730,000,000,000,000,000,000,000
7
aacraid: missing capable() check in compat ioctl In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we added a check on CAP_SYS_RAWIO to the ioctl. The compat ioctls need the check as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torv...
static void task_ctx_sched_out(struct perf_cpu_context *cpuctx, struct perf_event_context *ctx, enum event_type_t event_type) { if (!cpuctx->task_ctx) return; if (WARN_ON_ONCE(ctx != cpuctx->task_ctx)) return; ctx_sched_out(ctx, cpuctx, event_type); }
0
[ "CWE-190" ]
linux
1572e45a924f254d9570093abde46430c3172e3d
328,691,154,662,981,430,000,000,000,000,000,000,000
12
perf/core: Fix the perf_cpu_time_max_percent check Use "proc_dointvec_minmax" instead of "proc_dointvec" to check the input value from user-space. If not, we can set a big value and some vars will overflow like "sysctl_perf_event_sample_rate" which will cause a lot of unexpected problems. Signed-off-by: Tan Xiaojun ...
parse_bag(Node** np, PToken* tok, int term, UChar** src, UChar* end, ScanEnv* env) { int r, num; Node *target; OnigOptionType option; OnigCodePoint c; int list_capture; OnigEncoding enc = env->enc; UChar* p = *src; PFETCH_READY; *np = NULL; if (PEND) return ONIGERR_END_PATTERN_WITH_UNMAT...
0
[ "CWE-400", "CWE-399", "CWE-674" ]
oniguruma
4097828d7cc87589864fecf452f2cd46c5f37180
217,700,206,575,480,460,000,000,000,000,000,000,000
585
fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves.
explicit WriteCallbackBase(SendMsgParamsCallbackBase* mcb = nullptr) : state(STATE_WAITING), bytesWritten(0), exception(AsyncSocketException::UNKNOWN, "none"), mcb_(mcb) {}
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
20,751,853,483,143,426,000,000,000,000,000,000,000
5
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
static Variant HHVM_METHOD(ZipArchive, getCommentName, const String& name, int64_t flags) { auto zipDir = getResource<ZipDirectory>(this_, "zipDir"); FAIL_IF_INVALID_ZIPARCHIVE(getCommentName, zipDir); if (name.empty()) { raise_notice("ZipArchive::getCommentName(): Empty string as s...
0
[ "CWE-22" ]
hhvm
65c95a01541dd2fbc9c978ac53bed235b5376686
109,498,462,071,401,950,000,000,000,000,000,000,000
21
ZipArchive::extractTo bug 70350 Summary:Don't allow upward directory traversal when extracting zip archive files. Files in zip files with `..` or starting at main root `/` should be normalized to something where the file being extracted winds up within the directory or a subdirectory where the actual extraction is ta...
mdl_lock_tables() { msg_ts("Initializing MDL on all current tables.\n"); MYSQL_RES *mysql_result = NULL; MYSQL_ROW row; mdl_con = xb_mysql_connect(); if (mdl_con != NULL) { xb_mysql_query(mdl_con, "BEGIN", false, true); mysql_result = xb_mysql_query(mdl_con, "SELECT NAME, SPACE FROM " "INFORMATION_SCH...
0
[ "CWE-200" ]
percona-xtrabackup
7742f875bb289a874246fb4653b7cd9f14b588fe
263,164,391,609,098,370,000,000,000,000,000,000,000
37
PXB-2722 password is written into xtrabackup_info https://jira.percona.com/browse/PXB-2722 Analysis: password passed with -p option is written into backup tool_command in xtrabackup_info Fix: mask password before writting into xtrabackup_info
int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key) { if (ctx->cipher->flags & EVP_CIPH_RAND_KEY) return EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_RAND_KEY, 0, key); if (RAND_bytes(key, ctx->key_len) <= 0) return 0; return 1; }
0
[ "CWE-189" ]
openssl
3f3582139fbb259a1c3cbb0a25236500a409bf26
279,021,139,235,764,500,000,000,000,000,000,000,000
8
Fix encrypt overflow An overflow can occur in the EVP_EncryptUpdate function. If an attacker is able to supply very large amounts of input data after a previous call to EVP_EncryptUpdate with a partial block then a length check can overflow resulting in a heap corruption. Following an analysis of all OpenSSL internal...
static inline int bpf_try_make_writable(struct sk_buff *skb, unsigned int write_len) { int err = __bpf_try_make_writable(skb, write_len); bpf_compute_data_pointers(skb); return err; }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
97,564,921,183,437,870,000,000,000,000,000,000,000
8
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
static inline int copy_fregs_to_user(struct fregs_state __user *fx) { return user_insn(fnsave %[fx]; fwait, [fx] "=m" (*fx), "m" (*fx)); }
0
[ "CWE-119", "CWE-732", "CWE-787" ]
linux
59c4bd853abcea95eccc167a7d7fd5f1a5f47b98
319,030,871,185,132,000,000,000,000,000,000,000,000
4
x86/fpu: Don't cache access to fpu_fpregs_owner_ctx The state/owner of the FPU is saved to fpu_fpregs_owner_ctx by pointing to the context that is currently loaded. It never changed during the lifetime of a task - it remained stable/constant. After deferred FPU registers loading until return to userland was implement...
int dm_wait_event(struct mapped_device *md, int event_nr) { return wait_event_interruptible(md->eventq, (event_nr != atomic_read(&md->event_nr))); }
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
111,707,049,652,866,490,000,000,000,000,000,000,000
5
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
void __init numa_policy_init(void) { nodemask_t interleave_nodes; unsigned long largest = 0; int nid, prefer = 0; policy_cache = kmem_cache_create("numa_policy", sizeof(struct mempolicy), 0, SLAB_PANIC, NULL); sn_cache = kmem_cache_create("shared_policy_node", sizeof(struct sp_node), ...
0
[ "CWE-388" ]
linux
cf01fb9985e8deb25ccf0ea54d916b8871ae0e62
42,639,707,545,064,190,000,000,000,000,000,000,000
52
mm/mempolicy.c: fix error handling in set_mempolicy and mbind. In the case that compat_get_bitmap fails we do not want to copy the bitmap to the user as it will contain uninitialized stack data and leak sensitive data. Signed-off-by: Chris Salls <salls@cs.ucsb.edu> Signed-off-by: Linus Torvalds <torvalds@linux-founda...
static inline bool __is_set_ckpt_flags(struct f2fs_checkpoint *cp, unsigned int f) { unsigned int ckpt_flags = le32_to_cpu(cp->ckpt_flags); return ckpt_flags & f; }
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
117,896,658,477,028,340,000,000,000,000,000,000,000
6
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { const TfLiteTensor* input = GetInput(context, node, kInputTensor); TfLiteTensor* output = GetOutput(context, node, kOutputTensor); // There are two ways in which the 'output' can be made dynamic: it could be // a string tensor, or its shape cannot b...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
127,686,078,964,103,970,000,000,000,000,000,000,000
27
[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...
QPDF::parse_xrefFirst(std::string const& line, int& obj, int& num, int& bytes) { // is_space and is_digit both return false on '\0', so this will // not overrun the null-terminated buffer. char const* p = line.c_str(); char const* start = line.c_str(); // Skip zero or more spa...
1
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
279,217,274,869,845,600,000,000,000,000,000,000,000
55
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
HEADER* imap_hcache_get (IMAP_DATA* idata, unsigned int uid) { char key[16]; unsigned int* uv; HEADER* h = NULL; if (!idata->hcache) return NULL; sprintf (key, "/%u", uid); uv = (unsigned int*)mutt_hcache_fetch (idata->hcache, key, imap_hcache_keylen); if (uv...
0
[ "CWE-78" ]
mutt
185152818541f5cdc059cbff3f3e8b654fc27c1d
258,285,061,749,628,600,000,000,000,000,000,000,000
23
Properly quote IMAP mailbox names when (un)subscribing. When handling automatic subscription (via $imap_check_subscribed), or manual subscribe/unsubscribe commands, mutt generating a "mailboxes" command but failed to properly escape backquotes. Thanks to Jeriko One for the detailed bug report and patch, which this co...
static int ext4_writeback_write_end(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata) { handle_t *handle = ext4_journal_current_handle(); struct inode *inode = mapping->host; int ret = 0, ret2; loff_t new_i_size; trace_mark(ex...
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
58,658,918,654,873,260,000,000,000,000,000,000,000
36
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
void page_unlock_anon_vma_read(struct anon_vma *anon_vma) { anon_vma_unlock_read(anon_vma); }
0
[ "CWE-400", "CWE-703", "CWE-264" ]
linux
57e68e9cd65b4b8eb4045a1e0d0746458502554c
314,261,532,862,916,930,000,000,000,000,000,000,000
4
mm: try_to_unmap_cluster() should lock_page() before mlocking A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin fuzzing with trinity. The call site try_to_unmap_cluster() does not lock the pages other than its check_page parameter (which is already locked). The BUG_ON in mlock_vma_page() is not ...
static void oidc_scrub_request_headers(request_rec *r, const char *claim_prefix, const char *authn_header) { const int prefix_len = claim_prefix ? strlen(claim_prefix) : 0; /* get an array representation of the incoming HTTP headers */ const apr_array_header_t * const h = apr_table_elts(r->headers_in); /* tabl...
0
[ "CWE-20" ]
mod_auth_openidc
612e309bfffd6f9b8ad7cdccda3019fc0865f3b4
84,219,081,894,269,260,000,000,000,000,000,000,000
43
don't echo query params on invalid requests to redirect URI; closes #212 thanks @LukasReschke; I'm sure there's some OWASP guideline that warns against this
static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception) { Image *image, *image2=NULL, *rotated_image; PixelPacket *q; unsigned int status; MATHeader MATLAB_HDR; size_t size; size_t CellType; QuantumInfo *quantum_info; ImageInfo *clone_info; int i; ssize_t ldblk; unsign...
0
[ "CWE-787" ]
ImageMagick6
e806bc5559474b19114faf235266dbb8f6b206ee
71,780,605,776,664,530,000,000,000,000,000,000,000
501
...
static int common_listxattr(struct fuse *f, fuse_req_t req, fuse_ino_t ino, char *list, size_t size) { char *path; int err; err = -ENOENT; pthread_rwlock_rdlock(&f->tree_lock); path = get_path(f, ino); if (path != NULL) { struct fuse_intr_data d; fuse...
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
2,929,522,226,276,079,000,000,000,000,000,000,000
19
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
static void Ins_CINDEX( INS_ARG ) { Long L; L = args[0]; if ( L<0 || L > CUR.args ) CUR.error = TT_Err_Invalid_Reference; else args[0] = CUR.stack[CUR.args - L]; }
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
277,630,667,149,448,330,000,000,000,000,000,000,000
11
Bug 698024: bounds check zone pointer in Ins_MIRP()
static void makeNonBlockingPipe(int pipefds[2]) { if (pipe(pipefds) != 0) { throw std::runtime_error("Cannot create pipe"); } if (::fcntl(pipefds[0], F_SETFL, O_NONBLOCK) != 0) { throw std::runtime_error("Cannot set pipe to nonblocking"); } if (::fcntl(pipefds[1], F_SETFL, O_NONBLOCK) != 0) { thro...
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
290,331,354,236,331,150,000,000,000,000,000,000,000
11
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
void unlock_rename(struct dentry *p1, struct dentry *p2) { mutex_unlock(&p1->d_inode->i_mutex); if (p1 != p2) { mutex_unlock(&p2->d_inode->i_mutex); mutex_unlock(&p1->d_inode->i_sb->s_vfs_rename_mutex); } }
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
177,004,251,913,984,170,000,000,000,000,000,000,000
8
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
struct inode *ext4_iget(struct super_block *sb, unsigned long ino) { struct ext4_iloc iloc; struct ext4_inode *raw_inode; struct ext4_inode_info *ei; struct buffer_head *bh; struct inode *inode; long ret; int block; inode = iget_locked(sb, ino); if (!inode) return ERR_PTR(-ENOMEM); if (!(inode->i_state & I...
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
88,014,064,501,081,030,000,000,000,000,000,000,000
145
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
int iscsi_extract_key_value(char *textbuf, char **key, char **value) { *value = strchr(textbuf, '='); if (!*value) { pr_err("Unable to locate \"=\" separator for key," " ignoring request.\n"); return -1; } *key = textbuf; **value = '\0'; *value = *value + 1; return 0; }
0
[ "CWE-119" ]
target-pending
cea4dcfdad926a27a18e188720efe0f2c9403456
55,459,323,235,980,840,000,000,000,000,000,000,000
15
iscsi-target: fix heap buffer overflow on error If a key was larger than 64 bytes, as checked by iscsi_check_key(), the error response packet, generated by iscsi_add_notunderstood_response(), would still attempt to copy the entire key into the packet, overflowing the structure on the heap. Remote preauthentication ke...
int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, int (*output)(struct net *, struct sock *, struct sk_buff *)) { struct sk_buff *frag; struct rt6_info *rt = (struct rt6_info *)skb_dst(skb); struct ipv6_pinfo *np = skb->sk && !dev_recursion_level() ? inet6_sk(skb->sk) : NULL; struct ipv...
0
[ "CWE-362" ]
net
85f1bd9a7b5a79d5baa8bf44af19658f7bf77bfa
199,109,161,297,091,780,000,000,000,000,000,000,000
288
udp: consistently apply ufo or fragmentation When iteratively building a UDP datagram with MSG_MORE and that datagram exceeds MTU, consistently choose UFO or fragmentation. Once skb_is_gso, always apply ufo. Conversely, once a datagram is split across multiple skbs, do not consider ufo. Sendpage already maintains th...
static int parseCharMetrics(FILE *fp, FontInfo *fi) { BOOL cont = TRUE, firstTime = TRUE; int error = ok, count = 0; register CharMetricInfo *temp = fi->cmi; register char *keyword; while (cont) { keyword = token(fp); if (keyword == NULL) { error = earlyE...
0
[ "CWE-20" ]
evince
d4139205b010ed06310d14284e63114e88ec6de2
21,241,097,445,793,392,000,000,000,000,000,000,000
91
backends: Fix several security issues in the dvi-backend. See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643.
static void *decode_register(struct x86_emulate_ctxt *ctxt, u8 modrm_reg, int byteop) { void *p; int highbyte_regs = (ctxt->rex_prefix == 0) && byteop; if (highbyte_regs && modrm_reg >= 4 && modrm_reg < 8) p = (unsigned char *)reg_rmw(ctxt, modrm_reg & 3) + 1; else p = reg_rmw(ctxt, modrm_reg); return...
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
17,924,558,055,063,727,000,000,000,000,000,000,000
12
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
static int sgi_timer_del(struct k_itimer *timr) { cnodeid_t nodeid = timr->it.mmtimer.node; unsigned long irqflags; spin_lock_irqsave(&timers[nodeid].lock, irqflags); if (timr->it.mmtimer.clock != TIMER_OFF) { unsigned long expires = timr->it.mmtimer.expires; struct rb_node *n = timers[nodeid].timer_head.rb_no...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
42,612,115,540,941,370,000,000,000,000,000,000,000
48
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 ...
void X509Certificate::CheckIssued(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); X509Certificate* cert; ASSIGN_OR_RETURN_UNWRAP(&cert, args.Holder()); CHECK(args[0]->IsObject()); CHECK(X509Certificate::HasInstance(env, args[0].As<Object>())); X509Certificate* ...
0
[ "CWE-295" ]
node
466e5415a2b7b3574ab5403acb87e89a94a980d1
216,179,414,824,674,830,000,000,000,000,000,000,000
14
crypto,tls: implement safe x509 GeneralName format This change introduces JSON-compatible escaping rules for strings that include X.509 GeneralName components (see RFC 5280). This non-standard format avoids ambiguities and prevents injection attacks that could previously lead to X.509 certificates being accepted even ...
static int read_new_config_info (WavpackContext *wpc, WavpackMetadata *wpmd) { int bytecnt = wpmd->byte_length; unsigned char *byteptr = (unsigned char *)wpmd->data; wpc->version_five = 1; // just having this block signals version 5.0 wpc->file_format = wpc->config.qmode = wpc->channel_layout = 0...
0
[ "CWE-476", "CWE-703" ]
WavPack
25b4a2725d8568212e7cf89ca05ca29d128af7ac
63,910,160,059,542,860,000,000,000,000,000,000,000
67
issue #121: NULL pointer dereference in wvunpack.c * check for NULL pointer before dereferencing in wvunpack.c * sanitize custom extensions to be alphanumeric only
Bool gf_fs_check_filter_register_cap(const GF_FilterRegister *f_reg, u32 incode, GF_PropertyValue *cap_input, u32 outcode, GF_PropertyValue *cap_output, Bool exact_match_only) { return gf_fs_check_filter_register_cap_ex(f_reg, incode, cap_input, outcode, cap_output, exact_match_only, GF_FALSE); }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
97,878,608,010,168,460,000,000,000,000,000,000,000
4
fixed crashes for very long path - cf #1908
doit (struct query *z, int state) { char key[257]; char misc[20], header[12]; char *buf = 0, *cached = 0; const char *whichserver = 0; unsigned int rcode = 0; unsigned int posanswers = 0; unsigned int len = 0, cachedlen = 0; uint16 numanswers = 0; uint16 numauthority = 0; unsig...
0
[]
ndjbdns
c90dbbbac5622e2744733f39e037263e63b51266
192,330,827,822,544,830,000,000,000,000,000,000,000
1,057
Patch to fix ghost domain attack vulnerability. Applied a security patch to fix ghost domain attack vulnerability CVE-2012-1911, BZ#838761. -> http://marc.info/?l=djbdns&m=134269902121506&w=2 The original patch was written by Mr Peter Conrad. While the issue was created by Mr Mark Johnson. Sincere thanks to both Ma...
void ElectronBrowserClient::OverrideURLLoaderFactoryParams( content::BrowserContext* browser_context, const url::Origin& origin, bool is_for_isolated_world, network::mojom::URLLoaderFactoryParams* factory_params) { if (factory_params->top_frame_id) { // Bypass CORB and CORS when web security is di...
0
[]
electron
6d9f3a494596d6b3e30938af9deb2c79f1c7f797
108,424,681,313,134,040,000,000,000,000,000,000,000
21
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#34191) fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33367) * Make ElectronBrowser mojo interface frame associated. (#32815) Co-authored-by: Marek Haranczyk <marek@openfin.co> * fix: e...
static UINT drive_process_irp_silent_ignore(DRIVE_DEVICE* drive, IRP* irp) { UINT32 FsInformationClass; if (!drive || !irp || !irp->output || !irp->Complete) return ERROR_INVALID_PARAMETER; if (Stream_GetRemainingLength(irp->input) < 4) return ERROR_INVALID_DATA; Stream_Read_UINT32(irp->input, FsInformationC...
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
31,254,773,144,612,490,000,000,000,000,000,000,000
14
Fixed oob read in irp_write and similar
static void *remove_tmpdir_thread(void *p) { _cleanup_free_ char *path = p; (void) rm_rf(path, REMOVE_ROOT|REMOVE_PHYSICAL); return NULL; }
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
188,004,851,454,531,800,000,000,000,000,000,000,000
6
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
void DecimalQuantity::setFractionLength(int32_t minFrac, int32_t maxFrac) { // Validation should happen outside of DecimalQuantity, e.g., in the Precision class. U_ASSERT(minFrac >= 0); U_ASSERT(maxFrac >= minFrac); // Save values into internal state // Negation is safe for minFrac/maxFrac because ...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
238,239,998,387,129,450,000,000,000,000,000,000,000
10
ICU-20246 Fixing another integer overflow in number parsing.
ldap_op_change_id (LDAPOp *op, gint msg_id) { EBookBackend *backend = op->backend; EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend); g_rec_mutex_lock (&eds_ldap_handler_lock); g_rec_mutex_lock (&bl->priv->op_hash_mutex); g_hash_table_remove (bl->priv->id_to_op, &op->id); op->id = msg_id; ...
0
[]
evolution-data-server
34bad61738e2127736947ac50e0c7969cc944972
211,926,942,659,901,300,000,000,000,000,000,000,000
16
Bug 796174 - strcat() considered unsafe for buffer overflow
static void digest2hex( mongo_md5_byte_t digest[16], char hex_digest[33] ) { static const char hex[16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; int i; for ( i=0; i<16; i++ ) { hex_digest[2*i] = hex[( digest[i] & 0xf0 ) >> 4]; hex_digest[2*i + 1] = hex[ digest[...
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
270,513,778,506,798,980,000,000,000,000,000,000,000
9
don't mix up int and size_t (first pass to fix that)
xfs_bmap_compute_maxlevels( xfs_mount_t *mp, /* file system mount structure */ int whichfork) /* data or attr fork */ { int level; /* btree level */ uint maxblocks; /* max blocks at this level */ uint maxleafents; /* max leaf entries possible */ int maxrootrecs; /* max records in root block */ int minlea...
0
[]
linux
2c4306f719b083d17df2963bc761777576b8ad1b
118,187,714,663,136,940,000,000,000,000,000,000,000
45
xfs: set format back to extents if xfs_bmap_extents_to_btree If xfs_bmap_extents_to_btree fails in a mode where we call xfs_iroot_realloc(-1) to de-allocate the root, set the format back to extents. Otherwise we can assume we can dereference ifp->if_broot based on the XFS_DINODE_FMT_BTREE format, and crash. Bugzilla...
int statem_flush(SSL *s) { s->rwstate = SSL_WRITING; if (BIO_flush(s->wbio) <= 0) { return 0; } s->rwstate = SSL_NOTHING; return 1; }
0
[ "CWE-400" ]
openssl
4b390b6c3f8df925dc92a3dd6b022baa9a2f4650
328,723,832,334,674,720,000,000,000,000,000,000,000
10
Excessive allocation of memory in tls_get_message_header() A TLS message includes 3 bytes for its length in the header for the message. This would allow for messages up to 16Mb in length. Messages of this length are excessive and OpenSSL includes a check to ensure that a peer is sending reasonably sized messages in or...
sc_pkcs15emu_oberthur_add_pubkey(struct sc_pkcs15_card *p15card, unsigned int file_id, unsigned int size) { struct sc_context *ctx = p15card->card->ctx; struct sc_pkcs15_pubkey_info key_info; struct sc_pkcs15_object key_obj; char ch_tmp[0x100]; unsigned char *info_blob = NULL; size_t len, info_len, offs; unsig...
1
[]
OpenSC
5d4daf6c92e4668f5458f380f3cacea3e879d91a
158,396,222,014,143,870,000,000,000,000,000,000,000
77
oberthur: One more overlooked buffer overflow Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32202
static void FVMenuReplaceWithRef(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); FVReplaceOutlineWithReference(fv,.001); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
207,100,314,299,529,100,000,000,000,000,000,000,000
5
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
initialize_group_array () { register int i; if (maxgroups == 0) maxgroups = getmaxgroups (); ngroups = 0; group_array = (GETGROUPS_T *)xrealloc (group_array, maxgroups * sizeof (GETGROUPS_T)); #if defined (HAVE_GETGROUPS) ngroups = getgroups (maxgroups, group_array); #endif /* If getgroups returns n...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
168,934,058,172,112,560,000,000,000,000,000,000,000
50
bash-4.4-rc2 release
static int madvise_hwpoison(int bhv, unsigned long start, unsigned long end) { int ret = 0; if (!capable(CAP_SYS_ADMIN)) return -EPERM; for (; start < end; start += PAGE_SIZE) { struct page *p; int ret = get_user_pages_fast(start, 1, 0, &p); if (ret != 1) return ret; if (bhv == MADV_SOFT_OFFLINE) { ...
0
[ "CWE-362" ]
linux-2.6
9ab4233dd08036fe34a89c7dc6f47a8bf2eb29eb
330,747,137,476,555,400,000,000,000,000,000,000,000
26
mm: Hold a file reference in madvise_remove Otherwise the code races with munmap (causing a use-after-free of the vma) or with close (causing a use-after-free of the struct file). The bug was introduced by commit 90ed52ebe481 ("[PATCH] holepunch: fix mmap_sem i_mutex deadlock") Cc: Hugh Dickins <hugh@veritas.com> Cc...
_dl_dst_substitute (struct link_map *l, const char *name, char *result, int is_path) { const char *const start = name; char *last_elem, *wp; /* Now fill the result path. While copying over the string we keep track of the start of the last path element. When we come accross a DST we copy over th...
0
[ "CWE-190", "CWE-252" ]
glibc
2864e767053317538feafa815046fff89e5a16be
46,838,980,342,098,160,000,000,000,000,000,000,000
72
Update. 1999-11-09 Ulrich Drepper <drepper@cygnus.com> * elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to directory with the reference since this is as secure as using the object with the dependency. (_dl_dst_substitute): Likewise. * elf/dl-load.c (_dl_dst_count): Change strings in first two strncmp ...
PHP_FUNCTION(iconv_mime_decode_headers) { zend_string *encoded_str; char *charset = get_internal_encoding(); size_t charset_len = 0; zend_long mode = 0; char *enc_str_tmp; size_t enc_str_len_tmp; php_iconv_err_t err = PHP_ICONV_ERR_SUCCESS; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ls", &encoded_str, &m...
0
[ "CWE-125" ]
php-src
70523ce41ff400ea00343a03f297332cb1f1b77b
126,046,017,815,124,830,000,000,000,000,000,000,000
94
Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow (cherry picked from commit 7cf7148a8f8f4f55fb04de2a517d740bb6253eac)
int ha_maria::index_read_map(uchar * buf, const uchar * key, key_part_map keypart_map, enum ha_rkey_function find_flag) { DBUG_ASSERT(inited == INDEX); register_handler(file); int error= maria_rkey(file, buf, active_index, key, keypart_map, find_flag); return error; }
0
[ "CWE-400" ]
server
9e39d0ae44595dbd1570805d97c9c874778a6be8
286,802,070,937,397,100,000,000,000,000,000,000,000
9
MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields fix a debug assert to account for not opened temp tables
static int do_cpu_nanosleep(const clockid_t which_clock, int flags, struct timespec *rqtp, struct itimerspec *it) { struct k_itimer timer; int error; /* * Set up a temporary timer and then wait for it to go off. */ memset(&timer, 0, sizeof timer); spin_lock_init(&timer.it_lock); timer.it_clock = which...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
61,471,720,684,369,290,000,000,000,000,000,000,000
65
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 ...
validate_nodata_response(struct module_env* env, struct val_env* ve, struct query_info* qchase, struct reply_info* chase_reply, struct key_entry_key* kkey) { /* Since we are here, there must be nothing in the ANSWER section to * validate. */ /* (Note: CNAME/DNAME responses will not directly get here -- * instea...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
56,640,132,816,516,960,000,000,000,000,000,000,000
82
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.