func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int match_subs_info(struct snd_seq_port_subscribe *r, struct snd_seq_port_subscribe *s) { if (addr_match(&r->sender, &s->sender) && addr_match(&r->dest, &s->dest)) { if (r->flags && r->flags == s->flags) return r->queue == s->queue; else if (! r->flags) return 1; } return 0; }
0
[ "CWE-416", "CWE-362" ]
linux
71105998845fb012937332fe2e806d443c09e026
45,952,847,413,450,680,000,000,000,000,000,000,000
12
ALSA: seq: Fix use-after-free at creating a port There is a potential race window opened at creating and deleting a port via ioctl, as spotted by fuzzing. snd_seq_create_port() creates a port object and returns its pointer, but it doesn't take the refcount, thus it can be deleted immediately by another thread. Meanwh...
bool Magick::Image::adjoin(void) const { return(constOptions()->adjoin()); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
296,673,657,642,561,400,000,000,000,000,000,000,000
4
Added missing return to avoid use after free.
int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) { struct sock *rsk; #ifdef CONFIG_TCP_MD5SIG /* * We really want to reject the packet as early as possible * if: * o We're expecting an MD5'd packet and this is no MD5 tcp option * o There is an MD5 option and we're not expecting one */ if (tcp_v4_i...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
115,219,605,084,488,860,000,000,000,000,000,000,000
62
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
static int amd_gpio_probe(struct platform_device *pdev) { int ret = 0; int irq_base; struct resource *res; struct amd_gpio *gpio_dev; gpio_dev = devm_kzalloc(&pdev->dev, sizeof(struct amd_gpio), GFP_KERNEL); if (!gpio_dev) return -ENOMEM; spin_lock_init(&gpio_dev->lock); res = platform_get_resource(pde...
0
[ "CWE-415" ]
linux
251e22abde21833b3d29577e4d8c7aaccd650eee
262,622,027,749,687,800,000,000,000,000,000,000,000
96
pinctrl: amd: Use devm_pinctrl_register() for pinctrl registration Use devm_pinctrl_register() for pin control registration and clean error path. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
restore_incsearch_state(void) { search_match_endcol = saved_search_match_endcol; search_match_lines = saved_search_match_lines; }
0
[ "CWE-416" ]
vim
409510c588b1eec1ae33511ae97a21eb8e110895
32,666,898,037,653,100,000,000,000,000,000,000,000
5
patch 8.2.5050: using freed memory when searching for pattern in path Problem: Using freed memory when searching for pattern in path. Solution: Make a copy of the line.
static int selinux_file_alloc_security(struct file *file) { return file_alloc_security(file); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
190,508,110,609,891,900,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
flatpak_dir_get_default_locale_languages (FlatpakDir *self) { g_auto(GStrv) extra_languages = NULL; const GPtrArray *langs; int i; extra_languages = flatpak_dir_get_config_strv (self, "xa.extra-languages"); for (i = 0; extra_languages != NULL && extra_languages[i] != NULL; i++) { /* Strip the local...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
39,477,988,466,157,200,000,000,000,000,000,000,000
27
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
bool InferenceContext::MergeOutputHandleShapesAndTypes( int idx, const std::vector<ShapeAndType>& shapes_and_types) { if (output_handle_shapes_and_types_[idx] == nullptr) { output_handle_shapes_and_types_[idx].reset( new std::vector<ShapeAndType>(shapes_and_types)); return true; } return Merge...
0
[ "CWE-190" ]
tensorflow
acd56b8bcb72b163c834ae4f18469047b001fadf
186,357,811,610,405,930,000,000,000,000,000,000,000
10
Fix security vulnerability with SpaceToBatchNDOp. PiperOrigin-RevId: 445527615
int ConnectionImpl::onFrameSend(const nghttp2_frame* frame) { // The nghttp2 library does not cleanly give us a way to determine whether we received invalid // data from our peer. Sometimes it raises the invalid frame callback, and sometimes it does not. // In all cases however it will attempt to send a GOAWAY fr...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
167,900,886,920,727,270,000,000,000,000,000,000,000
37
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
GF_Err stri_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; u32 i; GF_SubTrackInformationBox *ptr = (GF_SubTrackInformationBox *)s; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u16(bs, ptr->switch_group); gf_bs_write_u16(bs, ptr->alternate_group); gf_bs_write_u32(bs, ptr->sub_track_id); for ...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
73,769,763,251,317,500,000,000,000,000,000,000,000
16
fixed 2 possible heap overflows (inc. #1088)
static void draw_opaque_box(ASS_Renderer *render_priv, GlyphInfo *info, int asc, int desc, ASS_Outline *ol, FT_Vector advance, int sx, int sy) { int adv = advance.x; double scale_y = info->orig_scale_y; double scale_x = info->orig_scale_x; // to a...
0
[ "CWE-125" ]
libass
f4f48950788b91c6a30029cc28a240b834713ea7
205,892,697,904,044,570,000,000,000,000,000,000,000
37
Fix line wrapping mode 0/3 bugs This fixes two separate bugs: a) Don't move a linebreak into the first symbol. This results in a empty line at the front, which does not help to equalize line lengths at all. Instead, merge line with the second one. b) When moving a linebreak into a symbol that already is a break...
pdf14_pop_transparency_state(gx_device *dev, gs_gstate *pgs) { /* Pop the soft mask. It is no longer needed. Likely due to a Q that has occurred. */ pdf14_device *pdev = (pdf14_device *)dev; pdf14_ctx *ctx = pdev->ctx; pdf14_mask_t *old_mask; if_debug0m('v', ctx->memory, "pdf14_pop_transpar...
0
[ "CWE-416" ]
ghostpdl
90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb
142,032,822,764,286,410,000,000,000,000,000,000,000
33
Bug 697456. Dont create new ctx when pdf14 device reenabled This bug had yet another weird case where the user created a file that pushed the pdf14 device twice. We were in that case, creating a new ctx and blowing away the original one with out proper clean up. To avoid, only create a new one when we need it.
SYSCALL_DEFINE3(getrandom, char __user *, buf, size_t, count, unsigned int, flags) { int ret; if (flags & ~(GRND_NONBLOCK|GRND_RANDOM|GRND_INSECURE)) return -EINVAL; /* * Requesting insecure and blocking randomness at the same time makes * no sense. */ if ((flags & (GRND_INSECURE|GRND_RANDOM)) == (GRND_...
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
149,575,671,641,017,340,000,000,000,000,000,000,000
27
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
static void test_date_frac() { int rc; myheader("test_date"); if (mysql_get_server_version(mysql) < 50604) { if (!opt_silent) fprintf(stdout, "Skipping test_date_frac: fractinal seconds implemented " "in MySQL 5.6.4\n"); return; } rc= mysql_query(mysql, "DROP TABLE IF E...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
322,943,530,350,137,630,000,000,000,000,000,000,000
26
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...
void ZRtp::conf2AckSecure() { Event_t ev; ev.type = ZrtpPacket; ev.packet = (uint8_t*)zrtpConf2Ack.getHeaderBase(); ev.length = sizeof (Conf2AckPacket_t) + 12; // 12 is fixed ZRTP (RTP) header size if (stateEngine != NULL) { stateEngine->processEvent(&ev); } }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
61,644,524,335,808,690,000,000,000,000,000,000,000
11
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
int ratestrtosize(const char *s, uint_fast32_t rawsize, uint_fast32_t *size) { jpc_flt_t f; /* Note: This function must not modify output size on failure. */ if (strchr(s, 'B')) { *size = atoi(s); } else { f = atof(s); if (f < 0) { *size = 0; } else if (f > 1.0) { *size = rawsize + 1; } else { *...
0
[ "CWE-787" ]
jasper
e2f2e5f4022baef2386eec25c57b63debfe4cb20
3,894,401,928,752,929,300,000,000,000,000,000,000
19
jas_seq: check bounds in jas_seq2d_bindsub() Fixes CVE-2017-5503, CVE-2017-5504, CVE-2017-5505, Closes https://github.com/jasper-maint/jasper/issues/3 Closes https://github.com/jasper-maint/jasper/issues/4 Closes https://github.com/jasper-maint/jasper/issues/5 Closes https://github.com/mdadams/jasper/issues/88 Closes...
static void FixSignedValues(PixelPacket *q, int y) { while(y-->0) { /* Please note that negative values will overflow Q=8; QuantumRange=255: <0;127> + 127+1 = <128; 255> <-1;-128> + 127+1 = <0; 127> */ SetPixelRed(q,GetPixelRed(q)+QuantumRange/2+1); SetPixelGreen(q,GetPixelGreen(q)+Q...
0
[ "CWE-416" ]
ImageMagick6
172d82afe89d3499ef0cab06dc58d380cc1ab946
321,516,579,109,327,730,000,000,000,000,000,000
13
https://github.com/ImageMagick/ImageMagick/issues/1149
char get_next_file(int imageno, dircnt_t *dirptr, img_fol_t *img_fol, opj_decompress_parameters *parameters) { char image_filename[OPJ_PATH_LEN], infilename[OPJ_PATH_LEN], outfilename[OPJ_PATH_LEN], temp_ofname[OPJ_PATH_LEN]; char *temp_p, temp1[OPJ_PATH_LEN] = ""; strcpy(image_...
0
[ "CWE-824" ]
openjpeg
0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d
69,371,255,664,041,470,000,000,000,000,000,000,000
48
Fix segfault in src/bin/jp2/opj_decompress.c due to uninitialized pointer (fixes #1368) (#1369)
static Bool parse_meta_args(MetaAction *meta, MetaActionType act_type, char *opts) { Bool ret = 0; memset(meta, 0, sizeof(MetaAction)); meta->act_type = act_type; meta->trackID = 0; meta->root_meta = 1; if (!opts) return 0; while (1) { char *next; char *szSlot; if (!opts || !opts[0]) return ret; if (op...
0
[ "CWE-476" ]
gpac
9eeac00b38348c664dfeae2525bba0cf1bc32349
229,102,423,019,629,840,000,000,000,000,000,000,000
176
fixed #1565
**/ const CImg<T>& save_inr(const char *const filename, const float *const voxel_size=0) const { return _save_inr(0,filename,voxel_size);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
243,052,833,189,523,880,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
TEST_P(Http2IntegrationTest, GrpcRequestTimeout) { config_helper_.addConfigModifier( [&](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& hcm) -> void { auto* route_config = hcm.mutable_route_config(); auto* virtual_host = route_config->mutab...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
59,952,328,422,175,210,000,000,000,000,000,000,000
32
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag) { struct tcp_sock *tp = tcp_sk(sk); if (before(ack, tp->tlp_high_seq)) return; if (flag & FLAG_DSACKING_ACK) { /* This DSACK means original and TLP probe arrived; no loss */ tp->tlp_high_seq = 0; } else if (after(ack, tp->tlp_high_seq)) { ...
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
290,473,453,444,961,770,000,000,000,000,000,000,000
26
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...
png_colorspace_endpoints_match(const png_xy *xy1, const png_xy *xy2, int delta) { /* Allow an error of +/-0.01 (absolute value) on each chromaticity */ if (PNG_OUT_OF_RANGE(xy1->whitex, xy2->whitex,delta) || PNG_OUT_OF_RANGE(xy1->whitey, xy2->whitey,delta) || PNG_OUT_OF_RANGE(xy1->redx, xy2->redx,...
0
[ "CWE-476" ]
libpng
812768d7a9c973452222d454634496b25ed415eb
329,359,995,156,137,970,000,000,000,000,000,000,000
14
[libpng16] Fixed a potential null pointer dereference in png_set_text_2() (bug report and patch by Patrick Keshishian).
static inline u16 kvm_read_ldt(void) { u16 ldt; asm("sldt %0" : "=g"(ldt)); return ldt; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
37,598,819,852,156,320,000,000,000,000,000,000,000
6
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
void tcp_leave_memory_pressure(struct sock *sk) { unsigned long val; if (!tcp_memory_pressure) return; val = xchg(&tcp_memory_pressure, 0); if (val) NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPMEMORYPRESSURESCHRONO, jiffies_to_msecs(jiffies - val)); }
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
257,910,438,368,778,840,000,000,000,000,000,000,000
11
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...
int qsortCompareSetsByRevCardinality(const void *s1, const void *s2) { robj *o1 = *(robj**)s1, *o2 = *(robj**)s2; unsigned long first = o1 ? setTypeSize(o1) : 0; unsigned long second = o2 ? setTypeSize(o2) : 0; if (first < second) return 1; if (first > second) return -1; return 0; }
0
[ "CWE-190" ]
redis
a30d367a71b7017581cf1ca104242a3c644dec0f
298,696,084,830,658,350,000,000,000,000,000,000,000
9
Fix Integer overflow issue with intsets (CVE-2021-32687) The vulnerability involves changing the default set-max-intset-entries configuration parameter to a very large value and constructing specially crafted commands to manipulate sets
PHYSICALPATH_FUNC(mod_alias_physical_handler) { plugin_data *p = p_d; int uri_len, basedir_len; char *uri_ptr; size_t k; if (buffer_is_empty(con->physical.path)) return HANDLER_GO_ON; mod_alias_patch_connection(srv, con, p); /* not to include the tailing slash */ basedir_len = buffer_string_length(con->physi...
0
[ "CWE-22" ]
lighttpd1.4
2105dae0f9d7a964375ce681e53cb165375f84c1
280,446,265,081,292,660,000,000,000,000,000,000,000
55
[mod_alias] security: potential path traversal with specific configs Security: potential path traversal of a single directory above the alias target with a specific mod_alias config where the alias which is matched does not end in '/', but alias target filesystem path does end in '/'. e.g. server.docroot = "/srv/www/...
static int nf_tables_gettable(struct sock *nlsk, struct sk_buff *skb, const struct nlmsghdr *nlh, const struct nlattr * const nla[]) { const struct nfgenmsg *nfmsg = nlmsg_data(nlh); const struct nft_af_info *afi; const struct nft_table *table; struct sk_buff *skb2; struct net *net = sock_net(skb...
0
[ "CWE-19" ]
nf
a2f18db0c68fec96631c10cad9384c196e9008ac
96,715,577,870,584,340,000,000,000,000,000,000,000
45
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...
static long _syscall( long num, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6) { long ret = -1; oe_errno = 0; /* Handle the software system call. */ switch (num) { #if defined(OE_SYS_creat) case OE_SYS_creat: { const char* p...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
58,729,407,921,632,930,000,000,000,000,000,000,000
843
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
_gnutls_parse_general_name2(ASN1_TYPE src, const char *src_name, int seq, gnutls_datum_t *dname, unsigned int *ret_type, int othername_oid) { int len, ret; char nptr[ASN1_MAX_NAME_SIZE]; int result; gnutls_datum_t tmp = {NULL, 0}; char choice_type[128]; gnutls_x509_subject_alt_name_t type; if (seq ...
0
[ "CWE-295" ]
gnutls
6e76e9b9fa845b76b0b9a45f05f4b54a052578ff
290,670,482,367,607,150,000,000,000,000,000,000,000
117
on certificate import check whether the two signature algorithms match
static inline struct dn_fib_info *dn_fib_find_info(const struct dn_fib_info *nfi) { for_fib_info() { if (fi->fib_nhs != nfi->fib_nhs) continue; if (nfi->fib_protocol == fi->fib_protocol && nfi->fib_prefsrc == fi->fib_prefsrc && nfi->fib_priority == fi->fib_priority && memcmp(nfi->fib_metrics, fi->fib_m...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
123,584,381,513,096,430,000,000,000,000,000,000,000
15
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
void set_property(st_command *command, enum_prop prop, my_bool val) { char* p= command->first_argument; if (p && !strcmp (p, "ONCE")) { command->last_argument= p + 4; set_once_property(prop, val); return; } property &pr= prop_list[prop]; *pr.var= val; pr.set= 0; var_set_int(pr.env_name, (va...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
137,322,867,718,848,150,000,000,000,000,000,000,000
14
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
int pointZZ_pEqual(const PointZZ_p * op1, const PointZZ_p * op2) { // check x coords if(mpz_cmp(op1->x, op2->x) != 0) { return 0; } // check y coords if(mpz_cmp(op1->y, op2->y) != 0) { return 0; } return 1; }
0
[ "CWE-347" ]
fastecdsa
e592f106edd5acf6dacedfab2ad16fe6c735c9d1
316,781,888,339,669,230,000,000,000,000,000,000,000
12
Properly handle the point at infinity
set_mode(struct archive_write_disk *a, int mode) { int r = ARCHIVE_OK; int r2; mode &= 07777; /* Strip off file type bits. */ if (a->todo & TODO_SGID_CHECK) { /* * If we don't know the GID is right, we must stat() * to verify it. We can't just check the GID of this * process, since systems sometimes se...
0
[ "CWE-59", "CWE-269" ]
libarchive
b41daecb5ccb4c8e3b2c53fd6147109fc12c3043
298,606,298,110,668,940,000,000,000,000,000,000,000
113
Do not follow symlinks when processing the fixup list Use lchmod() instead of chmod() and tell the remaining functions that the real file to be modified is a symbolic link. Fixes #1566
static size_t WriteCompressionStart(const PSDInfo *psd_info,Image *image, const Image *next_image,const ssize_t channels) { size_t length; ssize_t i, y; if (next_image->compression == RLECompression) { length=WriteBlobShort(image,RLE); for (i=0; i < channels; i++) for (y=0;...
0
[ "CWE-835" ]
ImageMagick
73d59a74e0b0a864c1a9581b8a4bdbee427125e2
323,481,081,950,308,800,000,000,000,000,000,000,000
25
Different fix for #869.
ews_get_recurring_day_transitions_list (ESoapParameter *node) { ESoapParameter *param; GSList *recurring_day_transitions = NULL; for (param = e_soap_parameter_get_first_child_by_name (node, "RecurringDayTransition"); param != NULL; param = e_soap_parameter_get_next_child_by_name (param, "RecurringDayTra...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
123,929,223,798,828,030,000,000,000,000,000,000,000
25
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
boot_initmod(mrb_state *mrb, struct RClass *mod) { if (!mod->mt) { mod->mt = kh_init(mt, mrb); } }
0
[ "CWE-476", "CWE-415" ]
mruby
faa4eaf6803bd11669bc324b4c34e7162286bfa3
263,387,782,484,862,320,000,000,000,000,000,000,000
6
`mrb_class_real()` did not work for `BasicObject`; fix #4037
static int fastrpc_buf_alloc(struct fastrpc_user *fl, struct device *dev, u64 size, struct fastrpc_buf **obuf) { struct fastrpc_buf *buf; buf = kzalloc(sizeof(*buf), GFP_KERNEL); if (!buf) return -ENOMEM; INIT_LIST_HEAD(&buf->attachments); mutex_init(&buf->lock); buf->fl = fl; buf->virt = NULL; buf...
0
[ "CWE-400", "CWE-401" ]
linux
fc739a058d99c9297ef6bfd923b809d85855b9a9
314,071,531,493,289,940,000,000,000,000,000,000,000
33
misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach In fastrpc_dma_buf_attach if dma_get_sgtable fails the allocated memory for a should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lore.kernel.org/r/20190925152742.16258-1-navid.emamdoost@gmail.com Signed-off-by: Greg...
void exit_oom_victim(void) { clear_thread_flag(TIF_MEMDIE); if (!atomic_dec_return(&oom_victims)) wake_up_all(&oom_victims_wait); }
0
[ "CWE-416" ]
linux
687cb0884a714ff484d038e9190edc874edcf146
322,379,833,963,071,350,000,000,000,000,000,000,000
7
mm, oom_reaper: gather each vma to prevent leaking TLB entry tlb_gather_mmu(&tlb, mm, 0, -1) means gathering the whole virtual memory space. In this case, tlb->fullmm is true. Some archs like arm64 doesn't flush TLB when tlb->fullmm is true: commit 5a7862e83000 ("arm64: tlbflush: avoid flushing when fullmm == 1")...
unpack_fields(const MYSQL *mysql, MYSQL_DATA *data, MA_MEM_ROOT *alloc, uint fields, my_bool default_value) { MYSQL_ROWS *row; MYSQL_FIELD *field,*result; char *p; unsigned int i, field_count= sizeof(rset_field_offsets)/sizeof(size_t)/2; field=result=(MYSQL_FIELD*) ma_alloc_root(alloc...
0
[ "CWE-20" ]
mariadb-connector-c
2759b87d72926b7c9b5426437a7c8dd15ff57945
51,476,798,344,196,800,000,000,000,000,000,000,000
81
sanity checks for client-supplied OK packet content reported by Matthias Kaiser, Apple Information Security
static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb, struct sock *sk) { struct llc_sap_state_ev *ev = llc_sap_ev(skb); ev->type = LLC_SAP_EV_TYPE_PDU; ev->reason = 0; skb_orphan(skb); sock_hold(sk); skb->sk = sk; skb->destructor = sock_efree; llc_sap_state_process(sap, skb); }
0
[ "CWE-20", "CWE-401" ]
linux
8b74d439e1697110c5e5c600643e823eb1dd0762
98,664,916,107,711,860,000,000,000,000,000,000,000
13
net/llc: avoid BUG_ON() in skb_orphan() It seems nobody used LLC since linux-3.12. Fortunately fuzzers like syzkaller still know how to run this code, otherwise it would be no fun. Setting skb->sk without skb->destructor leads to all kinds of bugs, we now prefer to be very strict about it. Ideally here we would use...
CallInfo::CallInfo(Method* resolved_method, Klass* resolved_klass, TRAPS) { Klass* resolved_method_holder = resolved_method->method_holder(); if (resolved_klass == NULL) { // 2nd argument defaults to holder of 1st resolved_klass = resolved_method_holder; } _resolved_klass = resolved_klass; _selected_klas...
0
[]
jdk11u
132745902a4601dc64b2c8ca112ca30292feccb4
41,780,042,736,549,130,000,000,000,000,000,000,000
54
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
is_ftp_ctl(const enum ct_alg_ctl_type ct_alg_ctl) { return ct_alg_ctl == CT_ALG_CTL_FTP; }
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
173,118,567,627,111,320,000,000,000,000,000,000,000
4
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static void themes_read_module(const char *module) { g_slist_foreach(themes, (GFunc) theme_read_module, (void *) module); }
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
22,772,957,815,973,380,000,000,000,000,000,000,000
4
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
static void *_sqlite_open(char *host __attribute__((unused)), char *port __attribute__((unused)), int usessl __attribute__((unused)), const char *user __attribute__((unused)), const char *password __attribute__((unused)), const char *database, const sasl_utils_t *utils) { int rc; sqlite...
0
[ "CWE-89" ]
cyrus-sasl
9eff746c9daecbcc0041b09a5a51ba30738cdcbc
143,936,755,162,217,740,000,000,000,000,000,000,000
28
CVE-2022-24407 Escape password for SQL insert/update commands. Signed-off-by: Klaus Espenlaub <klaus@espenlaub.com>
node_linebreak(Node** np, ScanEnv* env) { /* same as (?>\x0D\x0A|[\x0A-\x0D\x{85}\x{2028}\x{2029}]) */ Node* left = NULL; Node* right = NULL; Node* target1 = NULL; Node* target2 = NULL; CClassNode* cc; int num1, num2; UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN * 2]; /* \x0D\x0A */ num1 = ONIGENC_CODE_TO_...
0
[ "CWE-125" ]
Onigmo
29e7e6aedebafd5efbbd90655c8e0d495035d7b4
24,136,617,176,246,550,000,000,000,000,000,000,000
59
bug: Fix out of bounds read Add boundary check before PFETCH. Based on the following commits on https://github.com/kkos/oniguruma , but not the same. * 68c395576813b3f9812427f94d272bcffaca316c * dc0a23eb16961f98d2a5a2128d18bd4602058a10 * 5186c7c706a7f280110e6a0b060f87d0f7d790ce * 562bf4825b301693180c674994bf708b28b0...
private int magiccheck(struct magic_set *ms, struct magic *m) { uint64_t l = m->value.q; uint64_t v; float fl, fv; double dl, dv; int matched; union VALUETYPE *p = &ms->ms_value; char *old_lc_ctype; switch (m->type) { case FILE_BYTE: v = p->b; break; case FILE_SHORT: case FILE_BESHORT: case FILE_LESH...
0
[ "CWE-755" ]
file
c0c0032b9e9eb57b91fefef905a3b018bab492d9
335,254,883,467,160,860,000,000,000,000,000,000,000
326
Fix memory leak (Anatol Belski)
XML_SetStartDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start) { if (parser != NULL) parser->m_startDoctypeDeclHandler = start; }
0
[ "CWE-611" ]
libexpat
11f8838bf99ea0a6f0b76f9760c43704d00c4ff6
310,774,853,190,432,300,000,000,000,000,000,000,000
5
xmlparse.c: Fix extraction of namespace prefix from XML name (#186)
static void mmdrop_async(struct mm_struct *mm) { if (unlikely(atomic_dec_and_test(&mm->mm_count))) { INIT_WORK(&mm->async_put_work, mmdrop_async_fn); schedule_work(&mm->async_put_work); } }
0
[ "CWE-362" ]
linux
7b55851367136b1efd84d98fea81ba57a98304cf
48,640,535,268,283,290,000,000,000,000,000,000,000
7
fork: record start_time late This changes the fork(2) syscall to record the process start_time after initializing the basic task structure but still before making the new process visible to user-space. Technically, we could record the start_time anytime during fork(2). But this might lead to scenarios where a start_...
xfs_alloc_lookup_ge( struct xfs_btree_cur *cur, /* btree cursor */ xfs_agblock_t bno, /* starting block of extent */ xfs_extlen_t len, /* length of extent */ int *stat) /* success/failure */ { int error; cur->bc_rec.a.ar_startblock = bno; cur->bc_rec.a.ar_blockcount = len; error = xfs_btree_lookup(cur, X...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
d0c7feaf87678371c2c09b3709400be416b2dc62
268,286,425,743,629,100,000,000,000,000,000,000,000
14
xfs: add agf freeblocks verify in xfs_agf_verify We recently used fuzz(hydra) to test XFS and automatically generate tmp.img(XFS v5 format, but some metadata is wrong) xfs_repair information(just one AG): agf_freeblks 0, counted 3224 in ag 0 agf_longest 536874136, counted 3224 in ag 0 sb_fdblocks 613, counted 3228 T...
getfs(const char *spec, const char *uuid, const char *label) { struct mntentchn *mc = NULL; const char *devname = NULL; if (!spec && !uuid && !label) return NULL; /* * A) 99% of all cases, the spec on cmdline matches * with spec in fstab */ if (uuid) mc = getfs_by_uuid(uuid); else if (label) mc =...
0
[ "CWE-200" ]
util-linux
0377ef91270d06592a0d4dd009c29e7b1ff9c9b8
66,034,565,585,781,130,000,000,000,000,000,000,000
77
mount: (deprecated) drop --guess-fstype The option is undocumented and unnecessary. Signed-off-by: Karel Zak <kzak@redhat.com>
static void interface_get_init_info(QXLInstance *sin, QXLDevInitInfo *info) { SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl); info->memslot_gen_bits = MEMSLOT_GENERATION_BITS; info->memslot_id_bits = MEMSLOT_SLOT_BITS; info->num_memslots = NUM_MEMSLOTS; info->num_memslots_gro...
0
[ "CWE-200" ]
qemu
ab9509cceabef28071e41bdfa073083859c949a7
282,091,035,510,553,660,000,000,000,000,000,000,000
12
spice: make sure we don't overflow ssd->buf Related spice-only bug. We have a fixed 16 MB buffer here, being presented to the spice-server as qxl video memory in case spice is used with a non-qxl card. It's also used with qxl in vga mode. When using display resolutions requiring more than 16 MB of memory we are goi...
mrb_class_real(struct RClass* cl) { if (cl == 0) return NULL; while ((cl->tt == MRB_TT_SCLASS) || (cl->tt == MRB_TT_ICLASS)) { cl = cl->super; if (cl == 0) return NULL; } return cl; }
0
[ "CWE-476", "CWE-415" ]
mruby
faa4eaf6803bd11669bc324b4c34e7162286bfa3
63,464,208,929,892,740,000,000,000,000,000,000,000
9
`mrb_class_real()` did not work for `BasicObject`; fix #4037
static inline int sctp_peer_needs_update(struct sctp_association *asoc) { struct net *net = sock_net(asoc->base.sk); switch (asoc->state) { case SCTP_STATE_ESTABLISHED: case SCTP_STATE_SHUTDOWN_PENDING: case SCTP_STATE_SHUTDOWN_RECEIVED: case SCTP_STATE_SHUTDOWN_SENT: if ((asoc->rwnd > asoc->a_rwnd) && ((...
0
[]
linux
196d67593439b03088913227093e374235596e33
144,353,462,085,440,870,000,000,000,000,000,000,000
19
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
int res_querydomain(const char *name, const char *domain, int class, int type, u_char *answer, int anslen) { char nbuf[MAXDNAME]; const char *longname = nbuf; size_t n, d; #ifdef DEBUG uint32_t _res_options; #endif if (!name || !answer) { h_errno = NETDB_INTERNAL; return -1; } #ifdef DEBUG again: __UCL...
0
[ "CWE-79" ]
uclibc-ng
0f822af0445e5348ce7b7bd8ce1204244f31d174
18,838,789,859,625,906,000,000,000,000,000,000,000
54
libc/inet/resolv.c: add __hnbad to check DNS entries for validity… … using the same rules glibc does also call __hnbad in some places to check answers
static size_t fuse_async_req_send(struct fuse_conn *fc, struct fuse_req *req, size_t num_bytes, struct fuse_io_priv *io) { spin_lock(&io->lock); io->size += num_bytes; io->reqs++; spin_unlock(&io->lock); req->io = io; req->end = fuse_aio_complete_req; __fuse_get_request(req); fuse_request_send_background(fc...
0
[ "CWE-399", "CWE-835" ]
linux
3ca8138f014a913f98e6ef40e939868e1e9ea876
268,608,360,359,229,150,000,000,000,000,000,000,000
16
fuse: break infinite loop in fuse_fill_write_pages() I got a report about unkillable task eating CPU. Further investigation shows, that the problem is in the fuse_fill_write_pages() function. If iov's first segment has zero length, we get an infinite loop, because we never reach iov_iter_advance() call. Fix this by c...
Deploy(const char* packageName) { int deployStatus = DEPLOY_SUCCESS; char* pkgCommand = NULL; char* command = NULL; int deploymentResult; char *nics; char* cleanupCommand; uint8 archiveType; char *tmpDirPath; // Move to IN PROGRESS state TransitionState(NULL, INPROGRESS); // Notify th...
0
[ "CWE-362" ]
open-vm-tools
c1304ce8bfd9c0c33999e496bf7049d5c3d45821
80,938,736,151,536,190,000,000,000,000,000,000,000
165
randomly generate tmp directory name, and add StrUtil_ReplaceAll() function.
int ReplaceThumbnail(const char * ThumbFileName) { FILE * ThumbnailFile; int ThumbLen, NewExifSize; Section_t * ExifSection; uchar * ThumbnailPointer; if (ImageInfo.ThumbnailOffset == 0 || ImageInfo.ThumbnailAtEnd == FALSE){ if (ThumbFileName == NULL){ // Delete of none...
0
[ "CWE-787" ]
jhead
5186ddcf9e35a7aa0ff0539489a930434a1325f4
27,990,850,366,750,375,000,000,000,000,000,000,000
71
Just allocate 20 bytes extra at the end of a section. Otherwise, we end up with a whole lot of little checks for structures that the file says are there but are unexpectedly cut off in fuzz tests
server_screen_blt(struct xrdp_mod* mod, int x, int y, int cx, int cy, int srcx, int srcy) { struct xrdp_wm* wm; struct xrdp_painter* p; p = (struct xrdp_painter*)(mod->painter); if (p == 0) { return 0; } wm = (struct xrdp_wm*)(mod->wm); p->rop = 0xcc; xrdp_painter_copy(p, wm->sc...
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
272,173,098,731,960,030,000,000,000,000,000,000,000
16
move temp files from /tmp to /tmp/.xrdp
static int get_string(struct usb_composite_dev *cdev, void *buf, u16 language, int id) { struct usb_composite_driver *composite = cdev->driver; struct usb_gadget_string_container *uc; struct usb_configuration *c; struct usb_function *f; int len; /* Yes, not only is USB's i18n support probably more than mos...
0
[ "CWE-476" ]
linux
75e5b4849b81e19e9efe1654b30d7f3151c33c2c
192,017,343,002,647,540,000,000,000,000,000,000,000
100
USB: gadget: validate interface OS descriptor requests Stall the control endpoint in case provided index exceeds array size of MAX_CONFIG_INTERFACES or when the retrieved function pointer is null. Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com> Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregk...
static av_cold int latm_decode_init(AVCodecContext *avctx) { struct LATMContext *latmctx = avctx->priv_data; int ret = aac_decode_init(avctx); if (avctx->extradata_size > 0) latmctx->initialized = !ret; return ret; }
0
[ "CWE-703" ]
FFmpeg
6e42ccb9dbc13836cd52cda594f819d17af9afa2
78,840,961,601,441,960,000,000,000,000,000,000,000
10
avcodec/aacdec: Fix pulse position checks in decode_pulses() Fixes out of array read Fixes: asan_static-oob_1efed25_1887_cov_2013541199_HeyYa_RA10_AAC_192K_30s.rm Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static struct wireless_dev *ieee80211_add_iface(struct wiphy *wiphy, const char *name, unsigned char name_assign_type, enum nl80211_iftype type, struct vif_params *params) { struct ieee80211_local *local = wiphy_priv(wiphy); struct wireless_dev *wdev; struct ieee80211_sub_if_data *sdata; int...
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
92,135,701,032,686,490,000,000,000,000,000,000,000
27
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
static inline int __strnlen(const char *str, int len) { int l = 0; while (IS_PRINTABLE (*str) && --len) { if (((ut8)*str) == 0xff) { break; } str++; l++; } return l + 1; }
0
[ "CWE-787" ]
radare2
3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e
64,894,004,342,258,360,000,000,000,000,000,000,000
11
Fix 4 byte oobread in msp430 disassembler ##crash * Only crashes with asan builds * Add missing =SN register * Reported by cnitlrt via huntrdev * BountyID: 1c22055b-b015-47a8-a57b-4982978751d0
static void encrypted_shash_release(void) { if (hashalg) crypto_free_shash(hashalg); if (hmacalg) crypto_free_shash(hmacalg); }
0
[ "CWE-284", "CWE-264", "CWE-269" ]
linux
096fe9eaea40a17e125569f9e657e34cdb6d73bd
219,617,616,144,772,170,000,000,000,000,000,000,000
7
KEYS: Fix handling of stored error in a negatively instantiated user key If a user key gets negatively instantiated, an error code is cached in the payload area. A negatively instantiated key may be then be positively instantiated by updating it with valid data. However, the ->update key type method must be aware th...
virSecuritySELinuxSetTPMFileLabel(virSecurityManager *mgr, virDomainDef *def, virDomainTPMDef *tpm) { int rc; virSecurityLabelDef *seclabel; char *cancel_path; const char *tpmdev; seclabel = virDomainDefGetSecurityLabelDef(def, SEC...
0
[ "CWE-732" ]
libvirt
15073504dbb624d3f6c911e85557019d3620fdb2
17,452,078,163,541,698,000,000,000,000,000,000,000
45
security: fix SELinux label generation logic A process can access a file if the set of MCS categories for the file is equal-to *or* a subset-of, the set of MCS categories for the process. If there are two VMs: a) svirt_t:s0:c117 b) svirt_t:s0:c117,c720 Then VM (b) is able to access files labelled for VM (a). I...
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos) { int pos, xout, yout; for (pos = AVCHROMA_LOC_UNSPECIFIED + 1; pos < AVCHROMA_LOC_NB; pos++) { if (avcodec_enum_to_chroma_pos(&xout, &yout, pos) == 0 && xout == xpos && yout == ypos) return pos; } return AVCHROMA_...
0
[ "CWE-703" ]
FFmpeg
e5c7229999182ad1cef13b9eca050dba7a5a08da
27,787,968,326,607,330,000,000,000,000,000,000,000
10
avcodec/utils: set AVFrame format unconditional Fixes inconsistency and out of array accesses Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static int l2cap_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, int flags) { struct sock *sk = sock->sk; struct l2cap_pinfo *pi = l2cap_pi(sk); int err; lock_sock(sk); if (sk->sk_state == BT_CONNECT2 && test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) { if (pi->chan->mode =...
0
[ "CWE-787" ]
linux
1bff51ea59a9afb67d2dd78518ab0582a54a472c
100,626,252,749,467,120,000,000,000,000,000,000,000
64
Bluetooth: fix use-after-free error in lock_sock_nested() use-after-free error in lock_sock_nested is reported: [ 179.140137][ T3731] ===================================================== [ 179.142675][ T3731] BUG: KMSAN: use-after-free in lock_sock_nested+0x280/0x2c0 [ 179.145494][ T3731] CPU: 4 PID: 3731 Comm: k...
TEST(ExpressionObjectDependencies, LocalMapVariablesShouldBeFilteredOutOfDependencies) { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); expCtx->variablesParseState.defineVariable("var1"); auto mapSpec = BSON("$map" << BSON("input" << "$...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
255,649,731,846,785,100,000,000,000,000,000,000,000
18
SERVER-38070 fix infinite loop in agg expression
static void vmx_intr_assist(struct kvm_vcpu *vcpu) { update_tpr_threshold(vcpu); vmx_update_window_states(vcpu); if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) vmcs_clear_bits(GUEST_INTERRUPTIBILITY_INFO, GUEST_INTR_STATE_STI | GUEST_INTR_STATE_MOV_SS); if (vcpu->arch.nmi_pending && !vcpu->arch.nmi_i...
0
[ "CWE-20" ]
linux-2.6
16175a796d061833aacfbd9672235f2d2725df65
75,933,783,012,298,195,000,000,000,000,000,000,000
42
KVM: VMX: Don't allow uninhibited access to EFER on i386 vmx_set_msr() does not allow i386 guests to touch EFER, but they can still do so through the default: label in the switch. If they set EFER_LME, they can oops the host. Fix by having EFER access through the normal channel (which will check for EFER_LME) even o...
g_vfs_backend_admin_class_init (GVfsBackendAdminClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GVfsBackendClass *backend_class = G_VFS_BACKEND_CLASS (klass); object_class->finalize = do_finalize; backend_class->mount = do_mount; backend_class->open_for_read = do_open_for_read; backe...
0
[]
gvfs
d7d362995aa0cb8905c8d5c2a2a4c305d2ffff80
197,017,610,258,653,600,000,000,000,000,000,000,000
35
admin: Use fsuid to ensure correct file ownership Files created over admin backend should be owned by root, but they are owned by the user itself. This is because the daemon drops the uid to make dbus connection work. Use fsuid and euid to fix this issue. Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/21
rsRetVal rsCStrAppendStrWithLen(cstr_t *pThis, uchar* psz, size_t iStrLen) { DEFiRet; rsCHECKVALIDOBJECT(pThis, OIDrsCStr); assert(psz != NULL); /* does the string fit? */ if(pThis->iStrLen + iStrLen > pThis->iBufSize) { CHKiRet(rsCStrExtendBuf(pThis, iStrLen)); /* need more memory! */ } /* ok, now we alw...
0
[ "CWE-189" ]
rsyslog
6bad782f154b7f838c7371bf99c13f6dc4ec4101
210,085,576,220,473,700,000,000,000,000,000,000,000
19
bugfix: abort if imfile reads file line of more than 64KiB Thanks to Peter Eisentraut for reporting and analysing this problem. bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=221
int jas_stream_close(jas_stream_t *stream) { /* Flush buffer if necessary. */ jas_stream_flush(stream); /* Close the underlying stream object. */ (*stream->ops_->close_)(stream->obj_); jas_stream_destroy(stream); return 0; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
203,445,210,113,206,000,000,000,000,000,000,000,000
12
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...
apr_size_t h2_beam_get_files_beamed(h2_bucket_beam *beam) { apr_size_t n = 0; h2_beam_lock bl; if (beam && enter_yellow(beam, &bl) == APR_SUCCESS) { n = beam->files_beamed; leave_yellow(beam, &bl); } return n; }
0
[ "CWE-400" ]
mod_h2
83a2e3866918ce6567a683eb4c660688d047ee81
222,756,042,272,941,840,000,000,000,000,000,000,000
11
* fixes a race condition where aborting streams triggers an unnecessary timeout.
void gf_isom_set_last_error(GF_ISOFile *movie, GF_Err error) { if (!movie) { MP4_API_IO_Err = error; } else { movie->LastError = error; } }
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
138,624,745,925,652,390,000,000,000,000,000,000,000
8
fixed #1706
op_shift(oparg_T *oap, int curs_top, int amount) { long i; int first_char; int block_col = 0; if (u_save((linenr_T)(oap->start.lnum - 1), (linenr_T)(oap->end.lnum + 1)) == FAIL) return; if (oap->block_mode) block_col = curwin->w_cursor.col; for (i = oap->line_count;...
0
[ "CWE-122" ]
vim
c249913edc35c0e666d783bfc21595cf9f7d9e0d
221,447,304,189,416,300,000,000,000,000,000,000,000
78
patch 9.0.0483: illegal memory access when replacing in virtualedit mode Problem: Illegal memory access when replacing in virtualedit mode. Solution: Check for replacing NUL after Tab.
Object createObject(std::shared_ptr<HostObject> ho) { class DHO1 : public DecoratedHostObject { public: using DecoratedHostObject::DecoratedHostObject; Value get(Runtime& rt, const PropNameID& name) override { numGets++; return DecoratedHostObject::get(rt, name); } }; ...
0
[ "CWE-843", "CWE-125" ]
hermes
fe52854cdf6725c2eaa9e125995da76e6ceb27da
183,480,251,298,513,700,000,000,000,000,000,000,000
13
[CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain. Summary: The change in the hermes repository fixes the security vulnerability CVE-2020-1911. This vulnerability only affects applications which allow evaluation of uncontrolled, untrusted JavaScript code not shipped wit...
static void rng_backend_free_request(RngRequest *req) { g_free(req->data); g_free(req); }
0
[ "CWE-119" ]
qemu
60253ed1e6ec6d8e5ef2efe7bf755f475dce9956
290,100,926,722,907,100,000,000,000,000,000,000,000
5
rng: add request queue support to rng-random Requests are now created in the RngBackend parent class and the code path is shared by both rng-egd and rng-random. This commit fixes the rng-random implementation which processed only one request at a time and simply discarded all but the most recent one. In the guest thi...
unsigned int bt_att_register_disconnect(struct bt_att *att, bt_att_disconnect_func_t callback, void *user_data, bt_att_destroy_func_t destroy) { struct att_disconn *disconn; if (!att || queue_isempty(att->chans)) return 0; disconn = new0(struct att_disconn, 1); disconn->callback = callback; disc...
0
[ "CWE-415" ]
bluez
1cd644db8c23a2f530ddb93cebed7dacc5f5721a
67,387,121,436,606,700,000,000,000,000,000,000,000
27
shared/att: Fix possible crash on disconnect If there are pending request while disconnecting they would be notified but clients may endup being freed in the proccess which will then be calling bt_att_cancel to cancal its requests causing the following trace: Invalid read of size 4 at 0x1D894C: enable_ccc_callback...
void pre_next_row() { clear_sum_functions(); }
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
92,607,206,181,663,260,000,000,000,000,000,000,000
4
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
HttpHeader::HttpHeader(const HttpHeader &other): owner(other.owner), len(other.len), conflictingContentLength_(false) { httpHeaderMaskInit(&mask, 0); update(&other); // will update the mask as well }
0
[ "CWE-444" ]
squid
9c8e2a71aa1d3c159a319d9365c346c48dc783a5
334,146,670,938,283,160,000,000,000,000,000,000,000
5
Enforce token characters for field-name (#700) RFC 7230 defines field-name as a token. Request splitting and cache poisoning attacks have used non-token characters to fool broken HTTP agents behind or in front of Squid for years. This change should significantly reduce that abuse. If we discover exceptional situatio...
oal_response_cb (SoupSession *soup_session, SoupMessage *soup_message, gpointer user_data) { GSimpleAsyncResult *simple; struct _oal_req_data *data; const gchar *etag; xmlDoc *doc; xmlNode *node; simple = G_SIMPLE_ASYNC_RESULT (user_data); data = g_simple_async_result_get_op_re...
1
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
251,006,052,157,752,020,000,000,000,000,000,000,000
110
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
static void ssl_calc_finished_ssl( ssl_context *ssl, unsigned char *buf, int from ) { const char *sender; md5_context md5; sha1_context sha1; unsigned char padbuf[48]; unsigned char md5sum[16]; unsigned char sha1sum[20]; ssl_session *session = ssl->session_negotiate; i...
0
[ "CWE-20" ]
polarssl
1922a4e6aade7b1d685af19d4d9339ddb5c02859
208,129,739,877,946,700,000,000,000,000,000,000,000
75
ssl_parse_certificate() now calls x509parse_crt_der() directly
dispose (GObject *object) { NMAGConfSettingsPrivate *priv = NMA_GCONF_SETTINGS_GET_PRIVATE (object); if (priv->disposed) return; priv->disposed = TRUE; if (priv->bus) dbus_g_connection_unref (priv->bus); g_hash_table_destroy (priv->pending_changes); if (priv->read_connections_id) { g_source_remove (pri...
0
[ "CWE-200" ]
network-manager-applet
56d87fcb86acb5359558e0a2ee702cfc0c3391f2
186,883,123,726,084,900,000,000,000,000,000,000,000
29
applet: fix dbus connection refcounting after 8627880e07c8345f69ed639325280c7f62a8f894
ssize_t __weak cpu_show_l1tf(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "Not affected\n"); }
1
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
26,772,472,054,769,400,000,000,000,000,000,000,000
5
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
template<typename t, typename ti> CImg<T>& _solve(const CImg<t>& A, const CImg<ti>& indx) { typedef _cimg_Ttfloat Ttfloat; const int N = (int)size(); int ii = -1; Ttfloat sum; for (int i = 0; i<N; ++i) { const int ip = (int)indx[i]; Ttfloat sum = (*this)(ip); ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
204,046,301,550,149,620,000,000,000,000,000,000,000
20
Fix other issues in 'CImg<T>::load_bmp()'.
t2pReadFile(TIFF *tif, tdata_t data, tmsize_t size) { thandle_t client = TIFFClientdata(tif); TIFFReadWriteProc proc = TIFFGetReadProc(tif); if (proc) return proc(client, data, size); return -1; }
0
[ "CWE-787" ]
libtiff
7be2e452ddcf6d7abca88f41d3761e6edab72b22
202,339,398,916,658,000,000,000,000,000,000,000,000
8
tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr fixes #220
void delegpt_log(enum verbosity_value v, struct delegpt* dp) { char buf[LDNS_MAX_DOMAINLEN+1]; struct delegpt_ns* ns; struct delegpt_addr* a; size_t missing=0, numns=0, numaddr=0, numres=0, numavail=0; if(verbosity < v) return; dname_str(dp->name, buf); if(dp->nslist == NULL && dp->target_list == NULL) { log...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
210,470,104,149,643,900,000,000,000,000,000,000,000
44
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
static int bnx2x_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid) { struct bnx2x *bp = netdev_priv(dev); struct bnx2x_vlan_entry *vlan; bool found = false; int rc = 0; DP(NETIF_MSG_IFUP, "Removing VLAN %d\n", vid); list_for_each_entry(vlan, &bp->vlan_reg, link) if (vlan->vid == vid) { found ...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
324,745,691,055,487,430,000,000,000,000,000,000,000
36
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
virSecuritySELinuxRestoreSysinfoLabel(virSecurityManager *mgr, virSysinfoDef *def) { size_t i; for (i = 0; i < def->nfw_cfgs; i++) { virSysinfoFWCfgDef *f = &def->fw_cfgs[i]; if (f->file && virSecuritySELinuxRestoreFileLabel(mgr, f->file, true)...
0
[ "CWE-732" ]
libvirt
15073504dbb624d3f6c911e85557019d3620fdb2
334,806,328,500,126,800,000,000,000,000,000,000,000
15
security: fix SELinux label generation logic A process can access a file if the set of MCS categories for the file is equal-to *or* a subset-of, the set of MCS categories for the process. If there are two VMs: a) svirt_t:s0:c117 b) svirt_t:s0:c117,c720 Then VM (b) is able to access files labelled for VM (a). I...
static int ocfs2_alloc_write_ctxt(struct ocfs2_write_ctxt **wcp, struct ocfs2_super *osb, loff_t pos, unsigned len, ocfs2_write_type_t type, struct buffer_head *di_bh) { u32 cend; struct ocfs2_write_ctxt *wc; wc = kzalloc(sizeof(struct ocfs2_write_ctxt), GFP_NOFS); if (!wc) return -ENOMEM; wc...
0
[ "CWE-362" ]
linux
3e4c56d41eef5595035872a2ec5a483f42e8917f
184,816,480,585,578,530,000,000,000,000,000,000,000
32
ocfs2: ip_alloc_sem should be taken in ocfs2_get_block() ip_alloc_sem should be taken in ocfs2_get_block() when reading file in DIRECT mode to prevent concurrent access to extent tree with ocfs2_dio_end_io_write(), which may cause BUGON in the following situation: read file 'A' end_io...
static int get_port_status(struct usb_device *hdev, int port1, void *data, u16 value, u16 length) { int i, status = -ETIMEDOUT; for (i = 0; i < USB_STS_RETRIES && (status == -ETIMEDOUT || status == -EPIPE); i++) { status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0), USB_REQ_GET_STATUS, USB_DIR_IN |...
0
[ "CWE-400", "CWE-703" ]
linux
704620afc70cf47abb9d6a1a57f3825d2bca49cf
54,767,911,425,570,730,000,000,000,000,000,000,000
13
USB: check usb_get_extra_descriptor for proper size When reading an extra descriptor, we need to properly check the minimum and maximum size allowed, to prevent from invalid data being sent by a device. Reported-by: Hui Peng <benquike@gmail.com> Reported-by: Mathias Payer <mathias.payer@nebelwelt.net> Co-developed-by...
compile_length_string_node(Node* node, regex_t* reg) { int rlen, r, len, prev_len, slen, ambig; UChar *p, *prev; StrNode* sn; OnigEncoding enc = reg->enc; sn = STR_(node); if (sn->end <= sn->s) return 0; ambig = NODE_STRING_IS_AMBIG(node); p = prev = sn->s; prev_len = enclen(enc, p); p += pre...
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
222,594,119,669,846,860,000,000,000,000,000,000,000
38
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
static void ql_mac_cfg_gig(struct ql3_adapter *qdev, u32 enable) { struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers; u32 value; if (enable) value = (MAC_CONFIG_REG_GM | (MAC_CONFIG_REG_GM << 16)); else value = (MAC_CONFIG_REG_GM << 16); if (qdev->mac_index) ql_write_page0_reg(qd...
0
[ "CWE-401" ]
linux
1acb8f2a7a9f10543868ddd737e37424d5c36cf4
62,840,540,730,665,270,000,000,000,000,000,000,000
16
net: qlogic: Fix memory leak in ql_alloc_large_buffers In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue...
static void sock_def_error_report(struct sock *sk) { struct socket_wq *wq; rcu_read_lock(); wq = rcu_dereference(sk->sk_wq); if (skwq_has_sleeper(wq)) wake_up_interruptible_poll(&wq->wait, EPOLLERR); sk_wake_async(sk, SOCK_WAKE_IO, POLL_ERR); rcu_read_unlock(); }
0
[]
net
35306eb23814444bd4021f8a1c3047d3cb0c8b2b
19,946,168,736,497,760,000,000,000,000,000,000,000
11
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred. In order to fix this issue, this patch adds a new spinlock that needs to be used whenever these fields are read o...
send_message_to_server_log(ErrorData *edata) { StringInfoData buf; initStringInfo(&buf); formatted_log_time[0] = '\0'; log_line_prefix(&buf, edata); appendStringInfo(&buf, "%s: ", error_severity(edata->elevel)); if (Log_error_verbosity >= PGERROR_VERBOSE) appendStringInfo(&buf, "%s: ", unpack_sql_state(eda...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
335,616,945,233,309,850,000,000,000,000,000,000,000
204
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...
setbit_c (int b, charclass c) { /* Do nothing if b is invalid in this character set. */ if (MB_CUR_MAX > 1 && btowc (b) == WEOF) return; setbit (b, c); }
0
[ "CWE-189" ]
grep
cbbc1a45b9f843c811905c97c90a5d31f8e6c189
71,987,956,958,135,040,000,000,000,000,000,000,000
7
grep: fix some core dumps with long lines etc. These problems mostly occur because the code attempts to stuff sizes into int or into unsigned int; this doesn't work on most 64-bit hosts and the errors can lead to core dumps. * NEWS: Document this. * src/dfa.c (token): Typedef to ptrdiff_t, since the enum's range could...
static void perf_event__read_size(struct perf_event *event) { int entry = sizeof(u64); /* value */ int size = 0; int nr = 1; if (event->attr.read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) size += sizeof(u64); if (event->attr.read_format & PERF_FORMAT_TOTAL_TIME_RUNNING) size += sizeof(u64); if (event->attr....
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
265,345,739,950,524,800,000,000,000,000,000,000,000
23
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
void CNB::PrepareOffloads(virtio_net_hdr_basic *VirtioHeader, PVOID IpHeader, ULONG EthPayloadLength, ULONG L4HeaderOffset) const { *VirtioHeader = {}; if (m_ParentNBL->IsLSO()) { SetupLSO(VirtioHeader, IpHeader, EthPayloadLength); } else if (m_ParentNBL->IsTcpCSO() || m_ParentNBL->IsUdpCSO...
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
273,843,682,017,006,920,000,000,000,000,000,000,000
18
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
static void flush_change(H264Context *h) { int i, j; h->outputed_poc = h->next_outputed_poc = INT_MIN; h->prev_interlaced_frame = 1; idr(h); h->prev_frame_num = -1; if (h->cur_pic_ptr) { h->cur_pic_ptr->reference = 0; for (j=i=0; h->delayed_pic[i]; i++) if ...
0
[ "CWE-703" ]
FFmpeg
8a3b85f3a7952c54a2c36ba1797f7e0cde9f85aa
232,509,120,399,952,130,000,000,000,000,000,000,000
28
avcodec/h264: update current_sps & sps->new only after the whole slice header decoder and init code finished This avoids them being cleared before the full initialization finished Fixes out of array read Fixes: asan_heap-oob_f0c5e6_7071_cov_1605985132_mov_h264_aac__Demo_FlagOfOurFathers.mov Found-by: Mateusz "j00ru" ...
void FoFiTrueType::getFontMatrix(double *mat) { char *start; int length; FoFiType1C *ff; if (!getCFFBlock(&start, &length)) { return; } if (!(ff = FoFiType1C::make(start, length))) { return; } ff->getFontMatrix(mat); delete ff; }
0
[ "CWE-125" ]
poppler
cdb7ad95f7c8fbf63ade040d8a07ec96467042fc
35,893,078,696,887,626,000,000,000,000,000,000,000
14
Fix malformed file crash in bug #85243