func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
Item_cache_row() :Item_cache(), values(0), item_count(2), save_array(0) {}
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
332,270,632,313,369,840,000,000,000,000,000,000,000
3
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
static int fanout_add(struct sock *sk, u16 id, u16 type_flags) { struct packet_rollover *rollover = NULL; struct packet_sock *po = pkt_sk(sk); struct packet_fanout *f, *match; u8 type = type_flags & 0xff; u8 flags = type_flags >> 8; int err; switch (type) { case PACKET_FANOUT_ROLLOVER: if (type_flags & PACKE...
0
[ "CWE-119" ]
linux
2b6867c2ce76c596676bec7d2d525af525fdc6e2
219,412,020,936,045,900,000,000,000,000,000,000,000
99
net/packet: fix overflow in check for priv area size Subtracting tp_sizeof_priv from tp_block_size and casting to int to check whether one is less then the other doesn't always work (both of them are unsigned ints). Compare them as is instead. Also cast tp_sizeof_priv to u64 before using BLK_PLUS_PRIV, as it can ove...
void Magick::Image::vignette(const double radius_,const double sigma_, const ssize_t x_,const ssize_t y_) { MagickCore::Image *newImage; GetPPException; newImage=VignetteImage(constImage(),radius_,sigma_,x_,y_,exceptionInfo); replaceImage(newImage); ThrowImageException; }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
198,276,503,481,262,140,000,000,000,000,000,000,000
11
Added missing return to avoid use after free.
static bool seq_nr_after(u16 a, u16 b) { /* Remove inconsistency where * seq_nr_after(a, b) == seq_nr_before(a, b) */ if ((int) b - a == 32768) return false; return (((s16) (b - a)) < 0); }
0
[ "CWE-772", "CWE-269", "CWE-401" ]
linux
6caabe7f197d3466d238f70915d65301f1716626
140,739,444,232,034,300,000,000,000,000,000,000,000
10
net: hsr: fix memory leak in hsr_dev_finalize() If hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER) failed to add port, it directly returns res and forgets to free the node that allocated in hsr_create_self_node(), and forgets to delete the node->mac_list linked in hsr->self_node_db. BUG: memory leak unreferenced object 0xf...
static int memory_open(struct inode *inode, struct file *filp) { int minor; const struct memdev *dev; minor = iminor(inode); if (minor >= ARRAY_SIZE(devlist)) return -ENXIO; dev = &devlist[minor]; if (!dev->fops) return -ENXIO; filp->f_op = dev->fops; filp->f_mode |= dev->fmode; if (dev->fops->open) ...
0
[ "CWE-200", "CWE-732" ]
linux
a4866aa812518ed1a37d8ea0c881dc946409de94
58,227,569,550,231,060,000,000,000,000,000,000,000
21
mm: Tighten x86 /dev/mem with zeroing reads Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is disallowed. However, on x86, the first 1MB was always allowed for BIOS and similar things, regardless of it actually being System RAM. It was possible for heap to end up getting allocated in low 1MB RAM, and ...
void __ptrace_link(struct task_struct *child, struct task_struct *new_parent, const struct cred *ptracer_cred) { BUG_ON(!list_empty(&child->ptrace_entry)); list_add(&child->ptrace_entry, &new_parent->ptraced); child->parent = new_parent; child->ptracer_cred = get_cred(ptracer_cred); }
0
[ "CWE-264", "CWE-269" ]
linux
6994eefb0053799d2e07cd140df6c2ea106c41ee
252,601,058,178,207,700,000,000,000,000,000,000,000
8
ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME Fix two issues: When called for PTRACE_TRACEME, ptrace_link() would obtain an RCU reference to the parent's objective credentials, then give that pointer to get_cred(). However, the object lifetime rules for things like struct cred do not permit unconditionally ...
validate_zone(const char *tzname) { pg_tz *tz; if (!tzname || !tzname[0]) return false; tz = pg_load_tz(tzname); if (!tz) return false; if (!pg_tz_acceptable(tz)) return false; return true; }
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
12,062,131,068,543,555,000,000,000,000,000,000,000
16
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
isdn_ppp_hangup_slave(char *name) { #ifdef CONFIG_ISDN_MPP isdn_net_dev *ndev; isdn_net_local *lp; struct net_device *sdev; if (!(ndev = isdn_net_findif(name))) return 1; lp = ndev->local; if (!(lp->flags & ISDN_NET_CONNECTED)) return 5; sdev = lp->slave; while (sdev) { isdn_net_local *mlp = netdev_priv...
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
135,165,410,973,614,460,000,000,000,000,000,000,000
36
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
static bool vq_access_ok(struct vhost_virtqueue *vq, unsigned int num, struct vring_desc __user *desc, struct vring_avail __user *avail, struct vring_used __user *used) { return access_ok(desc, vhost_get_desc_size(vq, num)) && access_ok(avail, vhost_get_avail_size(vq, num)) && access_ok(us...
0
[ "CWE-120" ]
linux
060423bfdee3f8bc6e2c1bac97de24d5415e2bc4
127,576,916,236,440,180,000,000,000,000,000,000,000
10
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...
int authorized_client(CLIENT *opts) { const char *ERRMSG="Invalid entry '%s' in authfile '%s', so, refusing all connections."; FILE *f ; char line[LINELEN]; char *tmp; struct in_addr addr; struct in_addr client; struct in_addr cltemp; int len; if ((f=fopen(opts->server->authname,"r"))==NULL) { ...
0
[ "CWE-399", "CWE-310" ]
nbd
741495cb08503fd32a9d22648e63b64390c601f4
140,147,022,508,219,490,000,000,000,000,000,000,000
46
nbd-server: handle modern-style negotiation in a child process Previously, the modern style negotiation was carried out in the root server (listener) process before forking the actual client handler. This made it possible for a malfunctioning or evil client to terminate the root process simply by querying a non-existe...
static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh) { struct net *net = sock_net(skb->sk); const struct rtnl_link_ops *ops; struct net_device *dev; struct ifinfomsg *ifm; char ifname[IFNAMSIZ]; struct nlattr *tb[IFLA_MAX+1]; int err; LIST_HEAD(list_kill); err = nlmsg_parse(nlh, sizeof(*ifm), tb...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
246,161,476,720,906,780,000,000,000,000,000,000,000
38
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. ...
static int ieee80211_change_bss(struct wiphy *wiphy, struct net_device *dev, struct bss_parameters *params) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct ieee80211_supported_band *sband; u32 changed = 0; if (!sdata_dereference(sdata->u.ap.beacon, sdata)) return -ENOENT; s...
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
19,754,198,484,379,398,000,000,000,000,000,000,000
83
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-...
int hashtable_set(hashtable_t *hashtable, const char *key, size_t serial, json_t *value) { pair_t *pair; bucket_t *bucket; size_t hash, index; /* rehash if the load ratio exceeds 1 */ if(hashtable->size >= hashsize(hashtable->order)) if(hashtable_do_rehas...
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
229,012,629,152,575,330,000,000,000,000,000,000,000
44
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
acpi_parse_int_src_ovr(struct acpi_subtable_header * header, const unsigned long end) { struct acpi_madt_interrupt_override *intsrc = NULL; intsrc = (struct acpi_madt_interrupt_override *)header; if (BAD_MADT_ENTRY(intsrc, end)) return -EINVAL; acpi_table_print_madt_entry(header); if (intsrc->source...
0
[ "CWE-120" ]
linux
dad5ab0db8deac535d03e3fe3d8f2892173fa6a4
51,738,371,497,445,910,000,000,000,000,000,000,000
40
x86/acpi: Prevent out of bound access caused by broken ACPI tables The bus_irq argument of mp_override_legacy_irq() is used as the index into the isa_irq_to_gsi[] array. The bus_irq argument originates from ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI tables, but is nowhere sanity checked. Th...
static inline u32 tcp_notsent_lowat(const struct tcp_sock *tp) { struct net *net = sock_net((struct sock *)tp); return tp->notsent_lowat ?: net->ipv4.sysctl_tcp_notsent_lowat; }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
127,496,131,048,004,610,000,000,000,000,000,000,000
5
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
static mif_cmpt_t *mif_cmpt_create() { mif_cmpt_t *cmpt; if (!(cmpt = jas_malloc(sizeof(mif_cmpt_t)))) { return 0; } memset(cmpt, 0, sizeof(mif_cmpt_t)); return cmpt; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
74,833,378,805,558,490,000,000,000,000,000,000,000
9
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...
asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs) { static int count; /* Don't make the system unusable, if someone goes stuck */ if (count++ > 5) return -ENOSYS; printk ("Unimplemented SPARC system call %ld\n",regs->u_regs[1]); #ifdef DEBUG_UNIMP_SYSCALL show_regs (regs); #endif return -ENO...
0
[]
linux
5a0efea09f42f7c92bd98a38d66b4dff9589266b
255,527,649,186,003,340,000,000,000,000,000,000,000
15
sparc64: Sharpen address space randomization calculations. A recent patch to the x86 randomization code caused me to take a quick look at what we do on sparc64, and in doing so I noticed that we sometimes calculate a non-page-aligned randomization value and stick it into mmap_base. I also noticed that since I copied ...
void jpc_ft_invlift_colres(jpc_fix_t *a, int numrows, int numcols, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; register int i; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first liftin...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
278,345,483,568,718,180,000,000,000,000,000,000,000
99
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...
DECLAREContigPutFunc(putRGBcontig8bittile) { int samplesperpixel = img->samplesperpixel; (void) x; (void) y; fromskew *= samplesperpixel; while (h-- > 0) { UNROLL8(w, NOP, *cp++ = PACK(pp[0], pp[1], pp[2]); pp += samplesperpixel); cp += toskew; pp += fromskew; } }
0
[ "CWE-119" ]
libtiff
40a5955cbf0df62b1f9e9bd7d9657b0070725d19
95,271,187,218,593,200,000,000,000,000,000,000,000
14
* libtiff/tif_next.c: add new tests to check that we don't read outside of the compressed input stream buffer. * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height
vrrp_garp_rep_handler(vector_t *strvec) { unsigned repeats; /* The min value should be 1, but allow 0 to maintain backward compatibility * with pre v2.0.7 */ if (!read_unsigned_strvec(strvec, 1, &repeats, 0, UINT_MAX, true)) { report_config_error(CONFIG_GENERAL_ERROR, "vrrp_garp_master_repeat '%s' invalid - ign...
0
[ "CWE-200" ]
keepalived
c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067
319,793,727,567,074,860,000,000,000,000,000,000,000
19
Add command line and configuration option to set umask Issue #1048 identified that files created by keepalived are created with mode 0666. This commit changes the default to 0644, and also allows the umask to be specified in the configuration or as a command line option. Signed-off-by: Quentin Armitage <quentin@armit...
smtp_server_connection_create( struct smtp_server *server, int fd_in, int fd_out, const struct ip_addr *remote_ip, in_port_t remote_port, bool ssl_start, const struct smtp_server_settings *set, const struct smtp_server_callbacks *callbacks, void *context) { struct smtp_server_connection *conn; struct event *conn_...
0
[ "CWE-77" ]
core
321c339756f9b2b98fb7326359d1333adebb5295
29,112,221,581,766,774,000,000,000,000,000,000,000
29
lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability. The input handler kept reading more commands even though the input was locked by the STARTTLS command, thereby causing it to read the command pipelined beyond STARTTLS. This causes a STARTTLS command injection vulerability.
bool supportsUdpGso() const override { return false; }
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
188,299,242,808,319,970,000,000,000,000,000,000,000
1
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int racl_cb(void *rock, const char *key, size_t keylen, const char *data __attribute__((unused)), size_t datalen __attribute__((unused))) { struct raclrock *raclrock = (struct raclrock *)rock; strarray_appendm(raclrock->list, xstrndup(key + raclroc...
0
[ "CWE-20" ]
cyrus-imapd
6bd33275368edfa71ae117de895488584678ac79
151,310,633,479,800,720,000,000,000,000,000,000,000
9
mboxlist: fix uninitialised memory use where pattern is "Other Users"
static RtreeNode *nodeHashLookup(Rtree *pRtree, i64 iNode){ RtreeNode *p; for(p=pRtree->aHash[nodeHash(iNode)]; p && p->iNode!=iNode; p=p->pNext); return p; }
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
203,398,019,829,376,600,000,000,000,000,000,000,000
5
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b) { int rv; rv = OBJ_cmp(a->algorithm, b->algorithm); if (rv) return rv; if (!a->parameter && !b->parameter) return 0; return ASN1_TYPE_cmp(a->parameter, b->parameter); }
0
[]
openssl
c22e2dd6e52899926d1f1ee3a2b5b9570d03130f
155,009,818,944,787,080,000,000,000,000,000,000,000
10
Add ASN1_TYPE_cmp and X509_ALGOR_cmp. (these are needed for certificate fingerprint fixes) Reviewed-by: Emilia Käsper <emilia@openssl.org>
int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) { if (x == NULL) { SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE,ERR_R_PASSED_NULL_PARAMETER); return(0); } if (!ssl_cert_inst(&ctx->cert)) { SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE,ERR_R_MALLOC_FAILURE); return(0); } return(ssl_set_cert(ctx->cert, x)); }
0
[]
openssl
0ffa49970b9f8ea66b43ce2eb7f8fd523b65bc2c
294,067,092,548,168,620,000,000,000,000,000,000,000
14
Backport support for fixed DH ciphersuites (from HEAD)
MagickExport const char *GetMagickFeatures(void) { return "DPC" #if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_DEBUG) " Debug" #endif #if defined(MAGICKCORE_CIPHER_SUPPORT) " Cipher" #endif #if defined(MAGICKCORE_HDRI_SUPPORT) " HDRI" #endif #if defined(MAGICKCORE_BUILD_MODULES) || defined(_DLL) " Module...
0
[ "CWE-190", "CWE-189", "CWE-703" ]
ImageMagick
0f6fc2d5bf8f500820c3dbcf0d23ee14f2d9f734
63,663,038,199,195,125,000,000,000,000,000,000,000
26
_enforce_checksum (void) { static gint enforce = -1; if (enforce == -1) enforce = g_getenv ("GCAB_SKIP_CHECKSUM") == NULL ? 1 : 0; return enforce; }
0
[ "CWE-787" ]
gcab
c512f6ff0c82a1139b36db2b28f93edc01c74b4b
165,564,221,472,967,200,000,000,000,000,000,000,000
7
trivial: Allocate cdata_t on the heap Using a 91kB stack allocation for one object isn't awesome, and it also allows us to use g_autoptr() to simplify gcab_folder_extract()
static inline notrace void arch_local_irq_disable(void) { PVOP_VCALLEE0(irq.irq_disable); }
0
[ "CWE-276" ]
linux
cadfad870154e14f745ec845708bc17d166065f2
64,799,880,590,364,320,000,000,000,000,000,000,000
4
x86/ioperm: Fix io bitmap invalidation on Xen PV tss_invalidate_io_bitmap() wasn't wired up properly through the pvop machinery, so the TSS and Xen's io bitmap would get out of sync whenever disabling a valid io bitmap. Add a new pvop for tss_invalidate_io_bitmap() to fix it. This is XSA-329. Fixes: 22fe5b0439dd ("...
static void mark_smac_params(Token *tline, const SMacro *tmpl, enum pp_token_type type) { const struct smac_param *params = tmpl->params; int nparam = tmpl->nparam; Token *t; int i; list_for_each(t, tline) { if (t->type != TOK_ID && t->type != TOK_XDEF_PARAM) ...
0
[]
nasm
6299a3114ce0f3acd55d07de201a8ca2f0a83059
282,153,525,512,029,750,000,000,000,000,000,000,000
18
BR 3392708: fix NULL pointer reference for invalid %stacksize After issuing an error message for a missing %stacksize argument, need to quit rather than continuing to try to access the pointer. Fold uses of tok_text() while we are at it. Reported-by: Suhwan <prada960808@gmail.com> Signed-off-by: H. Peter Anvin (Inte...
void rose_clear_queues(struct sock *sk) { skb_queue_purge(&sk->sk_write_queue); skb_queue_purge(&rose_sk(sk)->ack_queue); }
0
[ "CWE-20" ]
linux
e0bccd315db0c2f919e7fcf9cb60db21d9986f52
180,099,346,363,395,220,000,000,000,000,000,000,000
5
rose: Add length checks to CALL_REQUEST parsing Define some constant offsets for CALL_REQUEST based on the description at <http://www.techfest.com/networking/wan/x25plp.htm> and the definition of ROSE as using 10-digit (5-byte) addresses. Use them consistently. Validate all implicit and explicit facilities lengths. ...
void InitSignatureCtx(SignatureCtx* sigCtx, void* heap, int devId) { if (sigCtx) { XMEMSET(sigCtx, 0, sizeof(SignatureCtx)); sigCtx->devId = devId; sigCtx->heap = heap; } }
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
252,225,349,587,599,760,000,000,000,000,000,000,000
8
OCSP: improve handling of OCSP no check extension
time_t file_modified_time(const std::string& fname) { error_code ec; std::time_t mtime = bfs::last_write_time(path(fname), ec); if (ec) { LOG_FS << "Failed to read modification time of " << fname << ": " << ec.message() << '\n'; } return mtime; }
0
[ "CWE-200" ]
wesnoth
f8914468182e8d0a1551b430c0879ba236fe4d6d
159,322,127,860,449,960,000,000,000,000,000,000,000
9
Disallow inclusion of .pbl files from WML (bug #23504) Note that this will also cause Lua wesnoth.have_file() to return false on .pbl files.
GIT_INLINE(bool) verify_dospath( const char *component, size_t len, const char dospath[3], bool trailing_num) { size_t last = trailing_num ? 4 : 3; if (len < last || git__strncasecmp(component, dospath, 3) != 0) return true; if (trailing_num && (component[3] < '1' || component[3] > '9')) return true; ret...
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
212,069,653,729,551,300,000,000,000,000,000,000,000
18
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
R_API int r_core_cmd_foreach3(RCore *core, const char *cmd, char *each) { // "@@@" RDebug *dbg = core->dbg; RList *list, *head; RListIter *iter; int i; const char *filter = NULL; if (each[1] == ':') { filter = each + 2; } switch (each[0]) { case '=': foreach_pairs (core, cmd, each + 1); break; case '?...
0
[ "CWE-78" ]
radare2
dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7
274,954,421,687,174,400,000,000,000,000,000,000,000
245
Fix #14990 - multiple quoted command parsing issue ##core > "?e hello""?e world" hello world" > "?e hello";"?e world" hello world
SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length) { int ssl_version=0,i; long id; ASN1_INTEGER ai,*aip; ASN1_OCTET_STRING os,*osp; M_ASN1_D2I_vars(a,SSL_SESSION *,SSL_SESSION_new); aip= &ai; osp= &os; M_ASN1_D2I_Init(); M_ASN1_D2I_start_sequence(); ai.data=NULL; ...
1
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
293,603,922,677,969,620,000,000,000,000,000,000,000
236
Add SRP support.
static ssize_t o2nm_node_ipv4_port_show(struct config_item *item, char *page) { return sprintf(page, "%u\n", ntohs(to_o2nm_node(item)->nd_ipv4_port)); }
0
[ "CWE-476", "CWE-284" ]
linux
853bc26a7ea39e354b9f8889ae7ad1492ffa28d2
148,215,594,330,355,210,000,000,000,000,000,000,000
4
ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent The subsystem.su_mutex is required while accessing the item->ci_parent, otherwise, NULL pointer dereference to the item->ci_parent will be triggered in the following situation: add node delete node sys_write vfs_write con...
void CLASS median_filter() { ushort (*pix)[4]; int pass, c, i, j, k, med[9]; static const uchar opt[] = /* Optimal 9-element median search */ { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; for (pass=1; pass <= med_passes; pass++) { dcraw_message (DC...
0
[ "CWE-189" ]
rawstudio
983bda1f0fa5fa86884381208274198a620f006e
236,573,374,017,593,030,000,000,000,000,000,000,000
26
Avoid overflow in ljpeg_start().
static int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) { struct input_dev *input; int i; input = input_allocate_device(); if (!input) return -ENOMEM; session->input = input; input_set_drvdata(input, session); input->name = "Bluetooth HID Boot Protocol Device"; input->...
0
[ "CWE-843" ]
linux
51bda2bca53b265715ca1852528f38dc67429d9a
80,106,562,278,340,390,000,000,000,000,000,000,000
53
Bluetooth: hidp_connection_add() unsafe use of l2cap_pi() it's OK after we'd verified the sockets, but not before that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
vhost_scsi_make_tpg(struct se_wwn *wwn, struct config_group *group, const char *name) { struct vhost_scsi_tport *tport = container_of(wwn, struct vhost_scsi_tport, tport_wwn); struct vhost_scsi_tpg *tpg; u16 tpgt; int ret; if (strstr(name, "tpgt_") != name) return ERR_PTR(-EINVAL); if (kstrtou16(...
0
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
40,001,835,056,803,570,000,000,000,000,000,000,000
38
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] arr...
static u32 vlan_dev_fix_features(struct net_device *dev, u32 features) { struct net_device *real_dev = vlan_dev_info(dev)->real_dev; u32 old_features = features; features &= real_dev->features; features &= real_dev->vlan_features; features |= old_features & NETIF_F_SOFT_FEATURES; if (dev_ethtool_get_rx_csum(re...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
329,530,283,480,970,340,000,000,000,000,000,000,000
16
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
remove_lock_timer (GSManager *manager) { if (manager->priv->lock_timeout_id != 0) { g_source_remove (manager->priv->lock_timeout_id); manager->priv->lock_timeout_id = 0; } }
0
[]
gnome-screensaver
2f597ea9f1f363277fd4dfc109fa41bbc6225aca
121,554,738,970,824,750,000,000,000,000,000,000,000
7
Fix adding monitors Make sure to show windows that are added. And fix an off by one bug.
CNF_GetLogMeasurements(int *raw) { *raw = raw_measurements; return do_log_measurements; }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
103,037,224,840,093,550,000,000,000,000,000,000,000
5
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
static int __snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info) { struct snd_rawmidi *rmidi; struct snd_rawmidi_str *pstr; struct snd_rawmidi_substream *substream; rmidi = snd_rawmidi_search(card, info->device); if (!rmidi) return -ENXIO; if (info->stream < 0 || info->stream...
0
[ "CWE-416" ]
linux
c1f6e3c818dd734c30f6a7eeebf232ba2cf3181d
10,082,996,992,125,203,000,000,000,000,000,000,000
24
ALSA: rawmidi: Fix racy buffer resize under concurrent accesses The rawmidi core allows user to resize the runtime buffer via ioctl, and this may lead to UAF when performed during concurrent reads or writes: the read/write functions unlock the runtime lock temporarily during copying form/to user-space, and that's the ...
static int renameTableSelectCb(Walker *pWalker, Select *pSelect){ int i; RenameCtx *p = pWalker->u.pRename; SrcList *pSrc = pSelect->pSrc; if( pSelect->selFlags & SF_View ) return WRC_Prune; if( pSrc==0 ){ assert( pWalker->pParse->db->mallocFailed ); return WRC_Abort; } for(i=0; i<pSrc->nSrc; i++)...
0
[ "CWE-674", "CWE-787" ]
sqlite
38096961c7cd109110ac21d3ed7dad7e0cb0ae06
110,570,513,721,923,000,000,000,000,000,000,000,000
19
Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself. FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5
GF_Err ccst_Read(GF_Box *s, GF_BitStream *bs) { GF_CodingConstraintsBox *ptr = (GF_CodingConstraintsBox *)s; ISOM_DECREASE_SIZE(ptr, 4); ptr->all_ref_pics_intra = gf_bs_read_int(bs, 1); ptr->intra_pred_used = gf_bs_read_int(bs, 1); ptr->max_ref_per_pic = gf_bs_read_int(bs, 4); ptr->reserved = gf_bs_read_int(bs, ...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
62,439,859,561,011,760,000,000,000,000,000,000,000
11
prevent dref memleak on invalid input (#1183)
static int lpspi_unprepare_xfer_hardware(struct spi_controller *controller) { struct fsl_lpspi_data *fsl_lpspi = spi_controller_get_devdata(controller); pm_runtime_mark_last_busy(fsl_lpspi->dev); pm_runtime_put_autosuspend(fsl_lpspi->dev); return 0; }
0
[ "CWE-400", "CWE-401" ]
linux
057b8945f78f76d0b04eeb5c27cd9225e5e7ad86
283,837,353,596,706,900,000,000,000,000,000,000,000
10
spi: lpspi: fix memory leak in fsl_lpspi_probe In fsl_lpspi_probe an SPI controller is allocated either via spi_alloc_slave or spi_alloc_master. In all but one error cases this controller is put by going to error handling code. This commit fixes the case when pm_runtime_get_sync fails and it should go to the error han...
lmp_print(netdissect_options *ndo, register const u_char *pptr, register u_int len) { const struct lmp_common_header *lmp_com_header; const struct lmp_object_header *lmp_obj_header; const u_char *tptr,*obj_tptr; int tlen,lmp_obj_len,lmp_obj_ctype,obj_tlen; int hexdump; int offset,subob...
1
[ "CWE-125", "CWE-787" ]
tcpdump
a25211918f2e790c67d859d20ccf8dbb81da1598
175,048,161,353,183,960,000,000,000,000,000,000,000
509
CVE-2017-13003/Clean up the LMP dissector. Do a lot more bounds and length checks. Add a EXTRACT_8BITS() macro, for completeness, and so as not to confuse people into thinking that, to fetch a 1-byte value from a packet, they need to use EXTRACT_16BITS() to fetch a 2-byte value and then use shifting and masking to ex...
longlong Item_cache_real::val_int() { DBUG_ASSERT(fixed == 1); if (!has_value()) return 0; return (longlong) rint(value); }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
151,765,053,453,461,420,000,000,000,000,000,000,000
7
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
static int is_neg_adv_abort(unsigned int status) { return status == CPL_ERR_RTX_NEG_ADVICE || status == CPL_ERR_PERSIST_NEG_ADVICE; }
0
[ "CWE-703" ]
linux
67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3
242,526,161,339,377,150,000,000,000,000,000,000,000
5
iw_cxgb3: Fix incorrectly returning error on success The cxgb3_*_send() functions return NET_XMIT_ values, which are positive integers values. So don't treat positive return values as an error. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off...
static void new_long_term_key_callback(uint16_t index, uint16_t length, const void *param, void *user_data) { const struct mgmt_ev_new_long_term_key *ev = param; const struct mgmt_addr_info *addr = &ev->key.addr; struct btd_adapter *adapter = user_data; struct btd_device *device; bool persistent; char dst[18...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
113,738,774,005,903,670,000,000,000,000,000,000,000
63
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static int aac_get_hba_info(struct aac_dev *dev, void __user *arg) { struct aac_hba_info hbainfo; memset(&hbainfo, 0, sizeof(hbainfo)); hbainfo.adapter_number = (u8) dev->id; hbainfo.system_io_bus_number = dev->pdev->bus->number; hbainfo.device_number = (dev->pdev->devfn >> 3); hbainfo.function_number = (dev-...
0
[ "CWE-200" ]
linux
342ffc26693b528648bdc9377e51e4f2450b4860
164,159,889,420,508,070,000,000,000,000,000,000,000
22
scsi: aacraid: Don't copy uninitialized stack memory to userspace Both aac_send_raw_srb() and aac_get_hba_info() may copy stack allocated structs to userspace without initializing all members of these structs. Clear out this memory to prevent information leaks. Fixes: 423400e64d377 ("scsi: aacraid: Include HBA direct...
PHP_FUNCTION(dom_document_save_html) { zval *id, *nodep = NULL; xmlDoc *docp; xmlNode *node; xmlBufferPtr buf; dom_object *intern, *nodeobj; xmlChar *mem = NULL; int size = 0, format; dom_doc_propsptr doc_props; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|O!", &id, dom_document...
0
[ "CWE-20" ]
php-src
f7d7befae8bcc2db0093f8adaa9f72eeb7ad891e
5,052,475,132,324,914,600,000,000,000,000,000,000
80
Fix #69719 - more checks for nulls in paths
int blk_rq_prep_clone(struct request *rq, struct request *rq_src, struct bio_set *bs, gfp_t gfp_mask, int (*bio_ctr)(struct bio *, struct bio *, void *), void *data) { struct bio *bio, *bio_src; if (!bs) bs = &fs_bio_set; __rq_for_each_bio(bio_src, rq_src) { bio = bio_clone_fast(bio_src...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
288,654,324,140,205,800,000,000,000,000,000,000,000
36
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
int ath6kl_wmi_get_stats_cmd(struct wmi *wmi, u8 if_idx) { return ath6kl_wmi_simple_cmd(wmi, if_idx, WMI_GET_STATISTICS_CMDID); }
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
116,011,994,397,457,430,000,000,000,000,000,000,000
4
ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bo...
void _map_window() { Display *const dpy = cimg::X11_attr().display; bool is_exposed = false, is_mapped = false; XWindowAttributes attr; XEvent event; XMapRaised(dpy,_window); do { // Wait for the window to be mapped. XWindowEvent(dpy,_window,StructureNotifyMask | Exposur...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
27,041,971,627,316,515,000,000,000,000,000,000,000
20
Fix other issues in 'CImg<T>::load_bmp()'.
check_and_restore_fp_context(struct sigcontext __user *sc) { int err, sig; err = sig = fpcsr_pending(&sc->sc_fpc_csr); if (err > 0) err = 0; err |= protected_restore_fp_context(sc); return err ?: sig; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
122,190,018,464,068,080,000,000,000,000,000,000,000
10
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...
ldap_int_tls_connect( LDAP *ld, LDAPConn *conn, const char *host ) { Sockbuf *sb = conn->lconn_sb; int err; tls_session *ssl = NULL; if ( HAS_TLS( sb )) { ber_sockbuf_ctrl( sb, LBER_SB_OPT_GET_SSL, (void *)&ssl ); } else { struct ldapoptions *lo; tls_ctx *ctx; ctx = ld->ld_options.ldo_tls_ctx; ssl = a...
0
[ "CWE-843" ]
openldap
4bdfffd2889c0c5cdf58bebafbdc8fce4bb2bff0
186,859,538,111,429,680,000,000,000,000,000,000,000
81
ITS#9425 add more checks to ldap_X509dn2bv
postprocess_termcap(TERMTYPE2 *tp, bool has_base) { char buf[MAX_LINE * 2 + 2]; string_desc result; /* * TERMCAP DEFAULTS AND OBSOLETE-CAPABILITY TRANSLATIONS * * This first part of the code is the functional inverse of the * fragment in capdefaults.c. * ---------------------------...
0
[ "CWE-125" ]
ncurses
b025434573f466efe27862656a6a9d41dd2bd609
248,529,582,231,688,760,000,000,000,000,000,000,000
292
ncurses 6.1 - patch 20191012 + amend recent changes to ncurses*-config and pc-files to filter out Debian linker-flags (report by Sven Joachim, cf: 20150516). + clarify relationship between tic, infocmp and captoinfo in manpage. + check for invalid hashcode in _nc_find_type_entry and _nc_find_name_entry. > fix seve...
assignment_name (string) char *string; { int offset; char *temp; offset = assignment (string, 0); if (offset == 0) return (char *)NULL; temp = substring (string, 0, offset); return (temp); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
265,984,343,038,921,640,000,000,000,000,000,000,000
12
bash-4.4-rc2 release
static int oidc_util_get_chunked_count(request_rec *r, const char *cookieName) { int chunkCount = 0; char *chunkCountValue = oidc_util_get_cookie(r, oidc_util_get_chunk_count_name(r, cookieName)); if (chunkCountValue != NULL) { char *endptr = NULL; chunkCount = strtol(chunkCountValue, &endptr, 10); if ((*ch...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
131,129,555,049,426,220,000,000,000,000,000,000,000
12
Add a function to escape Javascript characters
wrap_string(smartlist_t *out, const char *string, size_t width, const char *prefix0, const char *prefixRest) { size_t p0Len, pRestLen, pCurLen; const char *eos, *prefixCur; tor_assert(out); tor_assert(string); tor_assert(width); if (!prefix0) prefix0 = ""; if (!prefixRest) prefixRest =...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
220,707,578,885,048,760,000,000,000,000,000,000,000
59
Fix assertion failure in tor_timegm. Fixes bug 6811.
void ssl_free_wbio_buffer(SSL *s) { if (s->bbio == NULL) return; if (s->bbio == s->wbio) { /* remove buffering */ s->wbio=BIO_pop(s->wbio); #ifdef REF_CHECK /* not the usual REF_CHECK, but this avoids adding one more preprocessor symbol */ assert(s->wbio != NULL); #endif } BIO_free(s->bbio); s->bbio=NULL...
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
109,799,649,708,578,820,000,000,000,000,000,000,000
15
Add Next Protocol Negotiation.
static void wav2Decode( unsigned short *in, // io: values are transformed in place int nx, // i : x size int ox, // i : x offset int ny, // i : y size int oy, // i : y offset unsigned short mx) // i : maximum in[x][y] value { bool w14 = (m...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
196,179,399,896,366,230,000,000,000,000,000,000,000
114
Make line_no with too large value(2**20) invalid. Fixes #124
int tipc_udp_nl_add_bearer_data(struct tipc_nl_msg *msg, struct tipc_bearer *b) { struct udp_media_addr *src = (struct udp_media_addr *)&b->addr.value; struct udp_media_addr *dst; struct udp_bearer *ub; struct nlattr *nest; ub = rtnl_dereference(b->media_ptr); if (!ub) return -ENODEV; nest = nla_nest_start_n...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
21,214,160,079,546,320,000,000,000,000,000,000,000
33
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
static int io_eventfd_unregister(struct io_ring_ctx *ctx) { struct io_ev_fd *ev_fd; ev_fd = rcu_dereference_protected(ctx->io_ev_fd, lockdep_is_held(&ctx->uring_lock)); if (ev_fd) { ctx->has_evfd = false; rcu_assign_pointer(ctx->io_ev_fd, NULL); call_rcu(&ev_fd->rcu, io_eventfd_put); return 0; } re...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
43,966,979,285,901,500,000,000,000,000,000,000,000
15
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...
keydirection2ascii (int kd, bool remote) { if (kd == KEY_DIRECTION_BIDIRECTIONAL) return NULL; else if (kd == KEY_DIRECTION_NORMAL) return remote ? "1" : "0"; else if (kd == KEY_DIRECTION_INVERSE) return remote ? "0" : "1"; else { ASSERT (0); } return NULL; /* NOTREACHED */ }
0
[ "CWE-200" ]
openvpn
11d21349a4e7e38a025849479b36ace7c2eec2ee
85,161,942,512,836,840,000,000,000,000,000,000,000
14
Use constant time memcmp when comparing HMACs in openvpn_decrypt. Signed-off-by: Steffan Karger <steffan.karger@fox-it.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: Gert Doering <gert@greenie.muc.de>
RZ_API RZ_BORROW RzPVector *rz_analysis_function_get_vars_used_at(RzAnalysisFunction *fcn, ut64 op_addr) { rz_return_val_if_fail(fcn, NULL); return ht_up_find(fcn->inst_vars, (st64)op_addr - (st64)fcn->addr, NULL); }
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
153,822,612,638,795,320,000,000,000,000,000,000,000
4
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
static inline int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, unsigned long address, unsigned int fault_flags, bool *unlocked) { /* should never happen if there's no MMU */ BUG(); return -EFAULT; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
161,781,385,369,042,990,000,000,000,000,000,000,000
8
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
MagickPrivate Quantum *QueueAuthenticPixelCacheNexus(Image *image, const ssize_t x,const ssize_t y,const size_t columns,const size_t rows, const MagickBooleanType clone,NexusInfo *nexus_info,ExceptionInfo *exception) { CacheInfo *magick_restrict cache_info; MagickOffsetType offset; MagickSizeType ...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
aecd0ada163a4d6c769cec178955d5f3e9316f2f
289,102,186,097,689,860,000,000,000,000,000,000,000
55
Set pixel cache to undefined if any resource limit is exceeded
int Field_short::store(const char *from,uint len,CHARSET_INFO *cs) { ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED; int store_tmp; int error; longlong rnd; error= get_int(cs, from, len, &rnd, UINT_MAX16, INT_MIN16, INT_MAX16); store_tmp= unsigned_flag ? (int) (ulonglong) rnd : (int) rnd; int2store(ptr, st...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
112,432,032,324,341,140,000,000,000,000,000,000,000
12
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese, siginfo_t __user *, uinfo, const struct timespec __user *, uts, size_t, sigsetsize) { int ret, sig; sigset_t these; struct timespec ts; siginfo_t info; long timeout = 0; /* XXX: Don't preclude handling different sized sigset_t's. */ if (sigs...
0
[]
linux-2.6
0083fc2c50e6c5127c2802ad323adf8143ab7856
216,408,634,968,533,560,000,000,000,000,000,000,000
74
do_sigaltstack: avoid copying 'stack_t' as a structure to user space Ulrich Drepper correctly points out that there is generally padding in the structure on 64-bit hosts, and that copying the structure from kernel to user space can leak information from the kernel stack in those padding bytes. Avoid the whole issue b...
static struct child_process *git_connect_git(int fd[2], char *hostandport, const char *path, const char *prog, enum protocol_version version, int flags) { struct child_process *conn; struct strbuf request = STRBUF_INIT; /* * Set up virtual host information based on where we will * c...
1
[]
git
a02ea577174ab8ed18f847cf1693f213e0b9c473
168,478,536,595,388,490,000,000,000,000,000,000,000
53
git_connect_git(): forbid newlines in host and path When we connect to a git:// server, we send an initial request that looks something like: 002dgit-upload-pack repo.git\0host=example.com If the repo path contains a newline, then it's included literally, and we get: 002egit-upload-pack repo .git\0host=exampl...
static void nci_data_timer(struct timer_list *t) { struct nci_dev *ndev = from_timer(ndev, t, data_timer); set_bit(NCI_DATA_EXCHANGE_TO, &ndev->flags); queue_work(ndev->rx_wq, &ndev->rx_work); }
0
[]
linux
48b71a9e66c2eab60564b1b1c85f4928ed04e406
299,780,591,862,988,260,000,000,000,000,000,000,000
7
NFC: add NCI_UNREG flag to eliminate the race There are two sites that calls queue_work() after the destroy_workqueue() and lead to possible UAF. The first site is nci_send_cmd(), which can happen after the nci_close_device as below nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | f...
cr_input_read_byte (CRInput * a_this, guchar * a_byte) { g_return_val_if_fail (a_this && PRIVATE (a_this) && a_byte, CR_BAD_PARAM_ERROR); g_return_val_if_fail (PRIVATE (a_this)->next_byte_index <= PRIVATE (a_this)->nb_bytes, CR_BAD_PARAM_ERROR...
1
[ "CWE-125" ]
libcroco
898e3a8c8c0314d2e6b106809a8e3e93cf9d4394
11,539,558,053,657,233,000,000,000,000,000,000,000
22
input: check end of input before reading a byte When reading bytes we weren't check that the index wasn't out of bound and this could produce an invalid read which could deal to a security bug.
TORRENT_TEST(list) { char b[] = "li12453e3:aaae"; bdecode_node e; error_code ec; int ret = bdecode(b, b + sizeof(b)-1, e, ec); TEST_CHECK(ret == 0); printf("%s\n", print_entry(e).c_str()); std::pair<const char*, int> section = e.data_section(); TEST_CHECK(std::memcmp(b, section.first, section.second) == 0); TE...
0
[ "CWE-125" ]
libtorrent
ec30a5e9ec703afb8abefba757c6d401303b53db
280,204,633,682,078,550,000,000,000,000,000,000,000
22
fix out-of-bounds read in bdecode Fixes #2099
_rpc_forward_data(slurm_msg_t *msg) { forward_data_msg_t *req = (forward_data_msg_t *)msg->data; uint32_t req_uid; struct sockaddr_un sa; int fd = -1, rc = 0; /* Make sure we adjust for the spool dir coming in on the address to * point to the right spot. */ xstrsubstitute(req->address, "%n", conf->node_name)...
0
[ "CWE-20" ]
slurm
df545955e4f119974c278bff0c47155257d5afc7
256,983,361,494,428,070,000,000,000,000,000,000,000
60
Validate gid and user_name values provided to slurmd up front. Do not defer until later, and do not potentially miss out on proper validation of the user_name field which can lead to improper authentication handling. CVE-2018-10995.
MYSQL * STDCALL CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket,ulong client_flag) { char buff[NAME_LEN+USERNAME_LENGTH+100]; int scramble_data_len, pkt_scramble_len= 0; char *end,...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
79,106,145,208,000,560,000,000,000,000,000,000,000
663
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...
virtual ~Query_arena() {};
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
184,548,095,090,089,700,000,000,000,000,000,000,000
1
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
R_API void r_bin_java_print_invokedynamic_cp_summary(RBinJavaCPTypeObj *obj) { if (obj == NULL) { eprintf ("Attempting to print an invalid RBinJavaCPTypeObj* RBinJavaCPTypeInvokeDynamic.\n"); return; } eprintf ("InvokeDynamic ConstantPool Type (%d) ", obj->metas->ord); eprintf (" Offset: 0x%08"PFMT64x"", obj->...
0
[ "CWE-787" ]
radare2
9650e3c352f675687bf6c6f65ff2c4a3d0e288fa
281,119,677,457,229,600,000,000,000,000,000,000,000
10
Fix oobread segfault in java arith8.class ##crash * Reported by Cen Zhang via huntr.dev
static void __exit hhf_module_exit(void) { unregister_qdisc(&hhf_qdisc_ops); }
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
143,779,847,231,135,960,000,000,000,000,000,000,000
4
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
REF_GetMode(void) { return mode; }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
302,161,385,019,003,770,000,000,000,000,000,000,000
4
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
static inline int br_ip_equal(const struct br_ip *a, const struct br_ip *b) { if (a->proto != b->proto) return 0; switch (a->proto) { case htons(ETH_P_IP): return a->u.ip4 == b->u.ip4; #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) case htons(ETH_P_IPV6): return ipv6_addr_equal(&a->u.ip6, &b->u.ip6);...
0
[ "CWE-399" ]
linux
6b0d6a9b4296fa16a28d10d416db7a770fc03287
3,242,384,589,568,953,000,000,000,000,000,000,000
14
bridge: Fix mglist corruption that leads to memory corruption The list mp->mglist is used to indicate whether a multicast group is active on the bridge interface itself as opposed to one of the constituent interfaces in the bridge. Unfortunately the operation that adds the mp->mglist node to the list neglected to che...
int blkid_parttable_set_uuid(blkid_parttable tab, const unsigned char *id) { if (!tab) return -1; blkid_unparse_uuid(id, tab->id, sizeof(tab->id)); return 0; }
0
[]
util-linux
50d1594c2e6142a3b51d2143c74027480df082e0
242,956,572,862,162,950,000,000,000,000,000,000,000
8
libblkid: avoid non-empty recursion in EBR This is extension to the patch 7164a1c34d18831ac61c6744ad14ce916d389b3f. We also need to detect non-empty recursion in the EBR chain. It's possible to create standard valid logical partitions and in the last one points back to the EBR chain. In this case all offsets will be ...
TEST_F(QueryPlannerTest, ContainedOr) { addIndex(BSON("b" << 1 << "a" << 1)); addIndex(BSON("c" << 1 << "a" << 1)); runQuery(fromjson("{$and: [{a: 5}, {$or: [{b: 6}, {c: 7}]}]}")); assertNumSolutions(2); assertSolutionExists( "{fetch: {filter: null, node: {or: {nodes: [" "{ixscan: {...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
186,660,324,589,391,130,000,000,000,000,000,000,000
15
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { struct inode *inode = dentry->d_inode; struct task_struct *p = get_proc_task(inode); generic_fillattr(inode, stat); if (p) { stat->nlink += get_nr_threads(p); put_task_struct(p); } return 0; }
0
[]
linux
0499680a42141d86417a8fbaa8c8db806bea1201
31,982,417,842,552,810,000,000,000,000,000,000,000
13
procfs: add hidepid= and gid= mount options Add support for mount options to restrict access to /proc/PID/ directories. The default backward-compatible "relaxed" behaviour is left untouched. The first mount option is called "hidepid" and its value defines how much info about processes we want to be available for non...
size_t parse_core(const char *s, size_t n, SemanticValues &sv, Context &c, any &dt) const override { size_t id = 0; for (const auto &ope : opes_) { auto &chldsv = c.push(); c.push_capture_scope(); auto se = make_scope_exit([&]() { c.pop(); c.pop_capture_sc...
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
27,090,540,325,647,945,000,000,000,000,000,000,000
39
Fix #122
static struct gvt_dma *__gvt_cache_find_gfn(struct intel_vgpu *vgpu, gfn_t gfn) { struct rb_node *node = vgpu->vdev.gfn_cache.rb_node; struct gvt_dma *itr; while (node) { itr = rb_entry(node, struct gvt_dma, gfn_node); if (gfn < itr->gfn) node = node->rb_left; else if (gfn > itr->gfn) node = node->rb_r...
0
[ "CWE-20" ]
linux
51b00d8509dc69c98740da2ad07308b630d3eb7d
48,009,591,094,405,050,000,000,000,000,000,000,000
17
drm/i915/gvt: Fix mmap range check This is to fix missed mmap range check on vGPU bar2 region and only allow to map vGPU allocated GMADDR range, which means user space should support sparse mmap to get proper offset for mmap vGPU aperture. And this takes care of actual pgoff in mmap request as original code always doe...
static int snd_card_do_free(struct snd_card *card) { #if IS_ENABLED(CONFIG_SND_MIXER_OSS) if (snd_mixer_oss_notify_callback) snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE); #endif snd_device_free_all(card); if (card->private_free) card->private_free(card); snd_info_free_entry(card->proc_id); if...
0
[ "CWE-362", "CWE-399" ]
linux
07f4d9d74a04aa7c72c5dae0ef97565f28f17b92
292,505,805,194,246,800,000,000,000,000,000,000,000
19
ALSA: control: Protect user controls against concurrent access The user-control put and get handlers as well as the tlv do not protect against concurrent access from multiple threads. Since the state of the control is not updated atomically it is possible that either two write operations or a write and a read operatio...
sctp_disposition_t sctp_sf_cookie_echoed_prm_abort( struct net *net, const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { /* There is a single T1 timer, so we should be able to use * common function with the COOKIE-WAIT state. ...
0
[]
linux
196d67593439b03088913227093e374235596e33
210,749,635,710,042,070,000,000,000,000,000,000,000
13
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. ...
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) { /* Behave like FETCH_OBJ_W */ zend_free_op free_op1, free_op2; zval *property = _get_zval_ptr_tmp(&opline->op2, E...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
206,982,567,793,286,700,000,000,000,000,000,000,000
36
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
DECLARESepPutFunc(putRGBseparate8bittile) { (void) img; (void) x; (void) y; (void) a; while (h-- > 0) { UNROLL8(w, NOP, *cp++ = PACK(*r++, *g++, *b++)); SKEW(r, g, b, fromskew); cp += toskew; } }
0
[ "CWE-119" ]
libtiff
40a5955cbf0df62b1f9e9bd7d9657b0070725d19
153,971,676,672,951,020,000,000,000,000,000,000,000
9
* libtiff/tif_next.c: add new tests to check that we don't read outside of the compressed input stream buffer. * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height
static ssize_t dev_attr_store(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) { struct device_attribute *dev_attr = to_dev_attr(attr); struct device *dev = kobj_to_dev(kobj); ssize_t ret = -EIO; if (dev_attr->store) ret = dev_attr->store(dev, dev_attr, buf, count); return r...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
337,399,876,359,665,950,000,000,000,000,000,000,000
11
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...
static void _db_level_get(struct db_arg_chain_tree *node) { struct db_arg_chain_tree *iter = node; while (iter->lvl_prv != NULL) iter = iter->lvl_prv; while (iter) { _db_tree_get(iter); iter = iter->lvl_nxt; } }
1
[]
libseccomp
c5bf78de480b32b324e0f511c88ce533ed280b37
86,341,463,341,447,090,000,000,000,000,000,000,000
12
db: fix 64-bit argument comparisons Our approach to doing 64-bit comparisons using 32-bit operators was just plain wrong, leading to a number of potential problems with filters that used the LT, GT, LE, or GE operators. This patch fixes this problem and a few other related issues that came to light in the course of f...
static Image *ReadOneMNGImage(MngInfo* mng_info, const ImageInfo *image_info, ExceptionInfo *exception) { char page_geometry[MagickPathExtent]; Image *image; MagickBooleanType logging; volatile int first_mng_object, object_id, term_chunk_found, skip_to_iend; volatile ssize...
0
[ "CWE-125" ]
ImageMagick
d17c047f7bff7c0edbf304470cd2ab9d02fbf617
224,375,518,662,781,330,000,000,000,000,000,000,000
2,429
https://github.com/ImageMagick/ImageMagick/issues/1561
static void add_object(struct i915_mmu_object *mo) { GEM_BUG_ON(!RB_EMPTY_NODE(&mo->it.rb)); interval_tree_insert(&mo->it, &mo->mn->objects); }
0
[ "CWE-362" ]
linux
17839856fd588f4ab6b789f482ed3ffd7c403e1f
100,057,548,570,925,210,000,000,000,000,000,000,000
5
gup: document and work around "COW can break either way" issue Doing a "get_user_pages()" on a copy-on-write page for reading can be ambiguous: the page can be COW'ed at any time afterwards, and the direction of a COW event isn't defined. Yes, whoever writes to it will generally do the COW, but if the thread that did...
static int ext4_fill_super(struct super_block *sb, void *data, int silent) { char *orig_data = kstrdup(data, GFP_KERNEL); struct buffer_head *bh; struct ext4_super_block *es = NULL; struct ext4_sb_info *sbi; ext4_fsblk_t block; ext4_fsblk_t sb_block = get_sb_block(&data); ext4_fsblk_t logical_sb_block; unsigned...
1
[ "CWE-241", "CWE-19" ]
linux
82939d7999dfc1f1998c4b1c12e2f19edbdff272
233,740,273,037,956,250,000,000,000,000,000,000,000
922
ext4: convert to mbcache2 The conversion is generally straightforward. The only tricky part is that xattr block corresponding to found mbcache entry can get freed before we get buffer lock for that block. So we have to check whether the entry is still valid after getting buffer lock. Signed-off-by: Jan Kara <jack@sus...
static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) { struct sctp_endpoint *ep = sctp_sk(sk)->ep; struct sctp_transport *transport = NULL; struct sctp_sndrcvinfo _sinfo, *sinfo; struct sctp_association *asoc, *tmp; struct sctp_cmsgs cmsgs; union sctp_addr *daddr; bool new = false; __u16...
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
76,853,783,868,710,360,000,000,000,000,000,000,000
97
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
void ActiveRawUdpListener::onReceiveError(Api::IoError::IoErrorCode error_code) { read_filter_->onReceiveError(error_code); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
299,313,700,374,218,940,000,000,000,000,000,000,000
3
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static int bnx2x_get_num_non_def_sbs(struct pci_dev *pdev, int cnic_cnt) { int index; u16 control = 0; /* * If MSI-X is not supported - return number of SBs needed to support * one fast path queue: one FP queue + SB for CNIC */ if (!pdev->msix_cap) { dev_info(&pdev->dev, "no msix capability found\n"); re...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
148,065,320,355,418,490,000,000,000,000,000,000,000
28
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...