func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
ha_partition_add_index(TABLE* table_arg, KEY* key_info_arg, uint num_of_keys_arg) : handler_add_index(table_arg, key_info_arg, num_of_keys_arg) {}
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
201,929,775,639,474,730,000,000,000,000,000,000,000
4
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
void ocfs2_unlock_and_free_pages(struct page **pages, int num_pages) { int i; for(i = 0; i < num_pages; i++) { if (pages[i]) { unlock_page(pages[i]); mark_page_accessed(pages[i]); put_page(pages[i]); } } }
0
[ "CWE-362" ]
linux
3e4c56d41eef5595035872a2ec5a483f42e8917f
308,711,386,160,023,900,000,000,000,000,000,000,000
12
ocfs2: ip_alloc_sem should be taken in ocfs2_get_block() ip_alloc_sem should be taken in ocfs2_get_block() when reading file in DIRECT mode to prevent concurrent access to extent tree with ocfs2_dio_end_io_write(), which may cause BUGON in the following situation: read file 'A' end_io...
static int decode_parent_image_spec(void **p, void *end, struct parent_image_info *pii) { u8 struct_v; u32 struct_len; int ret; ret = ceph_start_decoding(p, end, 1, "ParentImageSpec", &struct_v, &struct_len); if (ret) return ret; ceph_decode_64_safe(p, end, pii->pool_id, e_inval); pii->pool_ns ...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
82,331,066,592,418,480,000,000,000,000,000,000,000
31
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
static inline int xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, unsigned short family) { return __xfrm_policy_check2(sk, dir, skb, family, 0); }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
296,471,343,012,210,270,000,000,000,000,000,000,000
4
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
list_rest_of_args () { register WORD_LIST *list, *args; int i; /* Break out of the loop as soon as one of the dollar variables is null. */ for (i = 1, list = (WORD_LIST *)NULL; i < 10 && dollar_vars[i]; i++) list = make_word_list (make_bare_word (dollar_vars[i]), list); for (args = rest_of_args; args; a...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
296,488,386,891,734,340,000,000,000,000,000,000,000
14
bash-4.4-rc2 release
static av_cold int decode_close(AVCodecContext *avctx) { SCPRContext *s = avctx->priv_data; av_freep(&s->blocks); av_frame_free(&s->last_frame); av_frame_free(&s->current_frame); return 0; }
0
[ "CWE-119", "CWE-787" ]
FFmpeg
2171dfae8c065878a2e130390eb78cf2947a5b69
52,585,629,796,194,290,000,000,000,000,000,000,000
10
avcodec/scpr: Fix multiple runtime error: index 256 out of bounds for type 'unsigned int [256]' Fixes: 1519/clusterfuzz-testcase-minimized-5286680976162816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static inline void tg3_generate_fw_event(struct tg3 *tp) { u32 val; val = tr32(GRC_RX_CPU_EVENT); val |= GRC_RX_CPU_DRIVER_EVENT; tw32_f(GRC_RX_CPU_EVENT, val); tp->last_event_jiffies = jiffies; }
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
64,730,080,926,585,210,000,000,000,000,000,000,000
10
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
static inline void event_set_filtered_flag(struct trace_event_file *file) { unsigned long old_flags = file->flags; file->flags |= EVENT_FILE_FL_FILTERED; if (old_flags != file->flags) trace_buffered_event_enable(); }
0
[ "CWE-787" ]
linux
70303420b5721c38998cf987e6b7d30cc62d4ff1
27,400,669,570,138,880,000,000,000,000,000,000,000
9
tracing: Check for no filter when processing event filters The syzkaller detected a out-of-bounds issue with the events filter code, specifically here: prog[N].pred = NULL; /* #13 */ prog[N].target = 1; /* TRUE */ prog[N+1].pred = NULL; prog[N+1].target = 0; /* FALSE */ -> prog[N-1].target = N; prog[N-1].w...
SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len) { addr = untagged_addr(addr); profile_munmap(addr); return __vm_munmap(addr, len, true); }
0
[ "CWE-787" ]
linux
dcde237319e626d1ec3c9d8b7613032f0fd4663a
209,442,118,803,764,340,000,000,000,000,000,000,000
6
mm: Avoid creating virtual address aliases in brk()/mmap()/mremap() Currently the arm64 kernel ignores the top address byte passed to brk(), mmap() and mremap(). When the user is not aware of the 56-bit address limit or relies on the kernel to return an error, untagging such pointers has the potential to create addres...
clump_splay_walk_fwd(clump_splay_walker *sw) { clump_t *cp = sw->cp; int from = sw->from; if (cp == NULL) return NULL; /* We step through the tree, and stop when we arrive * at sw->end in an in order manner (i.e. by moving from * the left). */ while (1) { if (from == ...
0
[ "CWE-190" ]
ghostpdl
cfde94be1d4286bc47633c6e6eaf4e659bd78066
18,327,292,960,482,534,000,000,000,000,000,000,000
73
Bug 697985: bounds check the array allocations methods The clump allocator has four allocation functions that use 'number of elements' and 'size of elements' parameters (rather than a simple 'number of bytes'). Those need specific bounds checking.
size_t mobi_indx_get_label(unsigned char *output, MOBIBuffer *buf, const size_t length, const size_t has_ligatures) { if (!output) { buf->error = MOBI_PARAM_ERR; return 0; } if (buf->offset + length > buf->maxlen) { debug_print("%s", "End of buffer\n"); buf->error = MOBI_BUFF...
0
[ "CWE-125", "CWE-787" ]
libmobi
eafc415bc6067e72577f70d6dd5acbf057ce6e6f
204,480,295,040,099,330,000,000,000,000,000,000,000
38
Fix wrong boundary checks in inflections parser resulting in stack buffer over-read with corrupt input
virDomainSCSIDriveAddressIsUsed(const virDomainDef *def, const virDomainDeviceDriveAddress *addr) { const virDomainControllerDef *cont; cont = virDomainDeviceFindSCSIController(def, addr); if (cont) { int max = -1; int reserved = -1; /* Different con...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
36,376,809,097,882,070,000,000,000,000,000,000,000
59
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
CImg<Tuchar> get_YCbCrtoRGB() const { return CImg<Tuchar>(*this,false).YCbCrtoRGB(); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
26,108,696,159,079,557,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
slhc_free(struct slcompress *comp) { printk(KERN_DEBUG "Called IP function on non IP-system: slhc_free"); }
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
96,530,923,745,969,310,000,000,000,000,000,000,000
4
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
Status InferenceContext::Multiply(DimensionHandle first, DimensionOrConstant second, DimensionHandle* out) { const int64_t first_value = Value(first); const int64_t second_value = Value(second); // Special cases. if (first_value == 0) { *ou...
1
[ "CWE-190" ]
tensorflow
acd56b8bcb72b163c834ae4f18469047b001fadf
58,966,921,311,431,640,000,000,000,000,000,000,000
28
Fix security vulnerability with SpaceToBatchNDOp. PiperOrigin-RevId: 445527615
static int bus_append_unit_property(sd_bus_message *m, const char *field, const char *eq) { ConditionType t = _CONDITION_TYPE_INVALID; bool is_condition = false; int r; if (STR_IN_SET(field, "Description", "SourcePath", "OnFailureJobMode", "...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
91,166,986,817,951,840,000,000,000,000,000,000,000
82
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
static void nodeConstruct(struct SaveNode* node, tr_variant const* v, bool sort_dicts) { node->isVisited = false; node->childIndex = 0; if (sort_dicts && tr_variantIsDict(v)) { /* make node->sorted a sorted version of this dictionary */ size_t const n = v->val.l.count; struct K...
0
[ "CWE-416", "CWE-284" ]
transmission
2123adf8e5e1c2b48791f9d22fc8c747e974180e
45,250,202,964,949,230,000,000,000,000,000,000,000
41
CVE-2018-10756: Fix heap-use-after-free in tr_variantWalk In libtransmission/variant.c, function tr_variantWalk, when the variant stack is reallocated, a pointer to the previously allocated memory region is kept. This address is later accessed (heap use-after-free) while walking back down the stack, causing the applic...
static int dw2104_frontend_attach(struct dvb_usb_adapter *d) { struct dvb_tuner_ops *tuner_ops = NULL; if (demod_probe & 4) { d->fe_adap[0].fe = dvb_attach(stv0900_attach, &dw2104a_stv0900_config, &d->dev->i2c_adap, 0); if (d->fe_adap[0].fe != NULL) { if (dvb_attach(stb6100_attach, d->fe_adap[0].fe, ...
0
[ "CWE-476", "CWE-119" ]
linux
606142af57dad981b78707234cfbd15f9f7b7125
88,441,101,115,349,770,000,000,000,000,000,000,000
59
[media] dw2102: don't do DMA on stack On Kernel 4.9, WARNINGs about doing DMA on stack are hit at the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach(). Both were due to the use of buffers on the stack as parameters to dvb_usb_generic_rw() and the resulting attempt to do DMA with...
xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader) { if ((reader == NULL) || (reader->ctxt == NULL) || (reader->ctxt->input == NULL)) { return (0); } return (reader->ctxt->input->col); }
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
236,209,504,282,409,530,000,000,000,000,000,000,000
8
CVE-2015-1819 Enforce the reader to run in constant memory One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
void ok_inflater_set_input(ok_inflater *inflater, const uint8_t *buffer, size_t buffer_length) { if (inflater) { if (inflater->input == inflater->input_end) { inflater->input = buffer; inflater->input_end = inflater->input + buffer_length; } else { ok_inflater_err...
0
[ "CWE-787" ]
ok-file-formats
e49cdfb84fb5eca2a6261f3c51a3c793fab9f62e
308,835,331,708,861,600,000,000,000,000,000,000,000
10
ok_png: Disallow multiple IHDR chunks (#15)
getIndexTypeAndParent(instanceData *pData, uchar **tpls, uchar **srchIndex, uchar **srchType, uchar **parent, uchar **bulkId) { if(pData->dynSrchIdx) { *srchIndex = tpls[1]; if(pData->dynSrchType) { *srchType = tpls[2]; if(pData->dynParent) { *parent = tpls[3]; if(pData->dynBulkId) { ...
0
[ "CWE-399" ]
rsyslog
80f88242982c9c6ad6ce8628fc5b94ea74051cf4
324,161,411,763,935,060,000,000,000,000,000,000,000
64
bugfix: double-free in omelasticsearch closes: http://bugzilla.adiscon.com/show_bug.cgi?id=461 Thanks to Marius Ionescu for providing a detailled bug report
uint SSL::get_SEQIncrement(bool verify) { if (verify) return secure_.use_connection().peer_sequence_number_++; else return secure_.use_connection().sequence_number_++; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
1,867,646,663,311,029,800,000,000,000,000,000,000
7
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
pfm_clear_psr_pp(void) { ia64_rsm(IA64_PSR_PP); ia64_srlz_i(); }
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
168,691,031,480,304,940,000,000,000,000,000,000,000
5
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
static Image *ReadTIFFImage(const ImageInfo *image_info, ExceptionInfo *exception) { #define ThrowTIFFException(severity,message) \ { \ if (pixel_info != (MemoryInfo *) NULL) \ pixel_info=RelinquishVirtualMemory(pixel_info); \ if (quantum_info != (QuantumInfo *) NULL) \ quantum_info=DestroyQuantumInfo(qua...
1
[ "CWE-125", "CWE-787" ]
ImageMagick
930ff0d1a9bc42925a7856e9ea53f5fc9f318bf3
8,598,652,365,711,460,000,000,000,000,000,000,000
1,009
eliminate heap buffer overflow vulnerability, thanks to ZhangJiaxing (@r0fm1a) from Codesafe Team of Legendsec at Qi'anxin Group
static void perf_event_comm_output(struct perf_event *event, struct perf_comm_event *comm_event) { struct perf_output_handle handle; struct perf_sample_data sample; int size = comm_event->event_id.header.size; int ret; perf_event_header__init_id(&comm_event->event_id.header, &sample, event); ret = perf_...
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
2,078,779,981,472,434,700,000,000,000,000,000,000
28
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
inline static bool jas_safe_size_add(size_t x, size_t y, size_t *result) { if (y > SIZE_MAX - x) { return false; } *result = x + y; return true; }
0
[ "CWE-119" ]
jasper
65536647d380571d1a9a6c91fa03775fb5bbd256
95,179,027,131,469,700,000,000,000,000,000,000,000
8
A new experimental memory allocator has been introduced. The allocator is experimental in the sense that its API is not considered stable and the allocator may change or disappear entirely in future versions of the code. This new allocator tracks how much memory is being used by jas_malloc and friends. A maximum upp...
**/ CImgList<T>& assign(const CImgDisplay &disp) { return assign(CImg<T>(disp));
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
191,399,875,439,326,400,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
KeyInfo *sqlite3KeyInfoOfIndex(Parse *pParse, Index *pIdx){ int i; int nCol = pIdx->nColumn; int nKey = pIdx->nKeyCol; KeyInfo *pKey; if( pParse->nErr ) return 0; if( pIdx->uniqNotNull ){ pKey = sqlite3KeyInfoAlloc(pParse->db, nKey, nCol-nKey); }else{ pKey = sqlite3KeyInfoAlloc(pParse->db, nCol, 0...
0
[ "CWE-674", "CWE-787" ]
sqlite
38096961c7cd109110ac21d3ed7dad7e0cb0ae06
22,951,505,301,544,796,000,000,000,000,000,000,000
39
Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself. FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5
static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg, u32 bw_cap[]) { struct brcmf_if *ifp = netdev_priv(cfg_to_ndev(cfg)); struct ieee80211_supported_band *band; struct ieee80211_channel *channel; struct wiphy *wiphy; struct brcmf_chanspec_list *list; struct brcmu_chan ch; int err; u8 *p...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
12,660,182,481,257,102,000,000,000,000,000,000,000
110
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
void RAND_screen() { // TODO: }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
184,557,650,838,807,960,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) { struct dentry *result; struct task_struct *task; unsigned tgid; struct pid_namespace *ns; result = proc_base_lookup(dir, dentry); if (!IS_ERR(result) || PTR_ERR(result) != -ENOENT) goto out; tgid = name_to_int(d...
0
[]
linux
0499680a42141d86417a8fbaa8c8db806bea1201
339,130,315,764,374,900,000,000,000,000,000,000,000
29
procfs: add hidepid= and gid= mount options Add support for mount options to restrict access to /proc/PID/ directories. The default backward-compatible "relaxed" behaviour is left untouched. The first mount option is called "hidepid" and its value defines how much info about processes we want to be available for non...
void __init ip_init(void) { ip_rt_init(); inet_initpeers(); #if defined(CONFIG_IP_MULTICAST) && defined(CONFIG_PROC_FS) igmp_mc_proc_init(); #endif }
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
98,697,844,018,877,330,000,000,000,000,000,000,000
9
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
static inline void setup_nr_node_ids(void) {}
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
300,267,905,707,854,920,000,000,000,000,000,000,000
1
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static int ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *dim = &opline->op2.u.constant; zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC); if (IS_CV == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
66,869,394,658,542,910,000,000,000,000,000,000,000
15
- 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
cmsBool BlackPointUsingPerceptualBlack(cmsCIEXYZ* BlackPoint, cmsHPROFILE hProfile) { cmsHTRANSFORM hRoundTrip; cmsCIELab LabIn, LabOut; cmsCIEXYZ BlackXYZ; // Is the intent supported by the profile? if (!cmsIsIntentSupported(hProfile, INTENT_PERCEPTUAL, LCMS_USED_AS_INPUT)) { BlackPoint...
0
[]
Little-CMS
886e2f524268efe8a1c3aa838c28e446fda24486
141,777,499,841,591,040,000,000,000,000,000,000,000
36
Fixes from coverity check
void SSL_set_tmp_dh_callback(SSL *ssl,DH *(*dh)(SSL *ssl,int is_export, int keylength)) { SSL_callback_ctrl(ssl,SSL_CTRL_SET_TMP_DH_CB,(void (*)(void))dh); }
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
340,004,172,825,396,730,000,000,000,000,000,000,000
5
Add Next Protocol Negotiation.
path_add(PG_FUNCTION_ARGS) { PATH *p1 = PG_GETARG_PATH_P(0); PATH *p2 = PG_GETARG_PATH_P(1); PATH *result; int size, base_size; int i; if (p1->closed || p2->closed) PG_RETURN_NULL(); base_size = sizeof(p1->p[0]) * (p1->npts + p2->npts); size = offsetof(PATH, p[0]) +base_size; /* Check for...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
68,452,891,340,052,380,000,000,000,000,000,000,000
43
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...
Bool gf_filter_is_alias(GF_Filter *filter) { if (filter && filter->multi_sink_target) return GF_TRUE; return GF_FALSE; }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
229,608,052,449,816,820,000,000,000,000,000,000,000
5
fixed crashes for very long path - cf #1908
void dtls1_set_message_header(SSL *s, unsigned char mt, unsigned long len, unsigned long frag_off, unsigned long frag_len) { if (frag_off == 0) { s->d1->handshake_write_seq = s->d1->next_handshake_write_seq; s->d1->next_handshake_write_seq+...
0
[ "CWE-399" ]
openssl
df6b5e29ffea2d5a3e08de92fb765fdb21c7a21e
188,247,530,419,318,770,000,000,000,000,000,000,000
12
Excessive allocation of memory in dtls1_preprocess_fragment() This issue is very similar to CVE-2016-6307 described in the previous commit. The underlying defect is different but the security analysis and impacts are the same except that it impacts DTLS. A DTLS message includes 3 bytes for its length in the header fo...
static int compat_update_counters(struct net *net, void __user *user, unsigned int len) { struct compat_ebt_replace hlp; if (copy_from_user(&hlp, user, sizeof(hlp))) return -EFAULT; /* try real handler in case userland supplied needed padding */ if (len != sizeof(hlp) + hlp.num_counters * sizeof(struct eb...
0
[ "CWE-787" ]
linux
b71812168571fa55e44cdd0254471331b9c4c4c6
171,696,457,393,007,000,000,000,000,000,000,000,000
15
netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets We need to make sure the offsets are not out of range of the total size. Also check that they are in ascending order. The WARN_ON triggered by syzkaller (it sets panic_on_warn) is changed to also bail out, no point in continuing parsing. Briefly tested...
GF_Err ssix_Size(GF_Box *s) { u32 i; GF_SubsegmentIndexBox *ptr = (GF_SubsegmentIndexBox*)s; ptr->size += 4; for (i = 0; i < ptr->subsegment_count; i++) { ptr->size += 4 + 4 * ptr->subsegments[i].range_count; } return GF_OK; }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
49,072,866,555,715,620,000,000,000,000,000,000,000
11
fixed 2 possible heap overflows (inc. #1088)
int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) { switch (msr_info->index) { case MSR_IA32_PLATFORM_ID: case MSR_IA32_EBL_CR_POWERON: case MSR_IA32_LASTBRANCHFROMIP: case MSR_IA32_LASTBRANCHTOIP: case MSR_IA32_LASTINTFROMIP: case MSR_IA32_LASTINTTOIP: case MSR_AMD64_SYSCFG: case MSR_K8...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
60,983,101,092,616,350,000,000,000,000,000,000,000
280
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
static ssize_t poison_show(struct kmem_cache *s, char *buf) { return sprintf(buf, "%d\n", !!(s->flags & SLAB_POISON)); }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
141,840,500,504,580,340,000,000,000,000,000,000,000
4
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 ...
size_t size () const { // string length + \0 size_t sizeBytes = _suffix.length() + 1; // 1 byte for scheme / cscIdx / caseInsensitive, and 1 byte for type sizeBytes += 2 * Xdr::size<char>(); return sizeBytes; }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
104,736,758,581,699,530,000,000,000,000,000,000,000
10
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static int vp8_lossy_decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, uint8_t *data_start, unsigned int data_size) { WebPContext *s = avctx->priv_data; AVPacket pkt; int ret; if (!s->initialized) { ff_vp8_decode_...
1
[ "CWE-119", "CWE-787" ]
FFmpeg
6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
237,216,754,122,778,300,000,000,000,000,000,000,000
39
avcodec/webp: Always set pix_fmt Fixes: out of array access Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632 Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbult...
static void pipe_start_flow_control(struct sock *sk) { struct pep_sock *pn = pep_sk(sk); if (!pn_flow_safe(pn->tx_fc)) { atomic_set(&pn->tx_credits, 1); sk->sk_write_space(sk); } pipe_grant_credits(sk, GFP_ATOMIC); }
0
[ "CWE-200" ]
net
bcd0f93353326954817a4f9fa55ec57fb38acbb0
50,452,768,351,061,170,000,000,000,000,000,000,000
10
phonet: refcount leak in pep_sock_accep sock_hold(sk) is invoked in pep_sock_accept(), but __sock_put(sk) is not invoked in subsequent failure branches(pep_accept_conn() != 0). Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Link: https://lore.kernel.org/r/20211209082839.33985-1-hbh25y@gmail.com Signed-off-by: Jakub Kic...
PHP_METHOD(Phar, buildFromDirectory) { char *dir, *error, *regex = NULL; size_t dir_len, regex_len = 0; zend_bool apply_reg = 0; zval arg, arg2, iter, iteriter, regexiter; struct _phar_t pass; PHAR_ARCHIVE_OBJECT(); if (PHAR_G(readonly) && !phar_obj->archive->is_data) { zend_throw_exception_ex(spl_ce_Unexpec...
0
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
6,973,431,463,905,839,000,000,000,000,000,000,000
120
Fix bug #71860: Require valid paths for phar filenames
_gcry_mpi_powm (gcry_mpi_t res, gcry_mpi_t base, gcry_mpi_t expo, gcry_mpi_t mod) { /* Pointer to the limbs of the arguments, their size and signs. */ mpi_ptr_t rp, ep, mp, bp; mpi_size_t esize, msize, bsize, rsize; int msign, bsign, rsign; /* Flags telling the secure allocation...
1
[ "CWE-310" ]
libgcrypt
78130828e9a140a9de4dafadbc844dbb64cb709a
37,695,990,622,990,004,000,000,000,000,000,000,000
359
Same computation for square and multiply. * mpi/mpi-pow.c (_gcry_mpi_powm): Compare msize for max_u_size. Move the assignment to base_u into the loop. Copy content refered by RP to BASE_U except the last of the loop. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
static void sethvflip(struct gspca_dev *gspca_dev, s32 hflip, s32 vflip) { struct sd *sd = (struct sd *) gspca_dev; if (sd->gspca_dev.streaming) reg_w(sd, OV519_R51_RESET1, 0x0f); /* block stream */ i2c_w_mask(sd, OV7670_R1E_MVFP, OV7670_MVFP_MIRROR * hflip | OV7670_MVFP_VFLIP * vflip, OV7670_MVFP_MIRROR | OV...
0
[ "CWE-476" ]
linux
998912346c0da53a6dbb71fab3a138586b596b30
24,767,069,287,701,606,000,000,000,000,000,000,000
12
media: ov519: add missing endpoint sanity checks Make sure to check that we have at least one endpoint before accessing the endpoint array to avoid dereferencing a NULL-pointer on stream start. Note that these sanity checks are not redundant as the driver is mixing looking up altsettings by index and by number, which...
rsvg_filter_primitive_image_render (RsvgNode *node, RsvgFilterPrimitive *primitive, RsvgFilterContext *ctx) { RsvgFilterPrimitiveImage *image = (RsvgFilterPrimitiveImage *) primitive; RsvgIRect boundarys; RsvgFilterPrimitiveOutput op; cairo_surface_t *output, *img; if (!image->href) return...
0
[ "CWE-369" ]
librsvg
ecf9267a24b2c3c0cd211dbdfa9ef2232511972a
60,618,302,088,149,760,000,000,000,000,000,000,000
46
bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs We were making the decision to use box blurs, instead of a true Gaussian kernel, based on the size of *both* x and y dimensions. Do them individually instead.
static void build_zonelists(pg_data_t *pgdat) { static int node_order[MAX_NUMNODES]; int node, load, nr_nodes = 0; nodemask_t used_mask; int local_node, prev_node; /* NUMA-aware ordering of nodes */ local_node = pgdat->node_id; load = nr_online_nodes; prev_node = local_node; nodes_clear(used_mask); memset(n...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
252,476,426,418,321,080,000,000,000,000,000,000,000
32
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
calc_ntlmv2_response (const char *user, const char *domain, const guchar *nt_hash, const gsize nt_hash_sz, const guchar *nonce, const char *target_info, size_t target_info_sz, guchar *lm_resp, size_t lm_resp_sz, guchar *nt_resp, size_t nt_resp_sz) { const unsigned char blob_signature[] = ...
0
[ "CWE-125" ]
libsoup
0e7b2c1466434a992b6a387497432e1c97b6125c
205,233,567,818,651,540,000,000,000,000,000,000,000
77
NTLMv2 responses support
mlx5_tx_burst_single(struct mlx5_txq_data *restrict txq, struct rte_mbuf **restrict pkts, unsigned int pkts_n, struct mlx5_txq_local *restrict loc, unsigned int olx) { enum mlx5_txcmp_code ret; ret = mlx5_tx_able_to_empw(txq, loc, olx, false); if (ret == MLX5_TXCMP_CODE_SINGLE) goto or...
0
[]
dpdk-stable
8b090f2664e9d014cd8fa0fde90597aaf4349e7e
146,036,755,121,876,340,000,000,000,000,000,000,000
32
net/mlx5: fix Rx queue recovery mechanism The local variables are getting inconsistent in data receiving routines after queue error recovery. Receive queue consumer index is getting wrong, need to reset one to the size of the queue (as RQ was fully replenished in recovery procedure). In MPRQ case, also the local cons...
static ut64 r_rebase_offset_to_paddr(RKernelCacheObj *obj, struct section_t *sections, ut64 offset) { ut64 vaddr = obj->rebase_info->kernel_base + offset; int i = 0; for (; !sections[i].last; i++) { if (sections[i].addr <= vaddr && vaddr < (sections[i].addr + sections[i].vsize)) { return sections[i].offset + (v...
0
[ "CWE-476" ]
radare2
feaa4e7f7399c51ee6f52deb84dc3f795b4035d6
99,258,208,798,964,350,000,000,000,000,000,000,000
10
Fix null deref in xnu.kernelcache ##crash * Reported by @xshad3 via huntr.dev
TEST_F(Http1ServerConnectionImplTest, InnerLWSIsPreserved) { initialize(); // Header with many spaces surrounded by non-whitespace characters to ensure that dispatching is // split across multiple dispatch calls. The threshold used here comes from Envoy preferring 16KB // reads, but the important part is that ...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
326,178,883,868,071,340,000,000,000,000,000,000,000
32
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static char *SubMatch(char *pattern, char *eop, char *name,int ignorecase) { char ch, *ppt, *npt, *ept, *eon; while ( pattern<eop && ( ch = *pattern)!='\0' ) { if ( ch=='*' ) { if ( pattern[1]=='\0' ) return( name+strlen(name)); for ( npt=name; ; ++npt ) { if ( (eon = SubMatch(pattern+1,eop,npt,ig...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
161,357,701,874,954,050,000,000,000,000,000,000,000
92
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static inline int valid_mmap_phys_addr_range(unsigned long pfn, size_t size) { return 1; }
0
[ "CWE-200", "CWE-732" ]
linux
a4866aa812518ed1a37d8ea0c881dc946409de94
119,122,708,825,381,490,000,000,000,000,000,000,000
4
mm: Tighten x86 /dev/mem with zeroing reads Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is disallowed. However, on x86, the first 1MB was always allowed for BIOS and similar things, regardless of it actually being System RAM. It was possible for heap to end up getting allocated in low 1MB RAM, and ...
PJ_DEF(pj_pool_t*) pjsua_pool_create( const char *name, pj_size_t init_size, pj_size_t increment) { /* Pool factory is thread safe, no need to lock */ return pj_pool_create(&pjsua_var.cp.factory, name, init_size, increment, NULL); }
0
[ "CWE-120", "CWE-787" ]
pjproject
d27f79da11df7bc8bb56c2f291d71e54df8d2c47
202,195,712,179,045,270,000,000,000,000,000,000,000
7
Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009) * Use PJ_ASSERT_RETURN on pjsip_auth_create_digest * Use PJ_ASSERT_RETURN on pjsua_init_tpselector() * Fix incorrect check. * Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256() * Modifi...
static inline u32 net_hash_mix(const struct net *net) { #ifdef CONFIG_NET_NS return (u32)(((unsigned long)net) >> ilog2(sizeof(*net))); #else return 0; #endif }
1
[ "CWE-200", "CWE-190", "CWE-326" ]
linux
355b98553789b646ed97ad801a619ff898471b92
34,889,569,998,950,894,000,000,000,000,000,000,000
8
netns: provide pure entropy for net_hash_mix() net_hash_mix() currently uses kernel address of a struct net, and is used in many places that could be used to reveal this address to a patient attacker, thus defeating KASLR, for the typical case (initial net namespace, &init_net is not dynamically allocated) I believe ...
_copyCreateEnumStmt(const CreateEnumStmt *from) { CreateEnumStmt *newnode = makeNode(CreateEnumStmt); COPY_NODE_FIELD(typeName); COPY_NODE_FIELD(vals); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
23,407,512,786,718,585,000,000,000,000,000,000,000
9
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static int enough(int a, int b) { u_int8_t percentage = 20; if(b == 0) return(0); if(a == 0) return(1); if(b > (((a+1)*percentage)/100)) return(1); return(0); }
0
[ "CWE-416", "CWE-787" ]
nDPI
6a9f5e4f7c3fd5ddab3e6727b071904d76773952
218,727,362,213,942,680,000,000,000,000,000,000,000
10
Fixed use after free caused by dangling pointer * This fix also improved RCE Injection detection Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
R_API bool r_cmd_desc_has_handler(RCmdDesc *cd) { r_return_val_if_fail (cd, false); switch (cd->type) { case R_CMD_DESC_TYPE_ARGV: return cd->d.argv_data.cb; case R_CMD_DESC_TYPE_OLDINPUT: return cd->d.oldinput_data.cb; case R_CMD_DESC_TYPE_INNER: return false; case R_CMD_DESC_TYPE_GROUP: return cd->d.gro...
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
248,942,833,026,582,800,000,000,000,000,000,000,000
14
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
static void __init enable_swap_cgroup(void) { if (!mem_cgroup_disabled() && really_do_swap_account) do_swap_account = 1; }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
239,584,548,788,996,430,000,000,000,000,000,000,000
5
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(...
skip_options (char *line) { while ( *line == '-' && line[1] == '-' ) { while (*line && !spacep (line)) line++; while (spacep (line)) line++; } return line; }
0
[]
gnupg
b0b3803e8c2959dd67ca96debc54b5c6464f0d41
231,143,124,359,700,300,000,000,000,000,000,000,000
11
scd: Avoid double-free on error condition in scd * scd/command.c (cmd_readkey): avoid double-free of cert -- When ksba_cert_new() fails, cert will be double-freed. Debian-Bug-Id: 773471 Original patch changed by wk to do the free only at leave.
static inline unsigned int obj_to_index(const struct kmem_cache *cache, const struct page *page, void *obj) { u32 offset = (obj - page->s_mem); return reciprocal_divide(offset, cache->reciprocal_buffer_size); }
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
268,892,346,147,395,600,000,000,000,000,000,000,000
6
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
dns_compare_name(char *query, char *response) { unsigned char n; do { n = *response++; /** @see RFC 1035 - 4.1.4. Message compression */ if ((n & 0xc0) == 0xc0) { /* Compressed name: cannot be equal since we don't send them */ return NULL; } else { /* Not compressed name */ ...
0
[]
lwip
9fb46e120655ac481b2af8f865d5ae56c39b831a
171,317,444,182,156,050,000,000,000,000,000,000,000
26
added source port randomization to make the DNS client more robust (see bug #43144)
void fx_DataView_prototype_set(txMachine* the, txNumber delta, txTypeCoerce coercer, txTypeCallback setter) { txSlot* instance = fxCheckDataViewInstance(the, mxThis); txSlot* view = instance->next; txSlot* buffer = view->next; txInteger offset = fxArgToByteLength(the, 0, 0); txInteger size; int endian = EndianBig...
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
70,384,960,058,388,200,000,000,000,000,000,000,000
24
XS: #896
static bool batadv_frag_init_chain(struct batadv_frag_table_entry *chain, uint16_t seqno) { if (chain->seqno == seqno) return false; if (!hlist_empty(&chain->head)) batadv_frag_clear_chain(&chain->head); chain->size = 0; chain->seqno = seqno; return true; }
0
[ "CWE-399" ]
linux
5b6698b0e4a37053de35cc24ee695b98a7eb712b
184,742,736,338,141,280,000,000,000,000,000,000,000
14
batman-adv: Calculate extra tail size based on queued fragments The fragmentation code was replaced in 610bfc6bc99bc83680d190ebc69359a05fc7f605 ("batman-adv: Receive fragmented packets and merge"). The new code provided a mostly unused parameter skb for the merging function. It is used inside the function to calculate...
XkbSendCompatMap(ClientPtr client, XkbCompatMapPtr compat, xkbGetCompatMapReply * rep) { char *data; int size; if (rep->length > 0) { data = xallocarray(rep->length, 4); if (data) { register unsigned i, bit; xkbModsWireDesc *grp; XkbSymIn...
0
[ "CWE-119" ]
xserver
f7cd1276bbd4fe3a9700096dec33b52b8440788d
206,746,514,027,470,550,000,000,000,000,000,000,000
65
Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
static int smk_ipv6_port_check(struct sock *sk, struct sockaddr_in6 *address, int act) { struct smk_port_label *spp; struct socket_smack *ssp = sk->sk_security; struct smack_known *skp = NULL; unsigned short port; struct smack_known *object; if (act == SMK_RECEIVING) { skp = smack_ipv6host_label(address); ...
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
63,512,944,416,426,560,000,000,000,000,000,000,000
53
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 ...
void servers_deinit(void) { signal_remove("chat protocol deinit", (SIGNAL_FUNC) sig_chat_protocol_deinit); servers_setup_deinit(); servers_reconnect_deinit(); module_uniq_destroy("SERVER"); module_uniq_destroy("SERVER CONNECT"); }
0
[ "CWE-20" ]
irssi-proxy
85bbc05b21678e80423815d2ef1dfe26208491ab
35,643,302,127,261,210,000,000,000,000,000,000,000
10
Check if an SSL certificate matches the hostname of the server we are connecting to git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564
verifyStringOrDots(const FileInfo *file, TranslationTableOpcode opcode, int isString, int actionPart, int nofor) { if (!wantsString(opcode, actionPart, nofor) == !isString) return 1; compileError(file, "%s are not allowed in the %s part of a %s translation %s rule.", isString ? "strings" : "dots", getPartName(a...
0
[ "CWE-787" ]
liblouis
2e4772befb2b1c37cb4b9d6572945115ee28630a
169,331,422,509,732,470,000,000,000,000,000,000,000
10
Prevent an invalid memory writes in compileRule Thanks to Han Zheng for reporting it Fixes #1214
static int jpc_pi_nextpcrl(register jpc_pi_t *pi) { int rlvlno; jpc_pirlvl_t *pirlvl; jpc_pchg_t *pchg; int prchind; int prcvind; int *prclyrno; int compno; jpc_picomp_t *picomp; int xstep; int ystep; uint_fast32_t trx0; uint_fast32_t try0; uint_fast32_t r; uint_fast32_t rpx; uint_fast32_t rpy; pchg = ...
1
[ "CWE-125" ]
jasper
99a50593254d1b53002719bbecfc946c84b23d27
329,026,657,363,137,100,000,000,000,000,000,000,000
99
Apply a patch for the following bug report: https://github.com/mdadams/jasper/issues/103 Heap-Buffer-Overflow or Null-pointer-dereference vulnerability due to a programming mistake (off-by-1)
header_put_marker (SF_PRIVATE *psf, int x) { psf->header.ptr [psf->header.indx++] = (x >> 24) ; psf->header.ptr [psf->header.indx++] = (x >> 16) ; psf->header.ptr [psf->header.indx++] = (x >> 8) ; psf->header.ptr [psf->header.indx++] = x ; } /* header_put_marker */
0
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
99,412,195,325,163,070,000,000,000,000,000,000,000
6
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages) { struct qstr this = QSTR_INIT("[aio]", 5); struct file *file; struct path path; struct inode *inode = alloc_anon_inode(aio_mnt->mnt_sb); if (IS_ERR(inode)) return ERR_CAST(inode); inode->i_mapping->a_ops = &aio_ctx_aops; inode->i_mappi...
0
[ "CWE-284", "CWE-264" ]
linux
22f6b4d34fcf039c63a94e7670e0da24f8575a5a
170,216,213,996,352,200,000,000,000,000,000,000,000
30
aio: mark AIO pseudo-fs noexec This ensures that do_mmap() won't implicitly make AIO memory mappings executable if the READ_IMPLIES_EXEC personality flag is set. Such behavior is problematic because the security_mmap_file LSM hook doesn't catch this case, potentially permitting an attacker to bypass a W^X policy enfo...
static inline int memcpy_to_msg(struct msghdr *msg, void *data, int len) { return copy_to_iter(data, len, &msg->msg_iter) == len ? 0 : -EFAULT;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
198,499,282,536,797,070,000,000,000,000,000,000,000
4
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
static inline void l2cap_chan_set_err(struct l2cap_chan *chan, int err) { chan->ops->state_change(chan, chan->state, err); }
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
133,639,789,988,578,960,000,000,000,000,000,000,000
4
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
ambsdtar_selfcheck( application_argument_t *argument) { char *option; if (argument->dle.disk) { char *qdisk = quote_string(argument->dle.disk); fprintf(stdout, "OK disk %s\n", qdisk); amfree(qdisk); } printf("OK ambsdtar version %s\n", VERSION); ambsdtar_build_exinclude(&argument->dle, 1, N...
0
[ "CWE-264" ]
amanda
4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7
325,123,731,585,587,070,000,000,000,000,000,000,000
74
* Add a /etc/amanda-security.conf file git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0
create_type_type(agooErr err) { gqlType type; gqlField fields = NULL; gqlField enum_values = NULL; gqlValue dv; gqlType kind_type; gqlType kind_nn; gqlType type_nn; gqlType type_nn_list; gqlType field_type; gqlType field_nn; gqlType field_list; gqlType enum_type; gqlT...
0
[ "CWE-703" ]
agoo
ecb72fa66f3d846b724b4fa1d7648669cebabe0c
176,323,153,532,779,400,000,000,000,000,000,000,000
59
Protect against recursive fragment in schema Really a error on the developers part but this catches the error.
camel_imapx_server_delete_mailbox_sync (CamelIMAPXServer *is, CamelIMAPXMailbox *mailbox, GCancellable *cancellable, GError **error) { CamelIMAPXCommand *ic; CamelIMAPXMailbox *inbox; CamelIMAPXStore *imapx_store; gboolean success; g_return_val_if_fail (CAMEL_IS_IMAPX_SERVER (is), FALSE); g_return...
0
[]
evolution-data-server
f26a6f672096790d0bbd76903db4c9a2e44f116b
150,437,867,325,289,640,000,000,000,000,000,000,000
49
[IMAPx] 'STARTTLS not supported' error ignored When a user has setup the STARTTLS encryption method, but the server doesn't support it, then an error should be shown to the user, instead of using unsecure connection. There had been two bugs in the existing code which prevented this error from being used and the failur...
static bool set_up_field_array(THD *thd, TABLE *table, bool is_sub_part) { Field **ptr, *field, **field_array; uint num_fields= 0; uint size_field_array; uint i= 0; uint inx; partition_info *part_info= table->part_info; int result= FALSE; DBUG_ENTER("set_up_field_array"); ...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
238,992,634,107,531,360,000,000,000,000,000,000,000
120
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
TEST(IndexBoundsBuilderTest, TypeStringOrNumberHasCorrectBounds) { auto testIndex = buildSimpleIndexEntry(); BSONObj obj = fromjson("{a: {$type: ['string', 'number']}}"); auto expr = parseMatchExpression(obj); BSONElement elt = obj.firstElement(); OrderedIntervalList oil; IndexBoundsBuilder::Bo...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
205,413,959,205,954,250,000,000,000,000,000,000,000
19
SERVER-44377 generate correct plan for indexed inequalities to null
uint ha_partition::alter_table_flags(uint flags) { uint flags_to_return, flags_to_check; DBUG_ENTER("ha_partition::alter_table_flags"); flags_to_return= ht->alter_table_flags(flags); flags_to_return|= m_file[0]->alter_table_flags(flags); /* If one partition fails we must be able to revert the change fo...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
106,029,088,218,381,110,000,000,000,000,000,000,000
39
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
static int interactive_check_cert (X509 *cert, int idx, int len, SSL *ssl, int allow_always) { static const int part[] = { NID_commonName, /* CN */ NID_pkcs9_emailAddress, /* Email */ NID_organizationName, /* O */ NID_organizationalUnitName, /* OU */ NID_localityName,...
0
[ "CWE-74" ]
mutt
c547433cdf2e79191b15c6932c57f1472bfb5ff4
135,085,849,110,724,470,000,000,000,000,000,000,000
176
Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP...
struct razer_report razer_chroma_misc_get_dpi_stages(unsigned char variable_storage) { struct razer_report report = get_razer_report(0x04, 0x86, 0x26); report.arguments[0] = variable_storage; return report; }
0
[ "CWE-787" ]
openrazer
7e8a04feb378a679f1bcdcae079a5100cc45663b
275,353,043,446,230,600,000,000,000,000,000,000,000
8
Fix oob memcpy in matrix_custom_frame methods Adjust row_length if it exeeds the arguments array
lldpd_af_from_lldp_proto(int proto) { switch (proto) { case LLDP_MGMT_ADDR_IP4: return LLDPD_AF_IPV4; case LLDP_MGMT_ADDR_IP6: return LLDPD_AF_IPV6; default: return LLDPD_AF_UNSPEC; } }
0
[ "CWE-400" ]
ovs
78e712c0b1dacc2f12d2a03d98f083d8672867f0
122,668,735,317,935,840,000,000,000,000,000,000,000
11
lldp: do not leak memory on multiple instances of TLVs Upstream commit: commit a8d3c90feca548fc0656d95b5d278713db86ff61 Date: Tue, 17 Nov 2020 09:28:17 -0500 lldp: avoid memory leak from bad packets A packet that contains multiple instances of certain TLVs will cause lldpd to continually allocate...
FontView *FontNew(void) { return( FontView_Create(SplineFontNew(),false)); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
129,102,911,400,535,710,000,000,000,000,000,000,000
3
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
TEST_F(QueryPlannerTest, CompoundIndexBoundsNotEqualsNullReverseIndex) { addIndex(BSON("a" << 1 << "b" << -1 << "c" << 1)); runQuery(fromjson("{a: {$gt: 'foo'}, b: {$ne: null}, c: {$ne: null}}")); assertNumSolutions(2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists( "{fet...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
325,426,765,213,974,800,000,000,000,000,000,000,000
23
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
int nla_put_labels(struct sk_buff *skb, int attrtype, u8 labels, const u32 label[]) { struct nlattr *nla; struct mpls_shim_hdr *nla_label; bool bos; int i; nla = nla_reserve(skb, attrtype, labels*4); if (!nla) return -EMSGSIZE; nla_label = nla_data(nla); bos = true; for (i = labels - 1; i >= 0; i--) { ...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
259,802,858,816,781,900,000,000,000,000,000,000,000
20
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...
struct inode *ilookup5_nowait(struct super_block *sb, unsigned long hashval, int (*test)(struct inode *, void *), void *data) { struct hlist_head *head = inode_hashtable + hash(sb, hashval); struct inode *inode; spin_lock(&inode_hash_lock); inode = find_inode(sb, head, test, data); spin_unlock(&inode_hash_lock)...
0
[ "CWE-416" ]
tip
8019ad13ef7f64be44d4f892af9c840179009254
261,808,400,762,255,400,000,000,000,000,000,000,000
12
futex: Fix inode life-time issue As reported by Jann, ihold() does not in fact guarantee inode persistence. And instead of making it so, replace the usage of inode pointers with a per boot, machine wide, unique inode identifier. This sequence number is global, but shared (file backed) futexes are rare enough that thi...
static int proc_sys_setattr(struct dentry *dentry, struct iattr *attr) { struct inode *inode = d_inode(dentry); int error; if (attr->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID)) return -EPERM; error = setattr_prepare(dentry, attr); if (error) return error; setattr_copy(inode, attr); mark_inode_dirty(inod...
0
[ "CWE-20", "CWE-399" ]
linux
93362fa47fe98b62e4a34ab408c4a418432e7939
56,657,131,592,967,530,000,000,000,000,000,000,000
16
sysctl: Drop reference added by grab_header in proc_sys_readdir Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference added by grab_header when return from !dir_emit_dots path. It can cause any path called unregister_sysctl_table will wait forever. The calltrace of CVE-2016-9191: [ 5535.960522] Call Trace: [ ...
static inline int ioc_batching(struct request_queue *q, struct io_context *ioc) { if (!ioc) return 0; /* * Make sure the process is able to allocate at least 1 request * even if the batch times out, otherwise we could theoretically * lose wakeups. */ return ioc->nr_batch_requests == q->nr_batching || (i...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
54,102,909,541,182,060,000,000,000,000,000,000,000
14
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
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; struct list_head *ptype_list = &ptype_all; rcu_read_lock(); again: list_for_each_entry_rcu(ptype, ptype_list, list) { /* Never send packets back to...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
17,193,594,871,944,235,000,000,000,000,000,000,000
61
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
free_varlist( struct ctl_var *kv ) { struct ctl_var *k; if (kv) { for (k = kv; !(k->flags & EOV); k++) free((void *)(intptr_t)k->text); free((void *)kv); } }
0
[ "CWE-22" ]
ntp
184516e143ce4448ddb5b9876dd372008cc779f6
155,296,793,364,517,570,000,000,000,000,000,000,000
11
[TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command.
int ff_thread_ref_frame(ThreadFrame *dst, ThreadFrame *src) { int ret; dst->owner[0] = src->owner[0]; dst->owner[1] = src->owner[1]; ret = av_frame_ref(dst->f, src->f); if (ret < 0) return ret; av_assert0(!dst->progress); if (src->progress && !(dst->progress = av_buffer_r...
0
[ "CWE-476" ]
FFmpeg
8df6884832ec413cf032dfaa45c23b1c7876670c
212,139,502,945,708,940,000,000,000,000,000,000,000
21
avcodec/utils: Check close before calling it Fixes: NULL pointer dereference Fixes: 15733/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IDF_fuzzer-5658616977162240 Reviewed-by: Paul B Mahol <onemda@gmail.com> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signe...
FindCmd() : BasicCommand("find") {}
0
[ "CWE-20" ]
mongo
d315547544d7146b93a8e6e94cc4b88cd0d19c95
62,128,981,521,234,040,000,000,000,000,000,000,000
1
SERVER-38275 ban explain with UUID
void PackLinuxElf64::un_shlib_1( OutputFile *const fo, Elf64_Phdr *const phdro, unsigned &c_adler, unsigned &u_adler, Elf64_Phdr const *const dynhdr, unsigned const orig_file_size, unsigned const szb_info ) { // The first PT_LOAD. Part is not compressed (for benefit of rtld.) fi->se...
0
[ "CWE-476", "CWE-415" ]
upx
90279abdfcd235172eab99651043051188938dcc
147,215,241,667,132,130,000,000,000,000,000,000,000
111
PackLinuxElf::canUnpack must checkEhdr() for ELF input https://github.com/upx/upx/issues/485 modified: p_lx_elf.cpp
static int inode_has_perm_noadp(const struct cred *cred, struct inode *inode, u32 perms, unsigned flags) { struct common_audit_data ad; struct selinux_audit_data sad = {0,}; COMMON_AUDIT_DATA_INIT(&ad, INODE); ad.u.inode = inode; ad.selinux_audit_data = &sad; return inode_has_perm(cred, inode, perms,...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
338,789,641,420,333,200,000,000,000,000,000,000,000
13
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
int MAIN(int argc, char **argv) { ENGINE *e = NULL; char **args; char *host = NULL, *port = NULL, *path = "/"; char *reqin = NULL, *respin = NULL; char *reqout = NULL, *respout = NULL; char *signfile = NULL, *keyfile = NULL; char *rsignfile = NULL, *rkeyfile = NULL; char *outfile = NULL; int add_nonce = 1, no...
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
162,803,763,229,106,620,000,000,000,000,000,000,000
807
Backport OCSP fixes.
int usb_get_bos_descriptor(struct usb_device *dev) { struct device *ddev = &dev->dev; struct usb_bos_descriptor *bos; struct usb_dev_cap_header *cap; unsigned char *buffer; int length, total_len, num, i; int ret; bos = kzalloc(sizeof(struct usb_bos_descriptor), GFP_KERNEL); if (!bos) return -ENOMEM; /* Get...
0
[ "CWE-125" ]
linux
1c0edc3633b56000e18d82fc241e3995ca18a69e
270,677,740,078,785,120,000,000,000,000,000,000,000
101
USB: core: fix out-of-bounds access bug in usb_get_bos_descriptor() Andrey used the syzkaller fuzzer to find an out-of-bounds memory access in usb_get_bos_descriptor(). The code wasn't checking that the next usb_dev_cap_header structure could fit into the remaining buffer space. This patch fixes the error and also r...