func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
bool hash_target_check_v(const unsigned char *hash, const unsigned char *target) { bool rc; rc = hash_target_check(hash, target); if (opt_debug) { unsigned char hash_swap[32], target_swap[32]; char *hash_str, *target_str; for (int i = 0; i < 32; ++i) { hash_swap[i] = hash[31-i]; target_swap[i] = targe...
0
[ "CWE-119", "CWE-787" ]
bfgminer
c80ad8548251eb0e15329fc240c89070640c9d79
299,595,664,786,880,800,000,000,000,000,000,000,000
30
Stratum: extract_sockaddr: Truncate overlong addresses rather than stack overflow Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for finding this!
merge_charset_and_collation(CHARSET_INFO *cs, CHARSET_INFO *cl) { if (cl) { if (!my_charset_same(cs, cl)) { my_error(ER_COLLATION_CHARSET_MISMATCH, MYF(0), cl->name, cs->csname); return NULL; } return cl; } return cs; }
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
326,681,431,924,037,670,000,000,000,000,000,000,000
13
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...
void free_report_result(struct report_result *result) { if (!result) return; free(result->url); free(result->msg); free(result->bthash); free(result); }
0
[ "CWE-264" ]
libreport
3bbf961b1884dd32654dd39b360dd78ef294b10a
45,089,259,859,632,630,000,000,000,000,000,000,000
9
never follow symlinks rhbz#887866 - use lchown instead chown and O_NOFOLLOW where we use open
static void gic_vmcr_write(GICState *s, uint32_t value, MemTxAttrs attrs) { int vcpu = gic_get_current_vcpu(s); uint32_t ctlr; uint32_t abpr; uint32_t bpr; uint32_t prio_mask; ctlr = FIELD_EX32(value, GICH_VMCR, VMCCtlr); abpr = FIELD_EX32(value, GICH_VMCR, VMABP); bpr = FIELD_EX32(valu...
0
[ "CWE-787" ]
qemu
edfe2eb4360cde4ed5d95bda7777edcb3510f76a
21,915,293,740,695,290,000,000,000,000,000,000,000
18
hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register Per the ARM Generic Interrupt Controller Architecture specification (document "ARM IHI 0048B.b (ID072613)"), the SGIINTID field is 4 bit, not 10: - 4.3 Distributor register descriptions - 4.3.15 Software Generated Interrupt Register, GICD_SG - Table 4-2...
static int snd_seq_ioctl_get_client_info(struct snd_seq_client *client, void __user *arg) { struct snd_seq_client *cptr; struct snd_seq_client_info client_info; if (copy_from_user(&client_info, arg, sizeof(client_info))) return -EFAULT; /* requested client number */ cptr = snd_seq_client_use_ptr(client_i...
0
[ "CWE-703" ]
linux
030e2c78d3a91dd0d27fef37e91950dde333eba1
262,674,017,700,677,700,000,000,000,000,000,000,000
21
ALSA: seq: Fix missing NULL check at remove_events ioctl snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov <dvyukov@google.com> Tested-by...
int gx_device_unsubclass(gx_device *dev) { generic_subclass_data *psubclass_data; gx_device *parent, *child; gs_memory_struct_type_t *a_std = 0, *b_std = 0; int dynamic, ref_count; /* This should not happen... */ if (!dev) return 0; ref_count = dev->rc.ref_count; child = dev->c...
0
[]
ghostpdl
c9b362ba908ca4b1d7c72663a33229588012d7d9
103,763,132,309,216,240,000,000,000,000,000,000,000
128
Bug 699670: disallow copying of the epo device The erasepage optimisation (epo) subclass device shouldn't be allowed to be copied because the subclass private data, child and parent pointers end up being shared between the original device and the copy. Add an epo_finish_copydevice which NULLs the three offending poin...
Magick_RenderingIntent_to_PNG_RenderingIntent(const RenderingIntent intent) { switch (intent) { case PerceptualIntent: return 0; case RelativeIntent: return 1; case SaturationIntent: return 2; case AbsoluteIntent: return 3; default: return -1; } }
0
[ "CWE-476" ]
ImageMagick
816ecab6c532ae086ff4186b3eaf4aa7092d536f
36,654,236,825,956,270,000,000,000,000,000,000,000
20
https://github.com/ImageMagick/ImageMagick/issues/58
static int local_LZ4_compress_limitedOutput_continue(const char* in, char* out, int inSize) { return LZ4_compress_limitedOutput_continue(ctx, in, out, inSize, LZ4_compressBound(inSize)); }
0
[ "CWE-20" ]
lz4
da5373197e84ee49d75b8334d4510689731d6e90
275,023,657,716,657,050,000,000,000,000,000,000,000
4
Fixed : issue 52 (reported by Ludwig Strigeus)
static void Ins_EVEN( INS_ARG ) { if ( (CUR_Func_round( args[0], 0L ) & 127) == 0 ) args[0] = 1; else args[0] = 0; }
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
19,589,241,045,139,870,000,000,000,000,000,000,000
7
Bug 698024: bounds check zone pointer in Ins_MIRP()
static int rtw_wx_set_mlme(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { int ret = 0; u16 reason; struct adapter *padapter = rtw_netdev_priv(dev); struct iw_mlme *mlme = (struct iw_mlme *)extra; if (!mlme) return -1; DBG_88E("%s\n", __func__); reaso...
0
[ "CWE-787" ]
linux
74b6b20df8cfe90ada777d621b54c32e69e27cd7
74,103,307,672,561,955,000,000,000,000,000,000,000
32
staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan() This code has a check to prevent read overflow but it needs another check to prevent writing beyond the end of the ->ssid[] array. Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16") Signed-off-by: Dan Carpenter <dan.carpenter@o...
static void write_cb(struct bt_att_chan *chan, uint8_t opcode, const void *pdu, uint16_t length, void *user_data) { struct bt_gatt_server *server = user_data; struct gatt_db_attribute *attr; uint16_t handle = 0; struct async_write_op *op = NULL; uint8_t ecode; if (length < 2) { ecode = BT_ATT_ERROR_INVALI...
0
[ "CWE-476", "CWE-119", "CWE-787" ]
bluez
591c546c536b42bef696d027f64aa22434f8c3f0
174,272,525,117,494,900,000,000,000,000,000,000,000
58
shared/gatt-server: Fix heap overflow when appending prepare writes The code shall check if the prepare writes would append more the allowed maximum attribute length. Fixes https://github.com/bluez/bluez/security/advisories/GHSA-479m-xcq5-9g2q
flush_adjustment(fz_context *ctx, pdf_filter_processor *p) { pdf_obj *arr; if (p->Tm_adjust == 0) return; filter_flush(ctx, p, FLUSH_ALL); arr = pdf_new_array(ctx, p->doc, 1); fz_try(ctx) { pdf_array_push_real(ctx, arr, p->Tm_adjust * 1000); if (p->chain->op_TJ) p->chain->op_TJ(ctx, p->chain, arr); } ...
0
[ "CWE-125" ]
mupdf
97096297d409ec6f206298444ba00719607e8ba8
115,978,533,234,173,350,000,000,000,000,000,000,000
22
Bug 701292: Fix test for missing/empty string.
static int __sleep_on_page_lock(void *word) { io_schedule(); return 0; }
0
[ "CWE-193" ]
linux-2.6
94ad374a0751f40d25e22e036c37f7263569d24c
244,827,305,745,187,800,000,000,000,000,000,000,000
5
Fix off-by-one error in iov_iter_advance() The iov_iter_advance() function would look at the iov->iov_len entry even though it might have iterated over the whole array, and iov was pointing past the end. This would cause DEBUG_PAGEALLOC to trigger a kernel page fault if the allocation was at the end of a page, and th...
explicit DenseTensorColumn(const Tensor& tensor) : tensor_(tensor) {}
0
[ "CWE-843" ]
tensorflow
b1cc5e5a50e7cee09f2c6eb48eb40ee9c4125025
46,850,967,670,492,550,000,000,000,000,000,000,000
1
Fix `tf.raw_ops.SparseCross` failing CHECK. PiperOrigin-RevId: 368701671 Change-Id: Id805729dd9ba0bda36e4bb309408129b55fb649d
static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev) { struct packet_type *ptype; struct sk_buff *skb2 = NULL; struct packet_type *pt_prev = NULL; rcu_read_lock(); list_for_each_entry_rcu(ptype, &ptype_all, list) { /* Never send packets back to the socket * they originated from - MvS ...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
163,505,501,084,993,330,000,000,000,000,000,000,000
48
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static bool pp_suppress_error(errflags severity) { /* * If we're in a dead branch of IF or something like it, ignore the error. * However, because %else etc are evaluated in the state context * of the previous branch, errors might get lost: * %if 0 ... %else trailing garbage ... %endif * ...
0
[]
nasm
6299a3114ce0f3acd55d07de201a8ca2f0a83059
263,662,328,374,045,550,000,000,000,000,000,000,000
17
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...
static inline int may_lookup(struct nameidata *nd) { if (nd->flags & LOOKUP_RCU) { int err = inode_permission(nd->inode, MAY_EXEC|MAY_NOT_BLOCK); if (err != -ECHILD) return err; if (unlazy_walk(nd, NULL, 0)) return -ECHILD; } return inode_permission(nd->inode, MAY_EXEC); }
0
[ "CWE-284" ]
linux
9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca
319,289,102,388,759,550,000,000,000,000,000,000,000
11
vfs: rename: check backing inode being equal If a file is renamed to a hardlink of itself POSIX specifies that rename(2) should do nothing and return success. This condition is checked in vfs_rename(). However it won't detect hard links on overlayfs where these are given separate inodes on the overlayfs layer. Over...
line_vertical(PG_FUNCTION_ARGS) { LINE *line = PG_GETARG_LINE_P(0); PG_RETURN_BOOL(FPzero(line->B)); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
235,943,036,806,074,260,000,000,000,000,000,000,000
6
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
striter_setstate(striterobject *it, PyObject *state) { Py_ssize_t index = PyLong_AsSsize_t(state); if (index == -1 && PyErr_Occurred()) return NULL; if (it->it_seq != NULL) { if (index < 0) index = 0; else if (index > PyBytes_GET_SIZE(it->it_seq)) index = PyBy...
0
[ "CWE-190" ]
cpython
6c004b40f9d51872d848981ef1a18bb08c2dfc42
192,709,038,597,119,670,000,000,000,000,000,000,000
14
bpo-30657: Fix CVE-2017-1000158 (#4758) Fixes possible integer overflow in PyBytes_DecodeEscape. Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>
STATIC int choose_array_element_by_weight(const uint64_t *entries, int n_entries) { int i; uint64_t rand_val; uint64_t total = 0; for (i = 0; i < n_entries; ++i) total += entries[i]; if (n_entries < 1) return -1; if (total == 0) return crypto_rand_int(n_entries); tor_assert(total < INT64_M...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
177,732,495,408,976,370,000,000,000,000,000,000,000
22
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
static uint16_t nvme_check_zone_write(NvmeNamespace *ns, NvmeZone *zone, uint64_t slba, uint32_t nlb) { uint64_t zcap = nvme_zone_wr_boundary(zone); uint16_t status; status = nvme_check_zone_state_for_write(zone); if (status) { return status; } if ...
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
254,858,278,268,012,580,000,000,000,000,000,000,000
23
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
cmd_spec_regex_type (const char *com, const char *val, void *place_ignored _GL_UNUSED) { static const struct decode_item choices[] = { { "posix", regex_type_posix }, #if defined HAVE_LIBPCRE || defined HAVE_LIBPCRE2 { "pcre", regex_type_pcre }, #endif }; int regex_type = regex_type_posix; int ok = deco...
0
[ "CWE-200" ]
wget
c125d24762962d91050d925fbbd9e6f30b2302f8
222,989,625,119,382,100,000,000,000,000,000,000,000
15
Don't use extended attributes (--xattr) by default * src/init.c (defaults): Set enable_xattr to false by default * src/main.c (print_help): Reverse option logic of --xattr * doc/wget.texi: Add description for --xattr Users may not be aware that the origin URL and Referer are saved including credentials, and possibly ...
static int mpls_forward(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) { struct net *net = dev_net(dev); struct mpls_shim_hdr *hdr; struct mpls_route *rt; struct mpls_nh *nh; struct mpls_entry_decoded dec; struct net_device *out_dev; struct mpls_dev *out_mdev...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
306,995,823,986,803,300,000,000,000,000,000,000,000
135
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 double mp_get(_cimg_math_parser& mp) { const double *ptrs = &_mp_arg(2) + 1; double *ptrd = &_mp_arg(1); const unsigned int sizs = (unsigned int)mp.opcode[3], sizd = (unsigned int)mp.opcode[4]; const bool to_string = (bool)mp.opcode[5]; CImg<charT...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
125,679,126,807,143,130,000,000,000,000,000,000,000
14
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
set_job_control (arg) int arg; { int old; old = job_control; job_control = arg; if (terminal_pgrp == NO_PID) terminal_pgrp = tcgetpgrp (shell_tty); running_in_background = (terminal_pgrp != shell_pgrp); #if 0 if (interactive_shell == 0 && running_in_background == 0 && job_control != old) ...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
160,017,754,671,974,120,000,000,000,000,000,000,000
30
bash-4.4-rc2 release
static ssize_t features_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { return snprintf(buf, PAGE_SIZE, "nsdelegate\n" "memory_localevents\n" "memory_recursiveprot\n"); }
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
191,073,915,286,904,260,000,000,000,000,000,000,000
8
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
static int bnx2x_enable_ptp_packets(struct bnx2x *bp) { struct bnx2x_queue_state_params q_params; int rc, i; /* send queue update ramrod to enable PTP packets */ memset(&q_params, 0, sizeof(q_params)); __set_bit(RAMROD_COMP_WAIT, &q_params.ramrod_flags); q_params.cmd = BNX2X_Q_CMD_UPDATE; __set_bit(BNX2X_Q_UPDA...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
194,709,180,916,674,300,000,000,000,000,000,000,000
31
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...
freeArgv(char *blob, char **argv) { if (blob) { free(blob); if (argv) { int n; for (n = 0; argv[n]; ++n) free(argv[n]); free(argv); } } }
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
154,016,740,123,990,880,000,000,000,000,000,000,000
12
snapshot of project "xterm", label xterm-365d
static int nf_tables_newrule(struct sk_buff *skb, const struct nfnl_info *info, const struct nlattr * const nla[]) { struct nftables_pernet *nft_net = nft_pernet(info->net); struct netlink_ext_ack *extack = info->extack; unsigned int size, i, n, ulen = 0, usize = 0; u8 genmask = nft_genmask_next(info->net);...
0
[ "CWE-400", "CWE-703" ]
linux
e02f0d3970404bfea385b6edb86f2d936db0ea2b
245,585,104,744,959,420,000,000,000,000,000,000,000
227
netfilter: nf_tables: disallow binding to already bound chain Update nft_data_init() to report EINVAL if chain is already bound. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Reported-by: Gwangun Jung <exsociety@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
bool __fastcall TExternalConsole::Interactive() { return FInteractive; }
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
267,698,870,622,077,630,000,000,000,000,000,000,000
4
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
void fx_DataView_prototype_setFloat64(txMachine* the) { fx_DataView_prototype_set(the, 8, fxNumberCoerce, fxFloat64Setter); }
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
326,500,042,694,191,100,000,000,000,000,000,000,000
4
XS: #896
res1 = cimg::eval("cos(x)^2 + sin(y)^2",2,2), // will return '1' res2 = cimg::eval(0,1,1); // will return '1' too \endcode **/
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
211,396,702,870,030,960,000,000,000,000,000,000,000
4
.
static struct tc_action *create_a(int i) { struct tc_action *act; act = kmalloc(sizeof(*act), GFP_KERNEL); if (act == NULL) { printk("create_a: failed to alloc!\n"); return NULL; } memset(act, 0, sizeof(*act)); act->order = i; return act; }
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
130,840,314,106,889,730,000,000,000,000,000,000,000
13
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') ...
1
[ "CWE-19" ]
ntp
fe46889f7baa75fc8e6c0fcde87706d396ce1461
13,417,463,089,094,966,000,000,000,000,000,000,000
37
[Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn.
addRuleName(FileInfo *nested, CharsString *name, TranslationTableOffset *newRuleOffset, RuleName **ruleNames, TranslationTableHeader *table) { int k; struct RuleName *nameRule; if (!(nameRule = malloc(sizeof(*nameRule) + CHARSIZE * (name->length - 1)))) { compileError(nested, "not enough memory"); _lou_outOfMe...
0
[ "CWE-787" ]
liblouis
fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde
126,036,450,044,184,880,000,000,000,000,000,000,000
24
Fix yet another buffer overflow in the braille table parser Reported by Henri Salo Fixes #592
xfs_attr3_leaf_rebalance( struct xfs_da_state *state, struct xfs_da_state_blk *blk1, struct xfs_da_state_blk *blk2) { struct xfs_da_args *args; struct xfs_attr_leafblock *leaf1; struct xfs_attr_leafblock *leaf2; struct xfs_attr3_icleaf_hdr ichdr1; struct xfs_attr3_icleaf_hdr ichdr2; struct xfs_attr_leaf_entry ...
0
[ "CWE-241", "CWE-19" ]
linux
8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
120,083,936,616,187,670,000,000,000,000,000,000,000
188
xfs: remote attribute overwrite causes transaction overrun Commit e461fcb ("xfs: remote attribute lookups require the value length") passes the remote attribute length in the xfs_da_args structure on lookup so that CRC calculations and validity checking can be performed correctly by related code. This, unfortunately h...
void kvm_coalesced_mmio_free(struct kvm *kvm) { if (kvm->coalesced_mmio_ring) free_page((unsigned long)kvm->coalesced_mmio_ring); }
0
[ "CWE-787" ]
kvm
b60fe990c6b07ef6d4df67bc0530c7c90a62623a
215,880,340,996,615,300,000,000,000,000,000,000,000
5
KVM: coalesced_mmio: add bounds checking The first/last indexes are typically shared with a user app. The app can change the 'last' index that the kernel uses to store the next result. This change sanity checks the index before using it for writing to a potentially arbitrary address. This fixes CVE-2019-14821. Cc: ...
int wc_RsaEncryptSize(RsaKey* key) { int ret; if (key == NULL) { return BAD_FUNC_ARG; } ret = mp_unsigned_bin_size(&key->n); #ifdef WOLF_CRYPTO_CB if (ret == 0 && key->devId != INVALID_DEVID) { ret = 2048/8; /* hardware handles, use 2048-bit as default */ } #endif return ...
0
[ "CWE-310", "CWE-787" ]
wolfssl
fb2288c46dd4c864b78f00a47a364b96a09a5c0f
153,096,223,135,001,560,000,000,000,000,000,000,000
18
RSA-PSS: Handle edge case with encoding message to hash When the key is small relative to the digest (1024-bit key, 64-byte hash, 61-byte salt length), the internal message to hash is larger than the output size. Allocate a buffer for the message when this happens.
static void nested_vmx_cr_fixed1_bits_update(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); struct kvm_cpuid_entry2 *entry; vmx->nested.msrs.cr0_fixed1 = 0xffffffff; vmx->nested.msrs.cr4_fixed1 = X86_CR4_PCE; #define cr4_fixed1_update(_cr4_mask, _reg, _cpuid_mask) do { \ if (entry && (entry->_reg...
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
336,562,856,384,317,550,000,000,000,000,000,000,000
38
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
static int nb_add_number (char **ret_buffer, /* {{{ */ size_t *ret_buffer_len, uint16_t type, uint64_t value) { char *packet_ptr; size_t packet_len; uint16_t pkg_type; uint16_t pkg_length; uint64_t pkg_value; size_t offset; packet_len = sizeof (pkg_type) + sizeof (pkg_length) + sizeof (...
0
[ "CWE-119" ]
collectd
8b4fed9940e02138b7e273e56863df03d1a39ef7
127,127,350,030,299,700,000,000,000,000,000,000,000
39
network plugin, libcollectdclient: Check return value of gcry_control(). Fixes: #1665
int ConnectionImpl::onBeforeFrameReceived(const nghttp2_frame_hd* hd) { ENVOY_CONN_LOG(trace, "about to recv frame type={}, flags={}", connection_, static_cast<uint64_t>(hd->type), static_cast<uint64_t>(hd->flags)); // Track all the frames without padding here, since this is the only callback we r...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
296,801,057,138,446,350,000,000,000,000,000,000,000
15
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...
validate_commit_metadata (GVariant *commit_data, const char *ref, const char *required_metadata, gboolean require_xa_metadata, GError **error) { g_autoptr(GVariant) commit_metadata = NULL; const char *xa_me...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
197,148,920,731,959,800,000,000,000,000,000,000,000
24
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...
SymbolsCreate(xkb_atom_t keyName, VarDef *symbols) { SymbolsDef *def = malloc(sizeof(*def)); if (!def) return NULL; def->common.type = STMT_SYMBOLS; def->common.next = NULL; def->merge = MERGE_DEFAULT; def->keyName = keyName; def->symbols = symbols; return def; }
0
[ "CWE-476" ]
libxkbcommon
e3cacae7b1bfda0d839c280494f23284a1187adf
144,489,326,924,454,790,000,000,000,000,000,000,000
14
xkbcomp: fix crashes in the parser when geometry tokens appear In the XKB format, floats and various keywords can only be used in the xkb_geometry section. xkbcommon removed support xkb_geometry, but still parses it for backward compatibility. As part of ignoring it, the float AST node and various keywords were remove...
static bool mem_cgroup_under_move(struct mem_cgroup *memcg) { struct mem_cgroup *from; struct mem_cgroup *to; bool ret = false; /* * Unlike task_move routines, we access mc.to, mc.from not under * mutual exclusion by cgroup_mutex. Here, we take spinlock instead. */ spin_lock(&mc.lock); from = mc.from; to =...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
83,469,161,249,694,360,000,000,000,000,000,000,000
21
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static void red_sasl_error(void *opaque, int err) { RedSASLAuth *auth = (RedSASLAuth*) opaque; red_stream_set_async_error_handler(auth->stream, auth->saved_error_cb); if (auth->saved_error_cb) { auth->saved_error_cb(auth->result_opaque, err); } red_sasl_auth_free(auth); }
0
[]
spice
95a0cfac8a1c8eff50f05e65df945da3bb501fc9
308,896,530,158,238,340,000,000,000,000,000,000,000
9
With OpenSSL 1.0.2 and earlier: disable client-side renegotiation. Fixed issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
void WebContents::SetUserAgent(const std::string& user_agent, gin_helper::Arguments* args) { web_contents()->SetUserAgentOverride( blink::UserAgentOverride::UserAgentOnly(user_agent), false); }
0
[ "CWE-284", "CWE-693" ]
electron
18613925610ba319da7f497b6deed85ad712c59b
230,191,049,634,439,700,000,000,000,000,000,000,000
5
refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL * spec: add test for x-site _top navigation * chore: old cod...
Status V2UserDocumentParser::checkValidUserDocument(const BSONObj& doc) const { BSONElement userElement = doc[AuthorizationManager::USER_NAME_FIELD_NAME]; BSONElement userDBElement = doc[AuthorizationManager::USER_DB_FIELD_NAME]; BSONElement credentialsElement = doc[CREDENTIALS_FIELD_NAME]; BSONElement ...
1
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
124,961,908,175,795,970,000,000,000,000,000,000,000
86
SERVER-38984 Validate unique User ID on UserCache hit
static inline void update_halt_poll_stats(struct kvm_vcpu *vcpu, ktime_t start, ktime_t end, bool success) { struct kvm_vcpu_stat_generic *stats = &vcpu->stat.generic; u64 poll_ns = ktime_to_ns(ktime_sub(end, start)); ++vcpu->stat.generic.halt_attempted_poll; if (success) { ++vcpu->stat.generic.halt_suc...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
161,273,644,645,970,040,000,000,000,000,000,000,000
21
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
TEST_P(ProtocolIntegrationTest, HeadersWithUnderscoresDropped) { config_helper_.addConfigModifier( [&](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& hcm) -> void { hcm.mutable_common_http_protocol_options()->set_headers_with_underscores_action( ...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
144,309,375,747,673,660,000,000,000,000,000,000,000
41
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
storageVolLookupByPath(virConnectPtr conn, const char *path) { virStoragePoolObj *obj; virStoragePoolDef *def; struct storageVolLookupData data = { .path = path, .voldef = NULL }; virStorageVolPtr vol = NULL; if (!(data.cleanpath = virFileSanitizePath(path))) ...
0
[]
libvirt
447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87
312,193,428,834,449,400,000,000,000,000,000,000,000
39
storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath 'virStoragePoolObjListSearch' returns a locked and refed object, thus we must release it on ACL permission failure. Fixes: 7aa0e8c0cb8 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318 Signed-off-by: Peter Krempa <pkrempa@redhat.co...
COMPS_HSList* comps_rtree_pairs(COMPS_RTree * rt) { return __comps_rtree_all(rt, 2); }
0
[ "CWE-416", "CWE-862" ]
libcomps
e3a5d056633677959ad924a51758876d415e7046
16,030,418,079,480,327,000,000,000,000,000,000,000
3
Fix UAF in comps_objmrtree_unite function The added field is not used at all in many places and it is probably the left-over of some copy-paste.
void HttpConnectionManagerImplTest::setupFilterChain(int num_decoder_filters, int num_encoder_filters, int num_requests) { // NOTE: The length/repetition in this routine allows InSequence to work correctly in an outer // scope. for (int i = 0; i < num_decoder_f...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
288,660,351,285,595,420,000,000,000,000,000,000,000
40
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int slab_mem_going_online_callback(void *arg) { struct kmem_cache_node *n; struct kmem_cache *s; struct memory_notify *marg = arg; int nid = marg->status_change_nid; int ret = 0; /* * If the node's memory is already available, then kmem_cache_node is * already created. Nothing to do. */ if (nid < 0...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
157,853,781,139,399,860,000,000,000,000,000,000,000
39
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static int mwifiex_process_int_status(struct mwifiex_adapter *adapter) { int ret; u32 pcie_ireg = 0; unsigned long flags; struct pcie_service_card *card = adapter->card; spin_lock_irqsave(&adapter->int_lock, flags); if (!card->msi_enable) { /* Clear out unused interrupts */ pcie_ireg = adapter->int_status; ...
0
[ "CWE-400", "CWE-200", "CWE-401" ]
linux
d10dcb615c8e29d403a24d35f8310a7a53e3050c
161,848,681,977,760,520,000,000,000,000,000,000
81
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release for skb and card->evtbd_ring_vbase is added. Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines...
u8 iwl_prep_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx, const u8 *addr, bool is_ap, struct ieee80211_sta *sta) { struct iwl_station_entry *station; int i; u8 sta_id = IWL_INVALID_STATION; if (is_ap) sta_id = ctx->ap_sta_id; else if (is_broadcast_ether_addr(addr)) sta_id = ctx->bcast_sta...
0
[ "CWE-119", "CWE-787" ]
linux
2da424b0773cea3db47e1e81db71eeebde8269d4
8,690,497,884,053,907,000,000,000,000,000,000,000
81
iwlwifi: Sanity check for sta_id On my testing, I saw some strange behavior [ 421.739708] iwlwifi 0000:01:00.0: ACTIVATE a non DRIVER active station id 148 addr 00:00:00:00:00:00 [ 421.739719] iwlwifi 0000:01:00.0: iwl_sta_ucode_activate Added STA id 148 addr 00:00:00:00:00:00 to uCode not sure how it happen, but ...
static char *SFDParseMMSubroutine(FILE *sfd) { char buffer[400], *sofar=calloc(1,1); const char *endtok = "EndMMSubroutine"; int len = 0, blen, first=true; while ( fgets(buffer,sizeof(buffer),sfd)!=NULL ) { if ( strncmp(buffer,endtok,strlen(endtok))==0 ) break; if ( first ) { first = false; ...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
63,721,430,283,131,560,000,000,000,000,000,000,000
22
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
int Http2Handler::submit_non_final_response(const std::string &status, int32_t stream_id) { auto nva = make_array(http2::make_nv_ls(":status", status)); return nghttp2_submit_headers(session_, NGHTTP2_FLAG_NONE, stream_id, nullptr, nva.data...
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
117,137,524,551,550,520,000,000,000,000,000,000,000
6
Don't read too greedily
parseExtNeg(SOPClassExtendedNegotiationSubItem* extNeg, unsigned char *buf, unsigned long *length, unsigned long availData) { unsigned char *bufStart = buf; // An extended negotiation item has to be at least 6 bytes large if (availData < 6) return makeLengthError("extended negotiation",...
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
325,173,075,583,697,900,000,000,000,000,000,000,000
58
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
static int cache_space_refresh(Server *s, JournalStorage *storage) { JournalStorageSpace *space; JournalMetrics *metrics; uint64_t vfs_used, vfs_avail, avail; usec_t ts; int r; assert(s); metrics = &storage->metrics; space = &storage->space; ts ...
0
[ "CWE-770" ]
systemd
084eeb865ca63887098e0945fb4e93c852b91b0f
34,434,482,250,931,662,000,000,000,000,000,000,000
31
journald: do not store the iovec entry for process commandline on stack This fixes a crash where we would read the commandline, whose length is under control of the sending program, and then crash when trying to create a stack allocation for it. CVE-2018-16864 https://bugzilla.redhat.com/show_bug.cgi?id=1653855 The ...
cmml_type_find (GstTypeFind * tf, gpointer private) { /* Header is 12 bytes minimum (though we don't check the minor version */ const guint8 *data = gst_type_find_peek (tf, 0, 12); if (data) { /* 8 byte string "CMML\0\0\0\0" for the magic number */ if (memcmp (data, "CMML\0\0\0\0", 8) != 0) return...
0
[ "CWE-125" ]
gst-plugins-base
2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095
232,865,816,065,067,780,000,000,000,000,000,000,000
19
typefind: bounds check windows ico detection Fixes out of bounds read https://bugzilla.gnome.org/show_bug.cgi?id=774902
int cfg80211_mgd_wext_giwap(struct net_device *dev, struct iw_request_info *info, struct sockaddr *ap_addr, char *extra) { struct wireless_dev *wdev = dev->ieee80211_ptr; /* call only for station! */ if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION)) return -EINVAL; ap_addr->sa_family = ARPHRD_E...
0
[ "CWE-120" ]
linux
4ac2813cc867ae563a1ba5a9414bfb554e5796fa
119,377,623,401,275,460,000,000,000,000,000,000,000
21
cfg80211: wext: avoid copying malformed SSIDs Ensure the SSID element is bounds-checked prior to invoking memcpy() with its length field, when copying to userspace. Cc: <stable@vger.kernel.org> Cc: Kees Cook <keescook@chromium.org> Reported-by: Nicolas Waisman <nico@semmle.com> Signed-off-by: Will Deacon <will@kernel...
static int mov_write_st3d_tag(AVIOContext *pb, AVStereo3D *stereo_3d) { int8_t stereo_mode; if (stereo_3d->flags != 0) { av_log(pb, AV_LOG_WARNING, "Unsupported stereo_3d flags %x. st3d not written.\n", stereo_3d->flags); return 0; } switch (stereo_3d->type) { case AV_STEREO3D_2D: ...
0
[ "CWE-125" ]
FFmpeg
95556e27e2c1d56d9e18f5db34d6f756f3011148
116,848,713,914,816,370,000,000,000,000,000,000,000
29
avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample Fixes: out of array read Fixes: ffmpeg_crash_8.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
EFI_STATUS verify_image(void *data, unsigned int datasize, EFI_LOADED_IMAGE *li, PE_COFF_LOADER_IMAGE_CONTEXT *context) { EFI_STATUS efi_status; UINT8 sha1hash[SHA1_DIGEST_SIZE]; UINT8 sha256hash[SHA256_DIGEST_SIZE]; /* * The binary header contains relevant context and section pointers */ efi_status = r...
1
[ "CWE-787" ]
shim
159151b6649008793d6204a34d7b9c41221fb4b0
213,147,111,462,734,700,000,000,000,000,000,000,000
53
Also avoid CVE-2022-28737 in verify_image() PR 446 ("Add verify_image") duplicates some of the code affected by Chris Coulson's defense in depth patch against CVE-2022-28737 ("pe: Perform image verification earlier when loading grub"). This patch makes the same change to the new function. Signed-off-by: Peter Jones ...
void CLASS panasonic_load_raw() { int row, col, i, j, sh=0, pred[2], nonz[2]; pana_bits(0); for (row=0; row < height; row++) { #ifdef LIBRAW_LIBRARY_BUILD checkCancel(); #endif for (col=0; col < raw_width; col++) { if ((i = col % 14) == 0) pred[0] = pred[1] = nonz[0] = nonz[1] = 0; if (i %...
0
[]
LibRaw
9ae25d8c3a6bfb40c582538193264f74c9b93bc0
39,105,982,764,603,643,000,000,000,000,000,000,000
26
backported 0.15.4 datachecks
void gf_sg_set_private(GF_SceneGraph *sg, void *ptr) { if (sg) sg->userpriv = ptr; }
0
[ "CWE-416" ]
gpac
9723dd0955894f2cb7be13b94cf7a47f2754b893
159,994,117,695,405,830,000,000,000,000,000,000,000
4
fixed #2109
FileIo::Impl::Impl(const std::wstring& wpath) : wpath_(wpath), wpMode_(wpUnicode), fp_(0), opMode_(opSeek), #if defined WIN32 && !defined __CYGWIN__ hFile_(0), hMap_(0), #endif pMappedArea_(0), mappedLength_(0), isMalloced_(false), isWriteable_(false) { }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
74,486,428,533,400,520,000,000,000,000,000,000,000
10
Fix https://github.com/Exiv2/exiv2/issues/55
STBIDEF const char *stbi_failure_reason(void) { return stbi__g_failure_reason; }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
315,429,909,189,492,180,000,000,000,000,000,000,000
4
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
u8 llc_data_accept_state(u8 state) { return state != LLC_CONN_STATE_NORMAL && state != LLC_CONN_STATE_BUSY && state != LLC_CONN_STATE_REJ; }
0
[ "CWE-20", "CWE-401" ]
linux
8b74d439e1697110c5e5c600643e823eb1dd0762
21,317,439,188,716,500,000,000,000,000,000,000,000
5
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...
BPF_CALL_4(bpf_skb_adjust_room, struct sk_buff *, skb, s32, len_diff, u32, mode, u64, flags) { if (unlikely(flags)) return -EINVAL; if (likely(mode == BPF_ADJ_ROOM_NET)) return bpf_skb_adjust_net(skb, len_diff); return -ENOTSUPP; }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
268,779,581,917,046,740,000,000,000,000,000,000,000
10
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
check_SET_TUNNEL(const struct ofpact_tunnel *a OVS_UNUSED, const struct ofpact_check_params *cp OVS_UNUSED) { return 0; }
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
297,302,155,823,057,400,000,000,000,000,000,000,000
5
ofp-actions: Fix use-after-free while decoding RAW_ENCAP. While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate ofpbuf if there is no enough space left. However, function 'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap' structure leading to write-after-free and incorrect decoding. ==3...
static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *str = &EX_T(opline->result.u.var).tmp_var; zval *var = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); zval var_copy; int use_copy = 0; if (IS_TMP_VAR ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
8,394,747,472,461,579,000,000,000,000,000,000,000
40
- 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
int main(int argc, char* argv[]) { if (argc != 4) { std::cerr << "Usage: rc4 hex-key infile outfile" << std::endl; exit(2); } char* hexkey = argv[1]; char* infilename = argv[2]; char* outfilename = argv[3]; unsigned int hexkeylen = QIntC::to_uint(strlen(hexkey)); unsigned int keylen =...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
31,931,642,410,118,836,000,000,000,000,000,000,000
56
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
//! Load image from an ANALYZE7.5/NIFTI file \newinstance. static CImg<T> get_load_analyze(const char *const filename, float *const voxel_size=0) { return CImg<T>().load_analyze(filename,voxel_size);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
108,636,061,813,139,900,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static inline void cirrus_bitblt_bgcol(CirrusVGAState *s) { unsigned int color; switch (s->cirrus_blt_pixelwidth) { case 1: s->cirrus_blt_bgcol = s->cirrus_shadow_gr0; break; case 2: color = s->cirrus_shadow_gr0 | (s->gr[0x10] << 8); s->cirrus_blt_bgcol = le16_to_cpu(colo...
0
[ "CWE-787" ]
qemu
b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef
209,924,585,110,214,440,000,000,000,000,000,000,000
23
CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow I have just noticed that patch for CVE-2007-1320 has never been applied to the QEMU CVS. Please find it below. | Multiple heap-based buffer overflows in the cirrus_invalidate_region | function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and | possib...
static int cbs_jpeg_assemble_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag) { const CodedBitstreamUnit *unit; uint8_t *data; size_t size, dp, sp; int i; size = 4; // SOI + EOI. for (i = 0; i < frag->nb_units; i++) { unit = &frag...
0
[ "CWE-787" ]
FFmpeg
1812352d767ccf5431aa440123e2e260a4db2726
261,686,342,601,620,650,000,000,000,000,000,000,000
67
avcodec/cbs_jpeg: Check length for SOS Fixes: out of array access Fixes: 19734/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5673507031875584 Fixes: 19353/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5703944462663680 Found-by: continuous fuzzing process https://github.com/google/oss...
int unregister_md_cluster_operations(void) { spin_lock(&pers_lock); md_cluster_ops = NULL; spin_unlock(&pers_lock); return 0; }
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
754,834,867,320,265,400,000,000,000,000,000,000
7
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
free_config_unpeers( config_tree *ptree ) { unpeer_node *curr_unpeer; if (ptree->unpeers != NULL) { while (1) { UNLINK_FIFO(curr_unpeer, *ptree->unpeers, link); if (NULL == curr_unpeer) break; destroy_address_node(curr_unpeer->addr); free(curr_unpeer); } free(ptree->unpeers); } }
0
[ "CWE-20" ]
ntp
52e977d79a0c4ace997e5c74af429844da2f27be
163,603,756,004,563,500,000,000,000,000,000,000,000
17
[Bug 1773] openssl not detected during ./configure. [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
ip_unset_global_var(self, varname) VALUE self; VALUE varname; { return ip_unset_variable(self, varname, INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG)); }
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
309,149,117,160,719,300,000,000,000,000,000,000,000
7
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
template<typename T> inline CImg<_cimg_Tfloat> sqrt(const CImg<T>& instance) { return instance.get_sqrt();
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
302,592,710,410,025,700,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static int nobody_responds_to_arp(uint32_t nip, const uint8_t *safe_mac, unsigned arpping_ms) { struct in_addr temp; int r; r = arpping(nip, safe_mac, server_config.server_nip, server_config.server_mac, server_config.interface, arpping_ms); if (r) return r; temp.s_addr = nip; bb_error_msg("%s belo...
0
[ "CWE-125" ]
busybox
6d3b4bb24da9a07c263f3c1acf8df85382ff562c
71,918,149,131,845,580,000,000,000,000,000,000,000
19
udhcpc: check that 4-byte options are indeed 4-byte, closes 11506 function old new delta udhcp_get_option32 - 27 +27 udhcp_get_option 231 248 +17 ----------------------------------...
g_getpid(void) { #if defined(_WIN32) return (int)GetCurrentProcessId(); #else return (int)getpid(); #endif }
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
253,577,873,862,370,500,000,000,000,000,000,000,000
8
move temp files from /tmp to /tmp/.xrdp
static void llsec_dev_free_rcu(struct rcu_head *rcu) { llsec_dev_free(container_of(rcu, struct mac802154_llsec_device, rcu)); }
0
[ "CWE-416" ]
linux
1165affd484889d4986cf3b724318935a0b120d8
161,254,359,650,478,100,000,000,000,000,000,000,000
4
net: mac802154: Fix general protection fault syzbot found general protection fault in crypto_destroy_tfm()[1]. It was caused by wrong clean up loop in llsec_key_alloc(). If one of the tfm array members is in IS_ERR() range it will cause general protection fault in clean up function [1]. Call Trace: crypto_free_aead ...
bgp_open_receive (struct peer *peer, bgp_size_t size) { int ret; u_char version; u_char optlen; u_int16_t holdtime; u_int16_t send_holdtime; as_t remote_as; as_t as4 = 0; struct peer *realpeer; struct in_addr remote_id; int capability; u_int8_t notify_data_remote_as[2]; u_int8_t notify_data_remo...
0
[ "CWE-119" ]
quagga
5861739f8c38bc36ea9955e5cb2be2bf2f482d70
73,441,280,017,440,340,000,000,000,000,000,000,000
353
bgpd: Open option parse errors don't NOTIFY, resulting in abort & DoS * bgp_packet.c: (bgp_open_receive) Errors from bgp_open_option_parse are detected, and the code will stop processing the OPEN and return. However it does so without calling bgp_notify_send to send a NOTIFY - which means the peer FSM doesn't g...
is_needy (NautilusFile *file, FileCheck check_missing, RequestType request_type_wanted) { NautilusDirectory *directory; GList *node; ReadyCallback *callback; Monitor *monitor; if (!(* check_missing) (file)) { return FALSE; } directory = file->details->directory; if (directory->details->call_when_ready...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
183,410,528,984,276,100,000,000,000,000,000,000,000
44
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static void cmdloop(void) { int c, r = 0, mode; static struct buf cmd, arg1, arg2, arg3, arg4; char *p, *result, buf[1024]; const char *err; uint32_t uid, last; struct backend *be; char curgroup[MAX_MAILBOX_BUFFER] = ""; allowanonymous = config_getswitch(IMAPOPT_ALLOWANONYMOUSLOGIN); ...
0
[ "CWE-287" ]
cyrus-imapd
77903669e04c9788460561dd0560b9c916519594
240,514,901,930,872,700,000,000,000,000,000,000,000
735
Secunia SA46093 - make sure nntp authentication completes Discovered by Stefan Cornelius, Secunia Research The vulnerability is caused due to the access restriction for certain commands only checking whether or not variable "nntp_userid" is non-NULL, without performing additional checks to verify that a complete, suc...
void DcmSCP::setConnectionBlockingMode(const DUL_BLOCKOPTIONS blockingMode) { m_cfg->setConnectionBlockingMode(blockingMode); }
0
[ "CWE-264" ]
dcmtk
beaf5a5c24101daeeafa48c375120b16197c9e95
238,167,662,971,085,200,000,000,000,000,000,000,000
4
Make sure to handle setuid() return code properly. In some tools the return value of setuid() is not checked. In the worst case this could lead to privilege escalation since the process does not give up its root privileges and continue as root.
store_tabletJitterDelay(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct aiptek *aiptek = dev_get_drvdata(dev); int err, j; err = kstrtoint(buf, 10, &j); if (err) return err; aiptek->newSetting.jitterDelay = j; return count; }
0
[ "CWE-476", "CWE-401" ]
linux
8e20cf2bce122ce9262d6034ee5d5b76fbb92f96
321,171,079,831,034,760,000,000,000,000,000,000,000
12
Input: aiptek - fix crash on detecting device without endpoints The aiptek driver crashes in aiptek_probe() when a specially crafted USB device without endpoints is detected. This fix adds a check that the device has proper configuration expected by the driver. Also an error return value is changed to more matching on...
static bool svm_can_emulate_instruction(struct kvm_vcpu *vcpu, void *insn, int insn_len) { bool smep, smap, is_user; unsigned long cr4; /* * When the guest is an SEV-ES guest, emulation is not possible. */ if (sev_es_guest(vcpu->kvm)) return false; /* * Detect and workaround Errata 1096 Fam_17h_00_0Fh. ...
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
1,797,796,618,063,252,000,000,000,000,000,000,000
75
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
static void swoole_serialize_object(seriaString *buffer, zval *obj, size_t start) { zend_string *name = Z_OBJCE_P(obj)->name; if (GC_IS_RECURSIVE(Z_OBJPROP_P(obj))) { zend_throw_exception_ex(NULL, 0, "the object %s has cycle ref.", name->val); return; } if (name->len > 0xffff) {/...
0
[ "CWE-200", "CWE-502" ]
swoole-src
4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76
181,765,028,503,052,040,000,000,000,000,000,000,000
105
add buffer end check
void AuthorizationManager::addAuthorizedPrincipal(Principal* principal) { // Log out any already-logged-in user on the same database as "principal". logoutDatabase(principal->getName().getDB().toString()); // See SERVER-8144. _authenticatedPrincipals.add(principal); if (!principal...
1
[ "CWE-264" ]
mongo
23344f8b7506df694f66999693ee3c00dfd6afae
194,749,630,779,630,980,000,000,000,000,000,000,000
14
SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user. Uncorrected, this can cause replica set heartbeats to stall behind operations that hold the read lock for a long time.
static int phar_set_compression(zval *zv, void *argument) /* {{{ */ { phar_entry_info *entry = (phar_entry_info *)Z_PTR_P(zv); uint32_t compress = *(uint32_t *)argument; if (entry->is_deleted) { return ZEND_HASH_APPLY_KEEP; } entry->old_flags = entry->flags; entry->flags &= ~PHAR_ENT_COMPRESSION_MASK; entry-...
0
[ "CWE-281" ]
php-src
e5c95234d87fcb8f6b7569a96a89d1e1544749a6
253,982,354,999,771,250,000,000,000,000,000,000,000
15
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
TEST_F(OwnedImplTest, ReserveCommit) { // This fragment will later be added to the buffer. It is declared in an enclosing scope to // ensure it is not destructed until after the buffer is. const std::string input = "Hello, world"; BufferFragmentImpl fragment(input.c_str(), input.size(), nullptr); { Buffe...
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
253,961,074,290,535,900,000,000,000,000,000,000,000
76
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
xfs_attr3_leaf_figure_balance( struct xfs_da_state *state, struct xfs_da_state_blk *blk1, struct xfs_attr3_icleaf_hdr *ichdr1, struct xfs_da_state_blk *blk2, struct xfs_attr3_icleaf_hdr *ichdr2, int *countarg, int *usedbytesarg) { struct xfs_attr_leafblock *leaf1 = blk1->bp->b_addr; struct xfs_attr_le...
0
[ "CWE-241", "CWE-19" ]
linux
8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
266,186,460,136,381,570,000,000,000,000,000,000,000
91
xfs: remote attribute overwrite causes transaction overrun Commit e461fcb ("xfs: remote attribute lookups require the value length") passes the remote attribute length in the xfs_da_args structure on lookup so that CRC calculations and validity checking can be performed correctly by related code. This, unfortunately h...
static void arcmsr_enable_eoi_mode(struct AdapterControlBlock *acb) { switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A: return; case ACB_ADAPTER_TYPE_B: { struct MessageUnit_B *reg = acb->pmuB; writel(ARCMSR_MESSAGE_ACTIVE_EOI_MODE, reg->drv2iop_doorbell); if (!arcmsr_hbaB_wait_msgint_ready(acb)) { ...
0
[ "CWE-119", "CWE-787" ]
linux
7bc2b55a5c030685b399bb65b6baa9ccc3d1f167
219,877,496,590,425,370,000,000,000,000,000,000,000
20
scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer() We need to put an upper bound on "user_len" so the memcpy() doesn't overflow. Cc: <stable@vger.kernel.org> Reported-by: Marco Grassi <marco.gra@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Sig...
LOCAL int get_ext_type(int raw_ext_type) { return 7 + raw_ext_type; }
0
[]
libmaxminddb
51255f113fe3c7b63ffe957636a7656a3ff9d1ff
42,124,055,511,375,113,000,000,000,000,000,000,000
4
Fix several segfaults from missing bounds checks These were found using afl-fuzz. There are several more similar failure that warrant investigation. If we want to add tests, I have several corrupt databases we could add, but these are trivially reproducible when using the existing test databases as input to afl-fuzz.
bool plugin_dl_foreach(THD *thd, const LEX_STRING *dl, plugin_foreach_func *func, void *arg) { bool err= 0; if (dl) { mysql_mutex_lock(&LOCK_plugin); st_plugin_dl *plugin_dl= plugin_dl_add(dl, REPORT_TO_USER); mysql_mutex_unlock(&LOCK_plugin); if (!plugin_dl) return ...
0
[ "CWE-416" ]
server
c05fd700970ad45735caed3a6f9930d4ce19a3bd
216,675,832,627,122,970,000,000,000,000,000,000,000
31
MDEV-26323 use-after-poison issue of MariaDB server
int _gnutls_negotiate_version( gnutls_session_t session, gnutls_protocol_t adv_version) { int ret; /* if we do not support that version */ if (_gnutls_version_is_supported (session, adv_version) == 0) { /* If he requested something we do not support * then we send him the highest we support. ...
0
[ "CWE-189" ]
gnutls
bc8102405fda11ea00ca3b42acc4f4bce9d6e97b
116,595,270,789,361,850,000,000,000,000,000,000,000
28
Fix GNUTLS-SA-2008-1 security vulnerabilities. See http://www.gnu.org/software/gnutls/security.html for updates.
GF_Err ftab_box_read(GF_Box *s, GF_BitStream *bs) { u32 i; GF_FontTableBox *ptr = (GF_FontTableBox *)s; ptr->entry_count = gf_bs_read_u16(bs); ISOM_DECREASE_SIZE(ptr, 2); if (ptr->size<ptr->entry_count*3) { GF_LOG(GF_LOG_WARNING, GF_LOG_CONTAINER, ("[iso file] Corrupted ftap box, skipping\n")); ptr->entry_cou...
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
317,370,857,628,867,940,000,000,000,000,000,000,000
31
fixed #1768
get_tree_tail_literal(Node* node, Node** rnode, regex_t* reg) { int r; switch (NODE_TYPE(node)) { case NODE_LIST: if (IS_NULL(NODE_CDR(node))) { r = get_tree_tail_literal(NODE_CAR(node), rnode, reg); } else { r = get_tree_tail_literal(NODE_CDR(node), rnode, reg); if (r == GET_VALUE_...
0
[ "CWE-787" ]
oniguruma
cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0
294,484,072,574,773,500,000,000,000,000,000,000,000
97
#207: Out-of-bounds write
decode_str(const char *str, int exec_input, struct tok_state *tok) { return new_string(str, strlen(str), tok); }
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
184,977,162,134,302,400,000,000,000,000,000,000,000
4
bpo-35766: Merge typed_ast back into CPython (GH-11645)