func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
SelectionReceived(Widget w, XtPointer client_data, Atom *selection GCC_UNUSED, Atom *type, XtPointer value, unsigned long *length, int *format) { char **text_list = NULL; int text_list_count = 0; XTextProperty text_prop; TScreen *screen; Display *dpy; #if OPT_TRACE && OPT_WID...
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
1,173,116,235,880,135,200,000,000,000,000,000,000
181
snapshot of project "xterm", label xterm-365d
TEST(BitTestMatchExpression, MatchesInteger) { BSONArray bas = BSON_ARRAY(1 << 2 << 4 << 5); BSONArray bac = BSON_ARRAY(0 << 3 << 600); std::vector<uint32_t> bitPositionsSet = bsonArrayToBitPositions(bas); std::vector<uint32_t> bitPositionsClear = bsonArrayToBitPositions(bac); BSONObj match1 = from...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
138,201,800,370,446,090,000,000,000,000,000,000,000
32
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
void add_plugin_options(DYNAMIC_ARRAY *options, MEM_ROOT *mem_root) { struct st_plugin_int *p; my_option *opt; if (!initialized) return; for (uint idx= 0; idx < plugin_array.elements; idx++) { p= *dynamic_element(&plugin_array, idx, struct st_plugin_int **); if (!(opt= construct_help_options(me...
0
[ "CWE-416" ]
server
c05fd700970ad45735caed3a6f9930d4ce19a3bd
322,607,711,725,214,430,000,000,000,000,000,000,000
21
MDEV-26323 use-after-poison issue of MariaDB server
void cfg80211_tx_mgmt_expired(struct wireless_dev *wdev, u64 cookie, struct ieee80211_channel *chan, gfp_t gfp) { struct wiphy *wiphy = wdev->wiphy; struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); trace_cfg80211_tx_mgmt_expired(wdev, cookie, chan); nl80211_send_remain_on_chan_event(NL8021...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
52,651,535,024,246,580,000,000,000,000,000,000,000
11
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
get_tempcomp(double temp) { unsigned int i; struct Point *p1 = NULL, *p2 = NULL; /* If not configured with points, calculate the compensation from the specified quadratic function */ if (!points) return k0 + (temp - T0) * k1 + (temp - T0) * (temp - T0) * k2; /* Otherwise interpolate/extrapolate bet...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
247,465,234,024,333,800,000,000,000,000,000,000,000
22
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
**/ const CImg<T>& display_graph(CImgDisplay &disp, const unsigned int plot_type=1, const unsigned int vertex_type=1, const char *const labelx=0, const double xmin=0, const double xmax=0, const char *const labely=...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
146,860,593,518,058,760,000,000,000,000,000,000,000
7
Fix other issues in 'CImg<T>::load_bmp()'.
GF_Err csgp_box_write(GF_Box *s, GF_BitStream *bs) { u32 i; GF_Err e; GF_CompactSampleGroupBox *ptr = (GF_CompactSampleGroupBox*)s; u32 pattern_size = get_size_by_code( ((ptr->flags>>4) & 0x3) ); u32 scount_size = get_size_by_code( ((ptr->flags>>2) & 0x3) ); u32 index_size = get_size_by_code( (ptr->flags & 0x3) )...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
87,745,527,765,111,360,000,000,000,000,000,000,000
42
fixed #2255
ext4_xattr_handler(int name_index) { const struct xattr_handler *handler = NULL; if (name_index > 0 && name_index < ARRAY_SIZE(ext4_xattr_handler_map)) handler = ext4_xattr_handler_map[name_index]; return handler; }
0
[]
linux
54dd0e0a1b255f115f8647fc6fb93273251b01b9
128,362,293,769,174,310,000,000,000,000,000,000,000
8
ext4: add extra checks to ext4_xattr_block_get() Add explicit checks in ext4_xattr_block_get() just in case the e_value_offs and e_value_size fields in the the xattr block are corrupted in memory after the buffer_verified bit is set on the xattr block. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.or...
int ssl3_do_change_cipher_spec(SSL *s) { int i; const char *sender; int slen; if (s->state & SSL_ST_ACCEPT) i=SSL3_CHANGE_CIPHER_SERVER_READ; else i=SSL3_CHANGE_CIPHER_CLIENT_READ; if (s->s3->tmp.key_block == NULL) { s->session->cipher=s->s3->tmp.new_cipher; if (!s->method->ssl3_enc->setup_key_block(...
0
[]
openssl
8671b898609777c95aedf33743419a523874e6e8
261,347,656,459,451,740,000,000,000,000,000,000,000
39
Memory saving patch.
lasso_saml20_login_process_request_msg(LassoLogin *login, gchar *request_msg) { LassoProfile *profile = LASSO_PROFILE(login); int rc = 0; rc = lasso_saml20_profile_process_artifact_resolve(profile, request_msg); if (rc != 0) { return rc; } /* compat with liberty id-ff code */ lasso_assign_new_string(login->as...
0
[ "CWE-347" ]
lasso
ea7e5efe9741e1b1787a58af16cb15b40c23be5a
184,567,598,162,751,230,000,000,000,000,000,000,000
13
Fix signature checking on unsigned response with multiple assertions CVE-2021-28091 : when AuthnResponse messages are not signed (which is permitted by the specifiation), all assertion's signatures should be checked, but currently after the first signed assertion is checked all following assertions are accepted withou...
cmd_pipe_pane_read_callback(__unused struct bufferevent *bufev, void *data) { struct window_pane *wp = data; struct evbuffer *evb = wp->pipe_event->input; size_t available; available = EVBUFFER_LENGTH(evb); log_debug("%%%u pipe read %zu", wp->id, available); bufferevent_write(wp->event, EVBUFFER_DATA(evb), ...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
102,629,509,832,136,630,000,000,000,000,000,000,000
15
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
ext4_xattr_get(struct inode *inode, int name_index, const char *name, void *buffer, size_t buffer_size) { int error; if (strlen(name) > 255) return -ERANGE; down_read(&EXT4_I(inode)->xattr_sem); error = ext4_xattr_ibody_get(inode, name_index, name, buffer, buffer_size); if (error == -ENODATA) ...
0
[ "CWE-241", "CWE-19" ]
linux
82939d7999dfc1f1998c4b1c12e2f19edbdff272
7,071,052,878,213,832,000,000,000,000,000,000,000
17
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 Fixed lsr_translate_coords(GF_LASeRCodec *lsr, u32 val, u32 nb_bits) { if (!nb_bits) return 0; #ifdef GPAC_FIXED_POINT if (val >> (nb_bits-1) ) { s32 neg = (s32) val - (1<<nb_bits); if (neg < -FIX_ONE / 2) return 2 * gf_divfix(INT2FIX(neg/2), lsr->res_factor); return gf_divfix(INT2FIX(neg), lsr->res...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
290,400,118,693,281,160,000,000,000,000,000,000,000
24
fixed #2213
njs_value_string_get(njs_value_t *value, njs_str_t *dst) { njs_string_get(value, dst); }
0
[ "CWE-416" ]
njs
6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6
195,487,062,968,550,630,000,000,000,000,000,000,000
4
Fixed recursive async function calls. Previously, PromiseCapability record was stored (function->context) directly in function object during a function invocation. This is not correct, because PromiseCapability record should be linked to current execution context. As a result, function->context is overwritten with c...
rulesetCreateQueue(void __attribute__((unused)) *pVal, int *pNewVal) { DEFiRet; if(pCurrRuleset == NULL) { errmsg.LogError(0, RS_RET_NO_CURR_RULESET, "error: currently no specific ruleset specified, thus a " "queue can not be added to it"); ABORT_FINALIZE(RS_RET_NO_CURR_RULESET); } if(pCurrRuleset->pQueue...
0
[ "CWE-772", "CWE-401" ]
rsyslog
1ef709cc97d54f74d3fdeb83788cc4b01f4c6a2a
75,789,303,572,386,705,000,000,000,000,000,000,000
25
bugfix: fixed a memory leak and potential abort condition this could happen if multiple rulesets were used and some output batches contained messages belonging to more than one ruleset. fixes: http://bugzilla.adiscon.com/show_bug.cgi?id=226 fixes: http://bugzilla.adiscon.com/show_bug.cgi?id=218
static void brcmf_msgbuf_flowring_worker(struct work_struct *work) { struct brcmf_msgbuf *msgbuf; struct brcmf_msgbuf_work_item *create; msgbuf = container_of(work, struct brcmf_msgbuf, flowring_work); while ((create = brcmf_msgbuf_dequeue_work(msgbuf))) { brcmf_msgbuf_flowring_create_worker(msgbuf, create); ...
0
[ "CWE-20" ]
linux
a4176ec356c73a46c07c181c6d04039fafa34a9f
181,744,454,286,980,060,000,000,000,000,000,000,000
12
brcmfmac: add subtype check for event handling in data path For USB there is no separate channel being used to pass events from firmware to the host driver and as such are passed over the data path. In order to detect mock event messages an additional check is needed on event subtype. This check is added conditionally...
static int bgp_attr_atomic(struct bgp_attr_parser_args *args) { struct attr *const attr = args->attr; const bgp_size_t length = args->length; /* Length check. */ if (length != 0) { flog_err(EC_BGP_ATTR_LEN, "ATOMIC_AGGREGATE attribute length isn't 0 [%u]", length); return bgp_attr_malformed(args, BGP_N...
0
[ "CWE-20", "CWE-436" ]
frr
943d595a018e69b550db08cccba1d0778a86705a
169,321,366,638,366,290,000,000,000,000,000,000,000
19
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined Signed-off-by: Lou Berger <lberger@labn.net>
Bool gf_laser_decode_has_conditionnals(GF_LASeRCodec *codec) { return codec && codec->has_conditionnals ? GF_TRUE : GF_FALSE; }
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
24,344,573,216,236,826,000,000,000,000,000,000,000
4
fixed #2213
authentic_fcp_encode(struct sc_card *card, struct sc_file *file, unsigned char *out, size_t out_len) { struct sc_context *ctx = card->ctx; unsigned char buf[0x80]; size_t ii, offs; unsigned char ops_ef[4] = { SC_AC_OP_READ, SC_AC_OP_DELETE, SC_AC_OP_UPDATE, SC_AC_OP_RESIZE }; unsigned char ops_df[3] = { SC_AC_OP_C...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
17,618,031,434,169,390,000,000,000,000,000,000,000
63
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static void __exit rose_exit(void) { int i; proc_net_remove(&init_net, "rose"); proc_net_remove(&init_net, "rose_neigh"); proc_net_remove(&init_net, "rose_nodes"); proc_net_remove(&init_net, "rose_routes"); rose_loopback_clear(); rose_rt_free(); ax25_protocol_release(AX25_P_ROSE); ax25_linkfail_release(&ros...
0
[ "CWE-200" ]
linux-2.6
17ac2e9c58b69a1e25460a568eae1b0dc0188c25
76,749,254,056,112,990,000,000,000,000,000,000,000
37
rose: Fix rose_getname() leak rose_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
ipmi_sdr_print_sensor_fc(struct ipmi_intf *intf, struct sdr_record_common_sensor *sensor, uint8_t sdr_record_type) { char sval[16]; unsigned int i = 0; uint8_t target, lun, channel; struct sensor_reading *sr; sr = ipmi_sdr_read_sensor_value(intf, sensor, sdr_record_type, 2); if (!sr) return -1...
0
[ "CWE-120" ]
ipmitool
7ccea283dd62a05a320c1921e3d8d71a87772637
183,910,889,120,404,600,000,000,000,000,000,000,000
427
fru, sdr: Fix id_string buffer overflows Final part of the fixes for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp 9 variants of stack buffer overflow when parsing `id_string` field of SDR records returned from `CMD_GET_SDR` command. SDR record structs have an `id_co...
dns_zone_setminrefreshtime(dns_zone_t *zone, uint32_t val) { REQUIRE(DNS_ZONE_VALID(zone)); REQUIRE(val > 0); zone->minrefresh = val; }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
325,922,744,227,524,030,000,000,000,000,000,000,000
6
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
Header::pixelAspectRatio () const { return static_cast <const FloatAttribute &> ((*this)["pixelAspectRatio"]).value(); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
191,599,934,146,401,700,000,000,000,000,000,000,000
5
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static inline Image *GetImageCache(const ImageInfo *image_info,const char *path, ExceptionInfo *exception) { char key[MagickPathExtent]; ExceptionInfo *sans_exception; Image *image; ImageInfo *read_info; (void) FormatLocaleString(key,MagickPathExtent,"cache:%s",path); sans_exception=Ac...
0
[ "CWE-772", "CWE-787" ]
ImageMagick
e793eb203e5e0f91f5037aed6585e81b1e27395b
54,512,728,349,505,730,000,000,000,000,000,000,000
29
https://github.com/ImageMagick/ImageMagick/issues/636
static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) { struct net *net = sock_net(skb->sk); struct tcmsg *tcm; struct nlattr *tca[TCA_MAX + 1]; struct net_device *dev; u32 clid; struct Qdisc *q, *p; int err; if (net != &init_net) return -EINVAL; replay: /* Reinit, just in case som...
0
[ "CWE-909" ]
linux-2.6
16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b
105,603,111,369,970,480,000,000,000,000,000,000,000
138
tc: Fix unitialized kernel memory leak Three bytes of uninitialized kernel memory are currently leaked to user Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode) { struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_block_rsv *block_rsv = NULL; int reserve = 0; int insert = 0; int ret; if (!root->orphan_block_rsv) { block_rsv = btrfs_alloc_block_rsv(root, BTRFS_BLOCK_RSV_TEMP); if (!...
0
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
141,448,543,329,040,620,000,000,000,000,000,000,000
81
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...
static int mlx5_ib_destroy_dct(struct mlx5_ib_qp *mqp) { struct mlx5_ib_dev *dev = to_mdev(mqp->ibqp.device); if (mqp->state == IB_QPS_RTR) { int err; err = mlx5_core_destroy_dct(dev->mdev, &mqp->dct.mdct); if (err) { mlx5_ib_warn(dev, "failed to destroy DCT %d\n", err); return err; } } kfree(mqp->...
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
270,465,507,661,633,200,000,000,000,000,000,000,000
18
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
int save_in_field(Field *to) { return to->store(val_int(), true); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
220,939,487,649,811,140,000,000,000,000,000,000,000
1
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
pdf14_text_begin(gx_device * dev, gs_gstate * pgs, const gs_text_params_t * text, gs_font * font, gx_path * path, const gx_device_color * pdcolor, const gx_clip_path * pcpath, gs_memory_t * memory, gs_text_enum_t ** ppenum) { int code; gs_text_...
0
[ "CWE-416" ]
ghostpdl
90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb
288,877,796,450,652,500,000,000,000,000,000,000,000
18
Bug 697456. Dont create new ctx when pdf14 device reenabled This bug had yet another weird case where the user created a file that pushed the pdf14 device twice. We were in that case, creating a new ctx and blowing away the original one with out proper clean up. To avoid, only create a new one when we need it.
static SUB_STATE_RETURN read_state_machine(SSL *s) { OSSL_STATEM *st = &s->statem; int ret, mt; unsigned long len = 0; int (*transition) (SSL *s, int mt); PACKET pkt; MSG_PROCESS_RETURN(*process_message) (SSL *s, PACKET *pkt); WORK_STATE(*post_process_message) (SSL *s, WORK_STATE wst); u...
0
[ "CWE-416" ]
openssl
acacbfa7565c78d2273c0b2a2e5e803f44afefeb
80,582,133,851,087,880,000,000,000,000,000,000,000
153
Fix Use After Free for large message sizes The buffer to receive messages is initialised to 16k. If a message is received that is larger than that then the buffer is "realloc'd". This can cause the location of the underlying buffer to change. Anything that is referring to the old location will be referring to free'd d...
inline void reset_killed() { /* Resetting killed has to be done under a mutex to ensure its not done during an awake() call. */ if (killed != NOT_KILLED) { mysql_mutex_lock(&LOCK_thd_kill); killed= NOT_KILLED; killed_err= 0; mysql_mutex_unlock(&LOCK_thd_kill); ...
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
110,531,587,047,569,300,000,000,000,000,000,000,000
14
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...
static uint8_t server_authorize(struct bt_att *att, uint8_t opcode, uint16_t handle, void *user_data) { struct btd_gatt_database *database = user_data; struct device_state *state; bdaddr_t bdaddr; uint8_t bdaddr_type; if (!get_dst_info(att, &bdaddr, &bdaddr_type)) return 0; /* Skip if there is no device ...
0
[ "CWE-416" ]
bluez
838c0dc7641e1c991c0f3027bf94bee4606012f8
55,825,029,618,360,060,000,000,000,000,000,000,000
33
gatt: Fix not cleaning up when disconnected There is a current use after free possible on a gatt server if a client disconnects while a WriteValue call is being processed with dbus. This patch includes the addition of a pending disconnect callback to handle cleanup better if a disconnect occurs during a write, an acq...
static inline longlong read_bigendian(const uchar *from, uint bytes) { switch(bytes) { case 1: return mi_uint1korr(from); case 2: return mi_uint2korr(from); case 3: return mi_uint3korr(from); case 4: return mi_uint4korr(from); case 5: return mi_uint5korr(from); case 6: return mi_uint6korr(from); case 7:...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
49,988,533,192,404,130,000,000,000,000,000,000,000
14
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static int pnm_getuintstr(jas_stream_t *in, uint_fast32_t *val) { uint_fast32_t v; int c; /* Discard any leading whitespace. */ do { if ((c = pnm_getc(in)) == EOF) { return -1; } } while (isspace(c)); /* Parse the number. */ v = 0; while (isdigit(c)) { v = 10 * v + c - '0'; if ((c = pnm_getc(in)) <...
0
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
110,229,039,118,708,620,000,000,000,000,000,000,000
31
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
static inline bool between(__u32 seq1, __u32 seq2, __u32 seq3) { return seq3 - seq2 >= seq1 - seq2; }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
96,420,119,402,857,230,000,000,000,000,000,000,000
4
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 long uptomult(long x, long y) { assert(x >= 0); return ((x + y - 1) / y) * y; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
262,590,918,659,951,870,000,000,000,000,000,000,000
5
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static int posix_cpu_timer_set(struct k_itimer *timer, int timer_flags, struct itimerspec64 *new, struct itimerspec64 *old) { unsigned long flags; struct sighand_struct *sighand; struct task_struct *p = timer->it.cpu.task; u64 old_expires, new_expires, old_incr, val; int ret; WARN_ON_ONCE(p == NULL); ...
0
[ "CWE-190" ]
linux
78c9c4dfbf8c04883941445a195276bb4bb92c76
259,148,802,146,598,270,000,000,000,000,000,000,000
142
posix-timers: Sanitize overrun handling The posix timer overrun handling is broken because the forwarding functions can return a huge number of overruns which does not fit in an int. As a consequence timer_getoverrun(2) and siginfo::si_overrun can turn into random number generators. The k_clock::timer_forward() callb...
main (int argc, char *argv[]) { unsigned cmdn; int flags = IDN2_NONTRANSITIONAL; setlocale (LC_ALL, ""); set_program_name (argv[0]); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); if (cmdline_parser (argc, argv, &args_info) != 0) return EXIT_FAILURE; if (args_info.version_given) {...
1
[ "CWE-20" ]
libidn2
241e8f486134793cb0f4a5b0e5817a97883401f5
197,741,477,710,611,630,000,000,000,000,000,000,000
66
Perform A-Label roundtrip for lookup functions by default This adds another check to avoid unexpected results. It was a longstanding FIXME. Thanks to Jonathan Birch of Microsoft Corporation, Florian Weimer (GNU glibc) and Nikos Mavrogiannopoulos (GnuTLS) for investigation, discussion and testing.
static void __exit snd_compress_exit(void) { }
0
[ "CWE-703" ]
linux
6217e5ede23285ddfee10d2e4ba0cc2d4c046205
112,034,135,558,309,120,000,000,000,000,000,000,000
3
ALSA: compress: fix an integer overflow check I previously added an integer overflow check here but looking at it now, it's still buggy. The bug happens in snd_compr_allocate_buffer(). We multiply ".fragments" and ".fragment_size" and that doesn't overflow but then we save it in an unsigned int so it truncates the h...
Pl_ASCIIHexDecoder::flush() { if (this->pos == 0) { QTC::TC("libtests", "Pl_ASCIIHexDecoder no-op flush"); return; } int b[2]; for (int i = 0; i < 2; ++i) { if (this->inbuf[i] >= 'A') { b[i] = this->inbuf[i] - 'A' + 10; } else { b[i] = this->inbuf[i] - '0'; } } unsigned...
0
[ "CWE-787" ]
qpdf
dc92574c10f3e2516ec6445b88c5d584f40df4e5
210,240,176,858,994,760,000,000,000,000,000,000,000
32
Fix some pipelines to be safe if downstream write fails (fuzz issue 28262)
kvec_array_init(struct kvec *new, struct kvec *iov, unsigned int nr_segs, size_t bytes) { size_t base = 0; while (bytes || !iov->iov_len) { int copy = min(bytes, iov->iov_len); bytes -= copy; base += copy; if (iov->iov_len == base) { iov++; nr_segs--; base = 0; } } memcpy(new, iov, sizeof(*io...
0
[ "CWE-703", "CWE-189" ]
linux
1fc29bacedeabb278080e31bb9c1ecb49f143c3b
336,853,331,133,848,260,000,000,000,000,000,000,000
21
cifs: fix off-by-one bug in build_unc_path_to_root commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change. One spot in build_unc_path_to_root wa...
scale10_round_decimal_double (double x, int n) { int e IF_LINT(= 0); mpn_t m; void *memory = decode_double (x, &e, &m); return scale10_round_decimal_decoded (e, m, memory, n); }
0
[ "CWE-119", "CWE-787" ]
gnulib
278b4175c9d7dd47c1a3071554aac02add3b3c35
223,212,995,007,081,780,000,000,000,000,000,000,000
7
vasnprintf: Fix heap memory overrun bug. Reported by Ben Pfaff <blp@cs.stanford.edu> in <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00107.html>. * lib/vasnprintf.c (convert_to_decimal): Allocate one more byte of memory. * tests/test-vasnprintf.c (test_function): Add another test.
static void nfc_check_pres_timeout(struct timer_list *t) { struct nfc_dev *dev = from_timer(dev, t, check_pres_timer); schedule_work(&dev->check_pres_work); }
0
[]
linux
3e3b5dfcd16a3e254aab61bd1e8c417dd4503102
316,327,683,252,589,230,000,000,000,000,000,000,000
6
NFC: reorder the logic in nfc_{un,}register_device There is a potential UAF between the unregistration routine and the NFC netlink operations. The race that cause that UAF can be shown as below: (FREE) | (USE) nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | nci...
unknownDots(widechar dots) { static char buffer[20]; int k = 1; buffer[0] = '\\'; for (int mappingPos = 0; dotMapping[mappingPos].key; mappingPos++) { if (dots & dotMapping[mappingPos].key) buffer[k++] = dotMapping[mappingPos].value; } buffer[k++] = '/'; buffer[k] = 0; return buffer; }
0
[ "CWE-787" ]
liblouis
fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde
169,530,136,797,254,110,000,000,000,000,000,000,000
11
Fix yet another buffer overflow in the braille table parser Reported by Henri Salo Fixes #592
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
219,625,869,115,447,260,000,000,000,000,000,000,000
14
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static double mp_u(_cimg_math_parser& mp) { return cimg::rand(_mp_arg(2),_mp_arg(3));
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
259,188,986,871,947,620,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static inline int object_common2(UNSERIALIZE_PARAMETER, zend_long elements) { HashTable *ht; zend_bool has_wakeup; if (Z_TYPE_P(rval) != IS_OBJECT) { return 0; } has_wakeup = Z_OBJCE_P(rval) != PHP_IC_ENTRY && zend_hash_str_exists(&Z_OBJCE_P(rval)->function_table, "__wakeup", sizeof("__wakeup")-1); ht = Z_...
0
[ "CWE-416" ]
php-src
1a23ebc1fff59bf480ca92963b36eba5c1b904c4
230,701,130,971,009,660,000,000,000,000,000,000,000
36
Fixed bug #74103 and bug #75054 Directly fail unserialization when trying to acquire an r/R reference to an UNDEF HT slot. Previously this left an UNDEF and later deleted the index/key from the HT. What actually caused the issue here is a combination of two factors: First, the key deletion was performed using the has...
static bool aivdm_decode(const char *buf, size_t buflen, struct aivdm_context_t ais_contexts[AIVDM_CHANNELS], struct ais_t *ais, int debug) { #ifdef __UNUSED_DEBUG__ char *sixbits[64] = { "000000", "000001", "000010", "000011", "000100", "000101", "000110", "000111", "001000", "001001", "001010", "00...
0
[]
gpsd
08edc49d8f63c75bfdfb480b083b0d960310f94f
129,610,742,477,715,300,000,000,000,000,000,000,000
163
Address Savannah bug #38511: ais_context->bitlen <= sizeof(ais_context->bits)/8 is not checked
int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str) { STACK_OF(SSL_CIPHER) *sk; sk=ssl_create_cipher_list(ctx->method,&ctx->cipher_list, &ctx->cipher_list_by_id,str); /* ssl_create_cipher_list may return an empty stack if it * was unable to find a cipher matching the given rule string * (for example ...
0
[ "CWE-310" ]
openssl
c6a876473cbff0fd323c8abcaace98ee2d21863d
176,024,540,210,575,970,000,000,000,000,000,000,000
22
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
hint_list_finish(struct hint_state *state, krb5_error_code code) { kdc_hint_respond_fn oldrespond = state->respond; void *oldarg = state->arg; kdc_realm_t *kdc_active_realm = state->realm; /* Add a freshness token if a preauth module requested it and the client * request indicates support for it. ...
0
[ "CWE-617" ]
krb5
94e5eda5bb94d1d44733a49c3d9b6d1e42c74def
208,537,261,638,612,060,000,000,000,000,000,000,000
26
Remove incorrect KDC assertion The assertion in return_enc_padata() is reachable because kdc_make_s4u2self_rep() may have previously added encrypted padata. It is no longer necessary because the code uses add_pa_data_element() instead of allocating a new list. CVE-2018-20217: In MIT krb5 1.8 or later, an authenticat...
static void virtio_blk_handle_read(VirtIOBlockReq *req) { BlockDriverAIOCB *acb; uint64_t sector; sector = ldq_p(&req->out->sector); if (sector & req->dev->sector_mask) { virtio_blk_rw_complete(req, -EIO); return; } acb = bdrv_aio_readv(req->dev->bs, sector, &req->qiov, ...
1
[ "CWE-119" ]
qemu-kvm
52c050236eaa4f0b5e1d160cd66dc18106445c4d
198,504,695,502,641,500,000,000,000,000,000,000,000
19
virtio-blk: fail unaligned requests Like all block drivers virtio-blk should not allow small than block size granularity access. But given that the protocol specifies a byte unit length field we currently accept such requests, which cause qemu to abort() in lower layers. Add checks to the main read and write handler...
static bool qtest_check_clang_sanitizer(void) { #ifdef QEMU_SANITIZE_ADDRESS return true; #else g_test_skip("QEMU not configured using --enable-sanitizers"); return false; #endif }
0
[ "CWE-787" ]
qemu
46609b90d9e3a6304def11038a76b58ff43f77bc
83,157,500,032,647,770,000,000,000,000,000,000,000
9
tests/qtest/fdc-test: Add a regression test for CVE-2021-3507 Add the reproducer from https://gitlab.com/qemu-project/qemu/-/issues/339 Without the previous commit, when running 'make check-qtest-i386' with QEMU configured with '--enable-sanitizers' we get: ==4028352==ERROR: AddressSanitizer: heap-buffer-overflow ...
static BOOL update_send_set_keyboard_ime_status(rdpContext* context, UINT16 imeId, UINT32 imeState, UINT32 imeConvMode) { wStream* s; rdpRdp* rdp = context->rdp; s = rdp_data_pdu_init(rdp); if (!s) return FALSE; /* unitId should be 0 according to MS-RDPBCGR 2.2.8.2.2.1 */ Stream_Write_UINT16(s, imeId)...
0
[ "CWE-119", "CWE-787" ]
FreeRDP
445a5a42c500ceb80f8fa7f2c11f3682538033f3
71,251,660,765,703,020,000,000,000,000,000,000,000
17
Fixed CVE-2018-8786 Thanks to Eyal Itkin from Check Point Software Technologies.
static void perf_sample_regs_user(struct perf_regs *regs_user, struct pt_regs *regs, struct pt_regs *regs_user_copy) { if (user_mode(regs)) { regs_user->abi = perf_reg_abi(current); regs_user->regs = regs; } else if (current->mm) { perf_get_regs_user(regs_user, regs, regs_user_copy); } else { reg...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
171,888,146,830,742,700,000,000,000,000,000,000,000
14
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
static void checkmode (lua_State *L, const char *mode, const char *x) { if (mode && strchr(mode, x[0]) == NULL) { luaO_pushfstring(L, "attempt to load a %s chunk (mode is '%s')", x, mode); luaD_throw(L, LUA_ERRSYNTAX); } }
0
[ "CWE-416", "CWE-125", "CWE-787" ]
lua
6298903e35217ab69c279056f925fb72900ce0b7
230,661,226,417,806,600,000,000,000,000,000,000,000
7
Keep minimum size when shrinking a stack When shrinking a stack (during GC), do not make it smaller than the initial stack size.
void t_go_generator::generate_enum(t_enum* tenum) { std::ostringstream to_string_mapping, from_string_mapping; std::string tenum_name(publicize(tenum->get_name())); generate_go_docstring(f_types_, tenum); f_types_ << "type " << tenum_name << " int64" << endl << "const (" << endl; to_string_mapping << indent(...
0
[ "CWE-77" ]
thrift
2007783e874d524a46b818598a45078448ecc53e
308,937,678,035,154,250,000,000,000,000,000,000,000
87
THRIFT-3893 Command injection in format_go_output Client: Go Patch: Jens Geyer
static void userns_put(struct ns_common *ns) { put_user_ns(to_user_ns(ns)); }
0
[ "CWE-20", "CWE-862", "CWE-863" ]
linux
d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd
7,650,832,986,354,692,000,000,000,000,000,000,000
4
userns: also map extents in the reverse map to kernel IDs The current logic first clones the extent array and sorts both copies, then maps the lower IDs of the forward mapping into the lower namespace, but doesn't map the lower IDs of the reverse mapping. This means that code in a nested user namespace with >5 extent...
static zend_always_inline int zend_array_dup_element(HashTable *source, HashTable *target, uint32_t idx, Bucket *p, Bucket *q, int packed, int static_keys, int with_holes) { zval *data = &p->val; if (with_holes) { if (!packed && Z_TYPE_INFO_P(data) == IS_INDIRECT) { data = Z_INDIRECT_P(data); } if (UNEXPECT...
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
221,051,557,141,694,400,000,000,000,000,000,000,000
53
Fix #73832 - leave the table in a safe state if the size is too big.
int snd_pcm_hw_rule_noresample(struct snd_pcm_runtime *runtime, unsigned int base_rate) { return snd_pcm_hw_rule_add(runtime, SNDRV_PCM_HW_PARAMS_NORESAMPLE, SNDRV_PCM_HW_PARAM_RATE, snd_pcm_hw_rule_noresample_func, (void *)(uintptr_t)base_rate, SNDRV_PCM_HW_PARAM_RATE, -1); }
0
[ "CWE-416", "CWE-362" ]
linux
3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4
250,096,383,867,193,200,000,000,000,000,000,000,000
9
ALSA: pcm : Call kill_fasync() in stream lock Currently kill_fasync() is called outside the stream lock in snd_pcm_period_elapsed(). This is potentially racy, since the stream may get released even during the irq handler is running. Although snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't guarantee th...
static int usbhid_power(struct hid_device *hid, int lvl) { struct usbhid_device *usbhid = hid->driver_data; int r = 0; switch (lvl) { case PM_HINT_FULLON: r = usb_autopm_get_interface(usbhid->intf); break; case PM_HINT_NORMAL: usb_autopm_put_interface(usbhid->intf); break; } return r; }
0
[ "CWE-125", "CWE-787" ]
linux
f043bfc98c193c284e2cd768fefabe18ac2fed9b
5,062,174,457,703,873,500,000,000,000,000,000,000
17
HID: usbhid: fix out-of-bounds bug The hid descriptor identifies the length and type of subordinate descriptors for a device. If the received hid descriptor is smaller than the size of the struct hid_descriptor, it is possible to cause out-of-bounds. In addition, if bNumDescriptors of the hid descriptor have an incor...
DataBuf PngChunk::parseTXTChunk(const DataBuf& data, int keysize, TxtChunkType type) { DataBuf arr; if(type == zTXt_Chunk) { enforce(data.size_ >= Safe::add(keysize, 2), Exiv2::kerCorruptedM...
0
[ "CWE-125" ]
exiv2
35b3e596edacd2437c2c5d3dd2b5c9502626163d
290,785,519,026,904,000,000,000,000,000,000,000,000
115
Add overflow & overread checks to PngChunk::parseTXTChunk() This function was creating a lot of new pointers and strings without properly checking the array bounds. This commit adds several calls to enforce(), making sure that the pointers stay within bounds. Strings are now created using the helper function string_fr...
bool ClientHandler::get_should_close_after_write() const { return should_close_after_write_; }
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
167,804,841,259,285,200,000,000,000,000,000,000,000
3
Don't read too greedily
static int recalc_sigpending_tsk(struct task_struct *t) { if ((t->group_stop & GROUP_STOP_PENDING) || PENDING(&t->pending, &t->blocked) || PENDING(&t->signal->shared_pending, &t->blocked)) { set_tsk_thread_flag(t, TIF_SIGPENDING); return 1; } /* * We must never clear the flag in another thread, or in...
0
[ "CWE-400" ]
linux-stable-rt
bcf6b1d78c0bde228929c388978ed3af9a623463
48,111,618,321,819,160,000,000,000,000,000,000,000
15
signal/x86: Delay calling signals in atomic On x86_64 we must disable preemption before we enable interrupts for stack faults, int3 and debugging, because the current task is using a per CPU debug stack defined by the IST. If we schedule out, another task can come in and use the same stack and cause the stack to be co...
_tor_realloc(void *ptr, size_t size DMALLOC_PARAMS) { void *result; tor_assert(size < SIZE_T_CEILING); #ifdef USE_DMALLOC result = dmalloc_realloc(file, line, ptr, size, DMALLOC_FUNC_REALLOC, 0); #else result = realloc(ptr, size); #endif if (PREDICT_UNLIKELY(result == NULL)) { log_err(LD_MM,"Out of mem...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
321,581,933,213,000,900,000,000,000,000,000,000,000
18
Fix assertion failure in tor_timegm. Fixes bug 6811.
struct dentry *ext4_get_parent(struct dentry *child) { __u32 ino; struct inode *inode; static const struct qstr dotdot = { .name = "..", .len = 2, }; struct ext4_dir_entry_2 * de; struct buffer_head *bh; bh = ext4_find_entry(child->d_inode, &dotdot, &de); inode = NULL; if (!bh) return ERR_PTR(-ENOENT); ...
0
[ "CWE-20" ]
linux-2.6
e6b8bc09ba2075cd91fbffefcd2778b1a00bd76f
220,149,981,058,174,530,000,000,000,000,000,000,000
26
ext4: Add sanity check to make_indexed_dir Make sure the rec_len field in the '..' entry is sane, lest we overrun the directory block and cause a kernel oops on a purposefully corrupted filesystem. Thanks to Sami Liedes for reporting this bug. http://bugzilla.kernel.org/show_bug.cgi?id=12430 Signed-off-by: "Theodor...
rsvg_xml_noerror (void *data, xmlErrorPtr error) { }
0
[ "CWE-20" ]
librsvg
d83e426fff3f6d0fa6042d0930fb70357db24125
247,305,251,085,124,420,000,000,000,000,000,000,000
3
io: Use XML_PARSE_NONET We don't want to load resources off the net. Bug #691708.
void test_checkout_nasty__dotcapitalgit_path(void) { test_checkout_fails("refs/heads/dotcapitalgit_path", ".GIT/foobar"); }
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
259,471,609,361,682,840,000,000,000,000,000,000,000
4
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 ...
TPM_RC tpm_session_start_auth_with_params(TSS2_SYS_CONTEXT *sapi_context, SESSION **session, TPMI_DH_OBJECT tpmKey, TPM2B_MAX_BUFFER *salt, TPMI_DH_ENTITY bind, TPM2B_AUTH *bindAuth, TPM2B_NONCE *nonceCaller, TPM2B_ENCRYPTED_SECRET *encryptedSalt, TPM_SE sessionType, TPMT_SYM_DEF *symmetric, TPMI_ALG_HA...
0
[ "CWE-522", "CWE-200" ]
tpm2.0-tools
c5d72beaab1cbbbe68271f4bc4b6670d69985157
123,538,198,793,696,450,000,000,000,000,000,000,000
67
kdfa: use openssl for hmac not tpm While not reachable in the current code base tools, a potential security bug lurked in tpm_kdfa(). If using that routine for an hmac authorization, the hmac was calculated using the tpm. A user of an object wishing to authenticate via hmac, would expect that the password is never se...
print_vrrp_data(__attribute__((unused)) thread_t * thread) { vrrp_print_data(); return 0; }
0
[ "CWE-200" ]
keepalived
26c8d6374db33bcfcdcd758b1282f12ceef4b94f
270,596,646,035,503,770,000,000,000,000,000,000,000
5
Disable fopen_safe() append mode by default If a non privileged user creates /tmp/keepalived.log and has it open for read (e.g. tail -f), then even though keepalived will change the owner to root and remove all read/write permissions from non owners, the application which already has the file open will be able to read...
nautilus_file_is_foreign_link (NautilusFile *file) { return file->details->is_foreign_link; }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
81,271,103,791,667,560,000,000,000,000,000,000,000
4
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-...
GF_Err gf_bs_seek(GF_BitStream *bs, u64 offset) { bs->overflow_state = 0; if (bs->on_block_out) { GF_Err e; if (offset < bs->bytes_out) { GF_LOG(GF_LOG_ERROR, GF_LOG_CORE, ("[BS] Attempt to seek on byte range already forwarded\n")); return GF_BAD_PARAM; } /*warning: we allow offset = bs->size for WRITE ...
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
91,299,640,476,572,360,000,000,000,000,000,000,000
26
fixed #2165
rsvg_cairo_pop_render_stack (RsvgDrawingCtx * ctx) { RsvgCairoRender *render = RSVG_CAIRO_RENDER (ctx->render); cairo_t *child_cr = render->cr; gboolean lateclip = FALSE; cairo_surface_t *surface = NULL; RsvgState *state = rsvg_current_state (ctx); gboolean nest; if (rsvg_current_state (ctx...
1
[ "CWE-20" ]
librsvg
d1c9191949747f6dcfd207831d15dd4ba00e31f2
256,948,378,846,916,280,000,000,000,000,000,000,000
65
state: Store mask as reference Instead of immediately looking up the mask, store the reference and look it up on use.
static int smack_inode_setxattr(struct user_namespace *mnt_userns, struct dentry *dentry, const char *name, const void *value, size_t size, int flags) { struct smk_audit_info ad; struct smack_known *skp; int check_priv = 0; int check_import = 0; int check_star = 0; int rc = 0; /* * Check label validit...
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
48,304,798,368,042,890,000,000,000,000,000,000,000
54
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
static int hclge_vport_q_to_qs_map(struct hclge_dev *hdev, struct hclge_vport *vport) { struct hnae3_knic_private_info *kinfo = &vport->nic.kinfo; struct hnae3_queue **tqp = kinfo->tqp; struct hnae3_tc_info *v_tc_info; u32 i, j; int ret; for (i = 0; i < kinfo->num_tc; i++) { v_tc_info = &kinfo->tc_info[...
0
[ "CWE-125" ]
linux
04f25edb48c441fc278ecc154c270f16966cbb90
235,480,970,403,156,200,000,000,000,000,000,000,000
24
net: hns3: add some error checking in hclge_tm module When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg with vport->vport_id as pri_id, which is used as index for hdev->tm_info.tc_info, it will cause out of bound access issue if vport_id is e...
unsigned char *lpAppendInteger(unsigned char *lp, int64_t value) { char buf[LONG_STR_SIZE]; int slen = ll2string(buf,sizeof(buf),value); return lpAppend(lp,(unsigned char*)buf,slen); }
0
[ "CWE-125", "CWE-704" ]
redis
c04082cf138f1f51cedf05ee9ad36fb6763cafc6
81,803,833,786,613,420,000,000,000,000,000,000,000
5
Abort in XGROUP if the key is not a stream
int cma_set_default_roce_tos(struct cma_device *cma_dev, u32 port, u8 default_roce_tos) { if (!rdma_is_port_valid(cma_dev->device, port)) return -EINVAL; cma_dev->default_roce_tos[port - rdma_start_port(cma_dev->device)] = default_roce_tos; return 0; }
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
263,657,250,684,009,470,000,000,000,000,000,000,000
11
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
static char *get_pid_environ_val(pid_t pid,char *val){ char temp[500]; int i=0; int foundit=0; FILE *fp; sprintf(temp,"/proc/%d/environ",pid); fp=fopen(temp,"r"); if(fp==NULL) return NULL; for(;;){ temp[i]=fgetc(fp); if(foundit==1 && (temp[i]==0 || temp[i]=='\0' || temp[i]==EOF)){...
1
[ "CWE-119", "CWE-787" ]
das_watchdog
bd20bb02e75e2c0483832b52f2577253febfb690
162,694,388,896,939,430,000,000,000,000,000,000,000
44
Fix memory overflow if the name of an environment is larger than 500 characters. Bug found by Adam Sampson.
__skb_flow_dissect_batadv(const struct sk_buff *skb, struct flow_dissector_key_control *key_control, void *data, __be16 *p_proto, int *p_nhoff, int hlen, unsigned int flags) { struct { struct batadv_unicast_packet batadv_unicast; struct ethhdr eth; } *hdr, _hdr; hdr = __skb_header_pointer(skb, *p...
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
62,995,839,139,093,250,000,000,000,000,000,000,000
30
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...
ssize_t AsyncConnection::handle_connect_msg(ceph_msg_connect &connect, bufferlist &authorizer_bl, bufferlist &authorizer_reply) { ssize_t r = 0; ceph_msg_connect_reply reply; bufferlist reply_bl; memset(&reply, 0, sizeof(reply)); reply.protocol_version = async_msgr...
1
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
329,995,120,495,496,950,000,000,000,000,000,000,000
410
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static void put_free_dqblk(struct quota_handle *h, dqbuf_t buf, unsigned int blk) { struct qt_disk_dqdbheader *dh = (struct qt_disk_dqdbheader *)buf; struct qtree_mem_dqinfo *info = &h->qh_info.u.v2_mdqi.dqi_qtree; dh->dqdh_next_free = ext2fs_cpu_to_le32(info->dqi_free_blk); dh->dqdh_prev_free = ext2fs_cpu_t...
0
[ "CWE-787" ]
e2fsprogs
8dbe7b475ec5e91ed767239f0e85880f416fc384
113,287,114,198,251,640,000,000,000,000,000,000,000
13
libsupport: add checks to prevent buffer overrun bugs in quota code A maliciously corrupted file systems can trigger buffer overruns in the quota code used by e2fsck. To fix this, add sanity checks to the quota header fields as well as to block number references in the quota tree. Addresses: CVE-2019-5094 Addresses:...
void init_tmp_sh_file() { #ifdef USE_CYGWIN /* Format a name for the tmp sh file that is unique for this process */ my_snprintf(tmp_sh_name, sizeof(tmp_sh_name), "tmp_%d.sh", getpid()); /* Format the command to execute in order to run the script */ my_snprintf(tmp_sh_cmd, sizeof(tmp_sh_cmd), "sh %s", tmp_sh_nam...
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
188,414,254,695,838,200,000,000,000,000,000,000,000
9
WL#9072: Backport WL#8785 to 5.5
void dmax_del(GF_Box *s) { gf_free((GF_DMAXBox *)s); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
178,684,468,289,970,600,000,000,000,000,000,000,000
4
prevent dref memleak on invalid input (#1183)
kssl_err_set(KSSL_ERR *kssl_err, int reason, char *text) { if (kssl_err == NULL) return; kssl_err->reason = reason; BIO_snprintf(kssl_err->text, KSSL_ERR_MAX, "%s", text); return; }
0
[ "CWE-20" ]
openssl
cca1cd9a3447dd067503e4a85ebd1679ee78a48e
329,517,704,650,560,870,000,000,000,000,000,000,000
8
Submitted by: Tomas Hoger <thoger@redhat.com> Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL could be crashed if the relevant tables were not present (e.g. chrooted).
int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages) { int i; for (i = 0; i < KVM_NR_PAGE_SIZES; ++i) { unsigned long ugfn; int lpages; int level = i + 1; lpages = gfn_to_index(slot->base_gfn + npages - 1, slot->base_gfn, level) + 1; slot->arch.rmap[i] = kvm_kvzall...
0
[]
linux
6d1068b3a98519247d8ba4ec85cd40ac136dbdf9
74,231,348,012,917,710,000,000,000,000,000,000,000
57
KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) On hosts without the XSAVE support unprivileged local user can trigger oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN ioctl. invalid opcode: 0000 [#2]...
ExprResolveEnum(struct xkb_context *ctx, const ExprDef *expr, unsigned int *val_rtrn, const LookupEntry *values) { if (expr->expr.op != EXPR_IDENT) { log_err(ctx, "Found a %s where an enumerated value was expected\n", expr_op_type_to_string(expr->expr.op)); return fal...
0
[ "CWE-400", "CWE-703" ]
libxkbcommon
1f9d1248c07cda8aaff762429c0dce146de8632a
125,228,847,035,179,940,000,000,000,000,000,000,000
23
xkbcomp: fix stack overflow when evaluating boolean negation The expression evaluator would go into an infinite recursion when evaluating something like this as a boolean: `!True`. Instead of recursing to just `True` and negating, it recursed to `!True` itself again. Bug inherited from xkbcomp. Caught with the afl f...
void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,DH *(*dh)(SSL *ssl,int is_export, int keylength)) { SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TMP_DH_CB,(void (*)(void))dh); }
0
[ "CWE-310" ]
openssl
c6a876473cbff0fd323c8abcaace98ee2d21863d
143,253,404,166,615,650,000,000,000,000,000,000,000
5
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offset, struct inode **i) { squashfs_dir_header_3 dirh; char buffer[sizeof(squashfs_dir_entry_3) + SQUASHFS_NAME_LEN + 1] __attribute__((aligned)); squashfs_dir_entry_3 *dire = (squashfs_dir_entry_3 *) buffer; long long start; int bytes ...
0
[ "CWE-200", "CWE-59", "CWE-22" ]
squashfs-tools
e0485802ec72996c20026da320650d8362f555bd
324,937,704,688,683,350,000,000,000,000,000,000,000
138
Unsquashfs: additional write outside destination directory exploit fix An issue on github (https://github.com/plougher/squashfs-tools/issues/72) showed how some specially crafted Squashfs filesystems containing invalid file names (with '/' and '..') can cause Unsquashfs to write files outside of the destination direct...
sctp_disposition_t sctp_sf_do_9_1_prm_abort( const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { /* From 9.1 Abort of an Association * Upon receipt of the ABORT primitive from its upper * layer, the endpoint enters CLOSED state...
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
129,941,087,517,937,920,000,000,000,000,000,000,000
37
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
static void implicit_weight_table(H264Context *h, int field) { int ref0, ref1, i, cur_poc, ref_start, ref_count0, ref_count1; for (i = 0; i < 2; i++) { h->luma_weight_flag[i] = 0; h->chroma_weight_flag[i] = 0; } if (field < 0) { if (h->picture_structure == PICT_FRAME) { ...
0
[ "CWE-703" ]
FFmpeg
29ffeef5e73b8f41ff3a3f2242d356759c66f91f
84,035,591,487,319,790,000,000,000,000,000,000,000
60
avcodec/h264: do not trust last_pic_droppable when marking pictures as done This simplifies the code and fixes a deadlock Fixes Ticket2927 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
int ff_h264_parse_sprop_parameter_sets(AVFormatContext *s, uint8_t **data_ptr, int *size_ptr, const char *value) { char base64packet[1024]; uint8_t decoded_packet[1024]; int packet_size; while (*value) { char *dst = b...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
c42a1388a6d1bfd8001bf6a4241d8ca27e49326d
74,117,902,601,972,430,000,000,000,000,000,000,000
47
avformat/rtpdec_h264: Fix heap-buffer-overflow Fixes: rtp_sdp/poc.sdp Found-by: Bingchang <l.bing.chang.bc@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
void CBINDInstallDlg::CopyFiles() { CString destFile; for (FileDatas::iterator fd = installFiles.begin(); fd != installFiles.end(); ++fd) { if (m_toolsOnly && !fd->withTools) continue; SetCurrent(IDS_COPY_FILE, fd->filename); destFile = DestDir(fd->destination) + "\\" + fd->filename; CString filesp...
0
[ "CWE-284" ]
bind9
967a3b9419a3c12b8c0870c86d1ee3840bcbbad7
212,485,827,558,187,700,000,000,000,000,000,000,000
49
[master] quote service registry paths 4532. [security] The BIND installer on Windows used an unquoted service path, which can enable privilege escalation. (CVE-2017-3141) [RT #45229]
apply_autocmds_retval( event_T event, char_u *fname, // NULL or empty means use actual file name char_u *fname_io, // fname to use for <afile> on cmdline int force, // when TRUE, ignore autocmd_busy buf_T *buf, // buffer for <abuf> int *retval) // pointer to caller's retval { ...
0
[ "CWE-122", "CWE-787" ]
vim
5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089
97,853,931,939,038,990,000,000,000,000,000,000,000
25
patch 9.0.0061: ml_get error with nested autocommand Problem: ml_get error with nested autocommand. Solution: Also check line numbers for a nested autocommand. (closes #10761)
filter_open(const char *file_access, uint buffer_size, ref * pfile, const stream_procs * procs, const stream_template * templat, const stream_state * st, gs_memory_t *mem) { stream *s; uint ssize = gs_struct_type_size(templat->stype); stream_state *sst = 0; int code; if (tem...
0
[ "CWE-200" ]
ghostpdl
ab109aaeb3ddba59518b036fb288402a65cf7ce8
48,250,025,614,625,045,000,000,000,000,000,000,000
46
Bug 694724: Have filenameforall and getenv honor SAFER
clientAccessCheckDoneWrapper(allow_t answer, void *data) { ClientRequestContext *calloutContext = (ClientRequestContext *) data; if (!calloutContext->httpStateIsValid()) return; calloutContext->clientAccessCheckDone(answer); }
0
[ "CWE-116" ]
squid
e7cf864f938f24eea8af0692c04d16790983c823
248,291,185,184,045,180,000,000,000,000,000,000,000
9
Handle more Range requests (#790) Also removed some effectively unused code.
static __init int ftrace_init_debugfs(void) { struct dentry *d_tracer; d_tracer = tracing_init_dentry(); if (!d_tracer) return 0; ftrace_init_dyn_debugfs(d_tracer); trace_create_file("set_ftrace_pid", 0644, d_tracer, NULL, &ftrace_pid_fops); ftrace_profile_debugfs(d_tracer); return 0; }
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
311,122,263,847,470,760,000,000,000,000,000,000,000
17
tracing: Fix possible NULL pointer dereferences Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic...
ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags) { struct sock *sk = sock->sk; struct tcp_splice_state tss = { .pipe = pipe, .len = len, .flags = flags, }; long timeo; ssize_t spliced; int ret; sock_rps_record_flow(sk); /* * ...
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
119,472,562,459,734,300,000,000,000,000,000,000,000
87
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
static int java_recursive_descent(RAnal *anal, RAnalState *state, ut64 addr) { RAnalBlock *bb; RAnalBlock *current_head; if (!anal || !state || !state->current_bb || state->current_bb_head) return 0; bb = state->current_bb; current_head = state->current_bb_head; if (current_head && state->current_bb->type & ...
0
[ "CWE-125" ]
radare2
224e6bc13fa353dd3b7f7a2334588f1c4229e58d
113,905,455,972,408,500,000,000,000,000,000,000,000
32
Fix #10296 - Heap out of bounds read in java_switch_op()
static int io_poll_add_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_poll_iocb *poll = &req->poll; u32 events; if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; if (sqe->addr || sqe->ioprio || sqe->off || sqe->len || sqe->buf_index) return -EINVAL; if (!poll->file) ...
0
[ "CWE-416" ]
linux
6d816e088c359866f9867057e04f244c608c42fe
111,612,557,058,823,780,000,000,000,000,000,000,000
22
io_uring: hold 'ctx' reference around task_work queue + execute We're holding the request reference, but we need to go one higher to ensure that the ctx remains valid after the request has finished. If the ring is closed with pending task_work inflight, and the given io_kiocb finishes sync during issue, then we need a...
static int xdp_do_generic_redirect_map(struct net_device *dev, struct sk_buff *skb, struct bpf_prog *xdp_prog) { struct redirect_info *ri = this_cpu_ptr(&redirect_info); unsigned long map_owner = ri->map_owner; struct bpf_map *map = ri->map; struct net_device *fwd = NULL; u32 index = ri->ifin...
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
176,805,622,898,117,260,000,000,000,000,000,000,000
42
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...
gnome_desktop_thumbnail_path_for_uri (const char *uri, GnomeDesktopThumbnailSize size) { return thumbnail_path (uri, size); }
0
[]
nautilus
2ddba428ef2b13d0620bd599c3635b9c11044659
7,727,913,837,611,260,000,000,000,000,000,000,000
5
Update gnome-desktop code Closes https://gitlab.gnome.org/GNOME/nautilus/issues/987