func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
file_close(ref * pfile) { stream *s; if (file_is_valid(s, pfile)) { /* closing a closed file is a no-op */ if (sclose(s)) return_error(gs_error_ioerror); } return 0; }
0
[ "CWE-200" ]
ghostpdl
ab109aaeb3ddba59518b036fb288402a65cf7ce8
228,647,050,678,615,000,000,000,000,000,000,000,000
10
Bug 694724: Have filenameforall and getenv honor SAFER
int32_t dmar_assign_irte(const struct intr_source *intr_src, union dmar_ir_entry *irte, uint16_t idx_in, uint16_t *idx_out) { struct dmar_drhd_rt *dmar_unit; union dmar_ir_entry *ir_table, *ir_entry; union pci_bdf sid; uint64_t trigger_mode; int32_t ret = -EINVAL; if (intr_src->is_msi) { dmar_unit = device_to...
0
[ "CWE-120", "CWE-787" ]
acrn-hypervisor
25c0e3817eb332660dd63d1d4522e63dcc94e79a
233,461,942,279,521,000,000,000,000,000,000,000,000
64
hv: validate input for dmar_free_irte function Malicious input 'index' may trigger buffer overflow on array 'irte_alloc_bitmap[]'. This patch validate that 'index' shall be less than 'CONFIG_MAX_IR_ENTRIES' and also remove unnecessary check on 'index' in 'ptirq_free_irte()' function with this fix. Tracked-On: ...
static loff_t sisusb_lseek(struct file *file, loff_t offset, int orig) { struct sisusb_usb_data *sisusb; loff_t ret; sisusb = file->private_data; if (!sisusb) return -ENODEV; mutex_lock(&sisusb->lock); /* Sanity check */ if (!sisusb->present || !sisusb->ready || !sisusb->sisusb_dev) { mutex_unlock(&sisusb...
0
[ "CWE-476" ]
linux
9a5729f68d3a82786aea110b1bfe610be318f80a
84,803,831,077,931,155,000,000,000,000,000,000,000
22
USB: sisusbvga: fix oops in error path of sisusb_probe The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum <oneukum@suse.com> Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail...
QPDFWriter::writeObjectStream(QPDFObjectHandle object) { // Note: object might be null if this is a place-holder for an // object stream that we are generating from scratch. QPDFObjGen old_og = object.getObjGen(); assert(old_og.getGen() == 0); int old_id = old_og.getObj(); int new_id = this->m-...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
35,625,794,004,386,817,000,000,000,000,000,000,000
157
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
archive_read_data_skip(struct archive *_a) { struct archive_read *a = (struct archive_read *)_a; int r; const void *buff; size_t size; int64_t offset; archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_DATA, "archive_read_data_skip"); if (a->format->read_data_skip != NULL) r = (a->format->read_da...
0
[ "CWE-125" ]
libarchive
e6c9668f3202215ddb71617b41c19b6f05acf008
298,098,208,055,119,070,000,000,000,000,000,000,000
26
Add a check to archive_read_filter_consume to reject any attempts to move the file pointer by a negative amount. Note: Either this or commit 3865cf2 provides a fix for Issue 394.
void addCopy(const LowerCaseString& key, uint64_t value) override { header_map_->addCopy(key, value); header_map_->verifyByteSizeInternalForTest(); }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
230,725,240,412,376,820,000,000,000,000,000,000,000
4
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
EXPORTED int annotate_state_store(annotate_state_t *state, struct entryattlist *l) { int r = 0; struct entryattlist *e = l; struct attvaluelist *av; annotate_state_start(state); /* Build a list of callbacks for storing the annotations */ while (e) { int attribs; const annotate_...
0
[ "CWE-732" ]
cyrus-imapd
621f9e41465b521399f691c241181300fab55995
63,002,952,487,324,540,000,000,000,000,000,000,000
120
annotate: don't allow everyone to write shared server entries
void ipc_print_size(int unit, char *msg, uint64_t size, const char *end, int width) { char format[32]; if (!msg) /* NULL */ ; else if (msg[strlen(msg) - 1] == '=') printf("%s", msg); else if (unit == IPC_UNIT_BYTES) printf(_("%s (bytes) = "), msg); else if (unit == IPC_UNIT_KB) printf(_("%s (kbytes)...
0
[ "CWE-190" ]
util-linux
1c9143d0c1f979c3daf10e1c37b5b1e916c22a1c
30,893,775,040,525,440,000,000,000,000,000,000,000
42
sys-utils/ipcutils: be careful when call calloc() for uint64 nmembs Fix: https://github.com/karelzak/util-linux/issues/1395 Signed-off-by: Karel Zak <kzak@redhat.com>
rl_save_prompt () { saved_local_prompt = local_prompt; saved_local_prefix = local_prompt_prefix; saved_prefix_length = prompt_prefix_length; saved_local_length = local_prompt_len; saved_last_invisible = prompt_last_invisible; saved_visible_length = prompt_visible_length; saved_invis_chars_first_line = pro...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
289,004,047,752,624,850,000,000,000,000,000,000,000
16
bash-4.4-rc2 release
struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) { struct hrtimer_clock_base *base; for (;;) { base = timer->base; if (likely(base != NULL)) { spin_lock_irqsave(&base->cpu_base->lock, *flags); if (likely(base == timer->base)) return base; /* T...
0
[ "CWE-189" ]
linux-2.6
13788ccc41ceea5893f9c747c59bc0b28f2416c2
127,314,044,178,947,930,000,000,000,000,000,000,000
17
[PATCH] hrtimer: prevent overrun DoS in hrtimer_forward() hrtimer_forward() does not check for the possible overflow of timer->expires. This can happen on 64 bit machines with large interval values and results currently in an endless loop in the softirq because the expiry value becomes negative and therefor the timer...
TEST_F(RouterTest, PoolFailureWithPriority) { ON_CALL(callbacks_.route_->route_entry_, priority()) .WillByDefault(Return(Upstream::ResourcePriority::High)); EXPECT_CALL(cm_.thread_local_cluster_, httpConnPool(Upstream::ResourcePriority::High, _, &router_)); EXPECT_CALL(cm_.thread_local_cluster...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
65,704,780,293,927,495,000,000,000,000,000,000,000
34
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
_pixops_composite_real (guchar *dest_buf, int render_x0, int render_y0, int render_x1, int render_y1, int dest_rowstride, int dest_channels, gboolean dest_has_alpha, const guchar *src_buf, int ...
0
[ "CWE-119" ]
gdk-pixbuf
19f9685dbff7d1f929c61cf99188df917a18811d
85,965,447,314,316,300,000,000,000,000,000,000,000
73
pixops: Fail make_weights functions on OOM The weights could grow very large under certain circumstances, in particular in security-relevant conditions, including the testsuite. By allowing the weight allocation to fail, this can be worked around. https://bugzilla.gnome.org/show_bug.cgi?id=754387
static bool generic_new(struct nf_conn *ct, const struct sk_buff *skb, unsigned int dataoff, unsigned int *timeouts) { return nf_generic_should_process(nf_ct_protonum(ct)); }
0
[ "CWE-20", "CWE-254", "CWE-787" ]
linux
db29a9508a9246e77087c5531e45b2c88ec6988b
282,202,583,077,554,280,000,000,000,000,000,000,000
5
netfilter: conntrack: disable generic tracking for known protocols Given following iptables ruleset: -P FORWARD DROP -A FORWARD -m sctp --dport 9 -j ACCEPT -A FORWARD -p tcp --dport 80 -j ACCEPT -A FORWARD -p tcp -m conntrack -m state ESTABLISHED,RELATED -j ACCEPT One would assume that this allows SCTP on port 9 and...
Item_bool_rowready_func2* Ge_creator::create(THD *thd, Item *a, Item *b) const { return new(thd->mem_root) Item_func_ge(thd, a, b); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
34,176,650,511,819,973,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
router_add_exit_policy(routerinfo_t *router, directory_token_t *tok) { addr_policy_t *newe; newe = router_parse_addr_policy(tok); if (!newe) return -1; if (! router->exit_policy) router->exit_policy = smartlist_create(); if (((tok->tp == K_ACCEPT6 || tok->tp == K_REJECT6) && tor_addr_family(&n...
0
[ "CWE-399" ]
tor
57e35ad3d91724882c345ac709666a551a977f0f
99,306,528,084,952,400,000,000,000,000,000,000,000
24
Avoid possible segfault when handling networkstatus vote with bad flavor Fix for 6530; fix on 0.2.2.6-alpha.
AcceptConnReq(ptcplstn_t *pLstn, int *newSock, prop_t **peerName, prop_t **peerIP) { int sockflags; struct sockaddr_storage addr; socklen_t addrlen = sizeof(addr); int iNewSock = -1; DEFiRet; iNewSock = accept(pLstn->sock, (struct sockaddr*) &addr, &addrlen); if(iNewSock < 0) { if(errno == EAGAIN || errno ==...
0
[ "CWE-190" ]
rsyslog
0381a0de64a5a048c3d48b79055bd9848d0c7fc2
287,576,574,911,028,300,000,000,000,000,000,000,000
47
imptcp: fix Segmentation Fault when octet count is to high
static int tipc_nl_retrieve_key(struct nlattr **attrs, struct tipc_aead_key **key) { struct nlattr *attr = attrs[TIPC_NLA_NODE_KEY]; if (!attr) return -ENODATA; *key = (struct tipc_aead_key *)nla_data(attr); if (nla_len(attr) < tipc_aead_key_size(*key)) return -EINVAL; return 0; }
1
[]
linux
0217ed2848e8538bcf9172d97ed2eeb4a26041bb
284,003,867,985,169,170,000,000,000,000,000,000,000
14
tipc: better validate user input in tipc_nl_retrieve_key() Before calling tipc_aead_key_size(ptr), we need to ensure we have enough data to dereference ptr->keylen. We probably also want to make sure tipc_aead_key_size() wont overflow with malicious ptr->keylen values. Syzbot reported: BUG: KMSAN: uninit-value in _...
FLAC__bool read_subframe_lpc_(FLAC__StreamDecoder *decoder, unsigned channel, unsigned bps, const unsigned order, FLAC__bool do_full_decode) { FLAC__Subframe_LPC *subframe = &decoder->private_->frame.subframes[channel].data.lpc; FLAC__int32 i32; FLAC__uint32 u32; unsigned u; decoder->private_->frame.subframes[cha...
0
[ "CWE-119" ]
flac
5b3033a2b355068c11fe637e14ac742d273f076e
184,015,670,015,576,500,000,000,000,000,000,000,000
87
src/libFLAC/stream_decoder.c : Fix buffer read overflow. This is CVE-2014-8962. Reported-by: Michele Spagnuolo, Google Security Team <mikispag@google.com>
static struct buffer_head *minix_update_inode(struct inode *inode) { if (INODE_VERSION(inode) == MINIX_V1) return V1_minix_update_inode(inode); else return V2_minix_update_inode(inode); }
0
[ "CWE-189" ]
linux-2.6
f5fb09fa3392ad43fbcfc2f4580752f383ab5996
271,128,992,984,491,080,000,000,000,000,000,000,000
7
[PATCH] Fix for minix crash Mounting a (corrupt) minix filesystem with zero s_zmap_blocks gives a spectacular crash on my 2.6.17.8 system, no doubt because minix/inode.c does an unconditional minix_set_bit(0,sbi->s_zmap[0]->b_data); [akpm@osdl.org: make labels conistent while we're there] Signed-off-by: Andrew Mort...
mlx5_rx_queue_lwm_query(struct rte_eth_dev *dev, uint16_t *queue_id, uint8_t *lwm) { struct mlx5_priv *priv = dev->data->dev_private; unsigned int rxq_id, found = 0, n; struct mlx5_rxq_priv *rxq; if (!queue_id) return -EINVAL; /* Query all the Rx queues of the port in a circular way. */ for (rxq_id = *queue...
0
[]
dpdk
60b254e3923d007bcadbb8d410f95ad89a2f13fa
208,663,495,112,602,560,000,000,000,000,000,000,000
26
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...
dse_add(Slapi_PBlock *pb) /* JCM There should only be one exit point from this function! */ { Slapi_Entry *e = NULL; /*The new entry to add*/ Slapi_Entry *e_copy = NULL; /* copy of added entry */ char *errbuf = NULL; int rc = LDAP_SUCCESS; int error = -1; int dont_write_file = 0; /* default...
0
[ "CWE-200", "CWE-203" ]
389-ds-base
b6aae4d8e7c8a6ddd21646f94fef1bf7f22c3f32
3,425,452,480,417,442,700,000,000,000,000,000,000
228
Issue 4609 - CVE - info disclosure when authenticating Description: If you bind as a user that does not exist. Error 49 is returned instead of error 32. As error 32 discloses that the entry does not exist. When you bind as an entry that does not have userpassword set then ...
sv_compquery (value) const char *value; { int nval = 100; if (value && *value) { nval = atoi (value); if (nval < 0) nval = 0; } rl_completion_query_items = nval; return 0; }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
292,850,595,951,406,500,000,000,000,000,000,000,000
14
bash-4.4-rc2 release
static int crypt_check_data_device_size(struct crypt_device *cd) { int r; uint64_t size, size_min; /* Check data device size, require at least header or one sector */ size_min = crypt_get_data_offset(cd) << SECTOR_SHIFT ?: SECTOR_SIZE; r = device_size(cd->device, &size); if (r < 0) return r; if (size < size...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
63,016,684,676,285,700,000,000,000,000,000,000,000
20
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static inline int cidr(u128_t u) { uint64_t v; int n = 0; for(v = u.l; v > 0; v <<= 1) n++; for(v = u.h; v > 0; v <<= 1) n++; return n; }
0
[]
netmask
29a9c239bd1008363f5b34ffd6c2cef906f3660c
113,567,616,822,292,610,000,000,000,000,000,000,000
7
bump version to 2.4.4 * remove checks for negative unsigned ints, fixes #2 * harden error logging functions, fixes #3
bfad_im_vport_create(struct fc_vport *fc_vport, bool disable) { char *vname = fc_vport->symbolic_name; struct Scsi_Host *shost = fc_vport->shost; struct bfad_im_port_s *im_port = (struct bfad_im_port_s *) shost->hostdata[0]; struct bfad_s *bfad = im_port->bfad; struct bfa_lport_cfg_s port_cfg; struct bfad_vport...
0
[ "CWE-400", "CWE-401" ]
linux
0e62395da2bd5166d7c9e14cbc7503b256a34cb0
63,876,084,689,527,575,000,000,000,000,000,000,000
87
scsi: bfa: release allocated memory in case of error In bfad_im_get_stats if bfa_port_get_stats fails, allocated memory needs to be released. Link: https://lore.kernel.org/r/20190910234417.22151-1-navid.emamdoost@gmail.com Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Martin K. Petersen <m...
static int event_enable_on_exec(struct perf_event *event, struct perf_event_context *ctx) { if (!event->attr.enable_on_exec) return 0; event->attr.enable_on_exec = 0; if (event->state >= PERF_EVENT_STATE_INACTIVE) return 0; __perf_event_mark_enabled(event); return 1; }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
53,325,618,025,275,090,000,000,000,000,000,000,000
14
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
void __init parse_efi_setup(u64 phys_addr, u32 data_len) { efi_setup = phys_addr + sizeof(struct setup_data); }
0
[ "CWE-388" ]
tip
4e78921ba4dd0aca1cc89168f45039add4183f8e
278,577,639,939,192,100,000,000,000,000,000,000,000
4
efi/x86/Add missing error handling to old_memmap 1:1 mapping code The old_memmap flow in efi_call_phys_prolog() performs numerous memory allocations, and either does not check for failure at all, or it does but fails to propagate it back to the caller, which may end up calling into the firmware with an incomplete 1:1 ...
lzw_result lzw_decode(struct lzw_ctx *ctx, const uint8_t ** const stack_pos_out) { lzw_result res; uint32_t code_new; uint32_t code_out; uint8_t last_value; uint8_t *stack_pos = ctx->stack_base; uint32_t clear_code = ctx->clear_code; uint32_t current_entry = ctx->current_entry; struct lzw_dictionary_entry * c...
1
[ "CWE-125", "CWE-787" ]
chafa
e6ce3746cdcf0836b9dae659a5aed15d73a080d8
160,716,953,605,882,430,000,000,000,000,000,000,000
77
libnsgif: fix oob in lzw_decode
auto join(const Range& range, const BasicCStringRef<wchar_t>& sep) -> ArgJoin<wchar_t, decltype(std::begin(range))> { return join(std::begin(range), std::end(range), sep); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
84,225,324,220,804,750,000,000,000,000,000,000,000
4
Fix segfault on complex pointer formatting (#642)
static unsigned unfilterScanline(unsigned char* recon, const unsigned char* scanline, const unsigned char* precon, size_t bytewidth, unsigned char filterType, size_t length) { /* For PNG filter method 0 unfilter a PNG image scanline by scanline. when the pixels are smaller than 1 ...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
39,982,992,284,612,744,000,000,000,000,000,000,000
73
Fixed #5645: realloc return handling
TEST_F(OptimizePipeline, PushDownAddFieldsAndInternalizeProjection) { auto unpackSpecObj = fromjson( "{$_internalUnpackBucket: { exclude: [], timeField: 'time', metaField: 'myMeta', " "bucketMaxSpanSeconds: 3600}}"); auto addFieldsSpec = fromjson("{$addFields: {device: '$myMeta.a'}}"); auto ...
0
[]
mongo
b3107d73a2c58d7e016b834dae0acfd01c0db8d7
46,977,243,234,375,070,000,000,000,000,000,000,000
21
SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt (cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec)
Magick_png_write_raw_profile(const ImageInfo *image_info,png_struct *ping, png_info *ping_info, unsigned char *profile_type, unsigned char *profile_description, unsigned char *profile_data, png_uint_32 length) { png_textp text; register ssize_t i; unsigned char *sp; png_charp dp...
0
[ "CWE-416" ]
ImageMagick
916d7bbd2c66a286d379dbd94bc6035c8fab937c
188,147,178,923,437,720,000,000,000,000,000,000,000
88
Removed invalid free reported in #1791.
static inline int rq_prio(const struct i915_request *rq) { return rq->sched.attr.priority; }
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
114,164,387,313,520,040,000,000,000,000,000,000,000
4
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
int main(void) { timelib_time time = timelib_strtotime("May 12"); printf ("%04d-%02d-%02d %02d:%02d:%02d.%-5d %+04d %1d", time.y, time.m, time.d, time.h, time.i, time.s, time.f, time.z, time.dst); if (time.have_relative) { printf ("%3dY %3dM %3dD / %3dH %3dM %3dS", time.relative.y, time.relative.m, time.rela...
0
[ "CWE-125" ]
php-src
5c0455bf2c8cd3c25401407f158e820aa3b239e1
166,366,902,792,720,720,000,000,000,000,000,000,000
18
Merge branch 'PHP-7.0' into PHP-7.1 * PHP-7.0: Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian() Apply upstream patch for CVE-2016-1283
CImg<T>& draw_object3d(const float x0, const float y0, const float z0, const CImg<tp>& vertices, const CImgList<tf>& primitives, const CImgList<tc>& colors, const CImg<to>& opacities, const unsigned int render_type=4, ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
233,149,263,711,203,560,000,000,000,000,000,000,000
12
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
xfs_da_get_buf( struct xfs_trans *trans, struct xfs_inode *dp, xfs_dablk_t bno, xfs_daddr_t mappedbno, struct xfs_buf **bpp, int whichfork) { struct xfs_buf *bp; struct xfs_buf_map map; struct xfs_buf_map *mapp; int nmap; int error; *bpp = NULL; mapp = &map; nmap = 1; error = xfs_dabuf_map(tra...
0
[ "CWE-399" ]
linux
c88547a8119e3b581318ab65e9b72f27f23e641d
215,767,002,941,368,700,000,000,000,000,000,000,000
42
xfs: fix directory hash ordering bug Commit f5ea1100 ("xfs: add CRCs to dir2/da node blocks") introduced in 3.10 incorrectly converted the btree hash index array pointer in xfs_da3_fixhashpath(). It resulted in the the current hash always being compared against the first entry in the btree rather than the current bloc...
print_ets_priority_assignment_table(netdissect_options *ndo, const u_char *ptr) { ND_PRINT((ndo, "\n\t Priority Assignment Table")); ND_PRINT((ndo, "\n\t Priority : 0 1 2 3 4 5 6 7")); ND_PRINT((ndo, "\n\t Value : %-3d %-3d %-3d %-3d %-3d %-3d ...
0
[ "CWE-399", "CWE-835" ]
tcpdump
34cec721d39c76be1e0a600829a7b17bdfb832b6
182,532,385,677,213,400,000,000,000,000,000,000,000
9
CVE-2017-12997/LLDP: Don't use an 8-bit loop counter. If you have a for (i = 0; i < N; i++) loop, you'd better make sure that i is big enough to hold N - not N-1, N. The TLV length here is 9 bits long, not 8 bits long, so an 8-bit loop counter will overflow and you can loop infinitely. This fixes an infinite loop...
static int check_if_fs_block(e2fsck_t ctx, blk64_t test_block) { ext2_filsys fs = ctx->fs; blk64_t first_block; dgrp_t i; first_block = fs->super->s_first_data_block; for (i = 0; i < fs->group_desc_count; i++) { /* Check superblocks/block group descriptors */ if (ext2fs_bg_has_super(fs, i)) { if (test_blo...
0
[ "CWE-787" ]
e2fsprogs
71ba13755337e19c9a826dfc874562a36e1b24d3
333,150,298,019,765,230,000,000,000,000,000,000,000
32
e2fsck: don't try to rehash a deleted directory If directory has been deleted in pass1[bcd] processing, then we shouldn't try to rehash the directory in pass 3a when we try to rehash/reoptimize directories. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
evdev_device_destroy(struct evdev_device *device) { struct evdev_dispatch *dispatch; dispatch = device->dispatch; if (dispatch) dispatch->interface->destroy(dispatch); if (device->base.group) libinput_device_group_unref(device->base.group); free(device->output_name); filter_destroy(device->pointer.filter);...
1
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
233,009,499,611,614,730,000,000,000,000,000,000,000
20
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
static const char *unset_define(cmd_parms *cmd, void *dummy, const char *name) { int i; const char **defines; if (cmd->parent && ap_cstr_casecmp(cmd->parent->directive, "<VirtualHost")) { return apr_pstrcat(cmd->pool, cmd->cmd->name, " is not valid in ", ...
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
337,708,904,166,541,930,000,000,000,000,000,000,000
32
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
fr_window_archive_remove (FrWindow *window, GList *file_list) { _archive_operation_started (window, FR_ACTION_DELETING_FILES); fr_window_clipboard_remove_file_list (window, file_list); fr_archive_remove (window->archive, file_list, window->priv->compression, window->priv->cancellable, ...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
203,171,988,638,855,440,000,000,000,000,000,000,000
12
libarchive: sanitize filenames before extracting
static int del_instruction_bp(struct task_struct *child, int slot) { switch (slot) { case 1: if ((child->thread.debug.dbcr0 & DBCR0_IAC1) == 0) return -ENOENT; if (dbcr_iac_range(child) & DBCR_IAC12MODE) { /* address range - clear slots 1 & 2 */ child->thread.debug.iac2 = 0; dbcr_iac_range(child) &= ...
0
[ "CWE-119", "CWE-787" ]
linux
c1fa0768a8713b135848f78fd43ffc208d8ded70
57,476,745,450,682,420,000,000,000,000,000,000,000
54
powerpc/tm: Flush TM only if CPU has TM feature Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump") added code to access TM SPRs in flush_tmregs_to_thread(). However flush_tmregs_to_thread() does not check if TM feature is available on CPU before trying to access TM SPRs in order to copy live state to th...
static int check_revocation(X509_STORE_CTX *ctx) { int i, last, ok; if (!(ctx->param->flags & X509_V_FLAG_CRL_CHECK)) return 1; if (ctx->param->flags & X509_V_FLAG_CRL_CHECK_ALL) last = sk_X509_num(ctx->chain) - 1; else { /* If checking CRL paths this isn't the EE certificate */ ...
0
[ "CWE-119" ]
openssl
370ac320301e28bb615cee80124c042649c95d14
20,567,017,783,438,325,000,000,000,000,000,000,000
21
Fix length checks in X509_cmp_time to avoid out-of-bounds reads. Also tighten X509_cmp_time to reject more than three fractional seconds in the time; and to reject trailing garbage after the offset. CVE-2015-1789 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
static int sha1write_ewah_helper(void *f, const void *buf, size_t len) { /* sha1write will die on error */ sha1write(f, buf, len); return len; }
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
99,111,532,716,796,560,000,000,000,000,000,000,000
6
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
static int io_req_defer(struct io_kiocb *req) { const struct io_uring_sqe *sqe = req->submit.sqe; struct io_uring_sqe *sqe_copy; struct io_ring_ctx *ctx = req->ctx; /* Still need defer if there is pending req in defer list. */ if (!req_need_defer(req) && list_empty(&ctx->defer_list)) return 0; sqe_copy = kmal...
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
283,246,668,487,464,280,000,000,000,000,000,000,000
30
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
void __do_SAK(struct tty_struct *tty) { #ifdef TTY_SOFT_SAK tty_hangup(tty); #else struct task_struct *g, *p; struct pid *session; int i; struct file *filp; struct fdtable *fdt; if (!tty) return; session = tty->session; tty_ldisc_flush(tty); tty_driver_flush_buffer(tty); read_lock(&tasklist_lock); /*...
0
[ "CWE-703" ]
linux
c290f8358acaeffd8e0c551ddcc24d1206143376
219,579,124,427,884,700,000,000,000,000,000,000,000
66
TTY: drop driver reference in tty_open fail path When tty_driver_lookup_tty fails in tty_open, we forget to drop a reference to the tty driver. This was added by commit 4a2b5fddd5 (Move tty lookup/reopen to caller). Fix that by adding tty_driver_kref_put to the fail path. I will refactor the code later. This is for ...
static void test_list_fields() { MYSQL_RES *result; int rc; myheader("test_list_fields"); rc= mysql_query(mysql, "drop table if exists t1"); myquery(rc); rc= mysql_query(mysql, "create table t1(c1 int primary key auto_increment, c2 char(10) default 'mysql')"); myquery(rc); result= mysql_list_fields(m...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
126,720,944,772,274,080,000,000,000,000,000,000,000
29
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
unsigned int fib6_tables_seq_read(struct net *net) { unsigned int h, fib_seq = 0; rcu_read_lock(); for (h = 0; h < FIB6_TABLE_HASHSZ; h++) { struct hlist_head *head = &net->ipv6.fib_table_hash[h]; struct fib6_table *tb; hlist_for_each_entry_rcu(tb, head, tb6_hlist) fib_seq += tb->fib_seq; } rcu_read_unl...
0
[ "CWE-755" ]
linux
7b09c2d052db4b4ad0b27b97918b46a7746966fa
298,891,813,944,462,080,000,000,000,000,000,000,000
16
ipv6: fix a typo in fib6_rule_lookup() Yi Ren reported an issue discovered by syzkaller, and bisected to the cited commit. Many thanks to Yi, this trivial patch does not reflect the patient work that has been done. Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic") Signed-off-by: Eric Du...
directory_fetches_dir_info_early(const or_options_t *options) { return directory_fetches_from_authorities(options); }
0
[]
tor
02e05bd74dbec614397b696cfcda6525562a4675
61,626,608,119,380,040,000,000,000,000,000,000,000
4
When examining descriptors as a dirserver, reject ones with bad versions This is an extra fix for bug 21278: it ensures that these descriptors and platforms will never be listed in a legit consensus.
static void oidc_store_access_token_expiry(request_rec *r, oidc_session_t *session, int expires_in) { if (expires_in != -1) { oidc_session_set(r, session, OIDC_ACCESSTOKEN_EXPIRES_SESSION_KEY, apr_psprintf(r->pool, "%" APR_TIME_T_FMT, apr_time_sec(apr_time_now()) + expires_in)); } }
0
[ "CWE-20" ]
mod_auth_openidc
612e309bfffd6f9b8ad7cdccda3019fc0865f3b4
84,786,935,758,190,270,000,000,000,000,000,000,000
8
don't echo query params on invalid requests to redirect URI; closes #212 thanks @LukasReschke; I'm sure there's some OWASP guideline that warns against this
evbuffer_prepend(struct evbuffer *buf, const void *data, size_t datlen) { struct evbuffer_chain *chain, *tmp; int result = -1; EVBUFFER_LOCK(buf); if (buf->freeze_start) { goto done; } chain = buf->first; if (chain == NULL) { chain = evbuffer_chain_new(datlen); if (!chain) goto done; evbuffer_chai...
1
[ "CWE-189" ]
libevent
841ecbd96105c84ac2e7c9594aeadbcc6fb38bc4
205,549,976,137,883,870,000,000,000,000,000,000,000
72
Fix CVE-2014-6272 in Libevent 2.1 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
request_is_satisfied (NautilusDirectory *directory, NautilusFile *file, Request request) { if (REQUEST_WANTS_TYPE (request, REQUEST_METAFILE) && !nautilus_directory_is_metadata_read (directory)) { return FALSE; } if (REQUEST_WANTS_TYPE (request, REQUEST_FILE_LIST) && !(directory->details...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
333,077,908,743,512,000,000,000,000,000,000,000,000
77
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-...
gst_matroska_demux_parse_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml, GstMatroskaTrackContext ** dest_context) { GstMatroskaTrackContext *context; GstCaps *caps = NULL; GstTagList *cached_taglist; GstFlowReturn ret; guint32 id, riff_fourcc = 0; guint16 riff_audio_fmt = 0; gchar *codec = NULL;...
0
[]
gst-plugins-good
9181191511f9c0be6a89c98b311f49d66bd46dc3
74,880,478,367,994,630,000,000,000,000,000,000,000
954
matroskademux: Fix extraction of multichannel WavPack The old code had a couple of issues that all lead to potential memory safety bugs. - Use a constant for the Wavpack4Header size instead of using sizeof. It's written out into the data and not from the struct and who knows what special alignment/padding r...
bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu) { return false; }
0
[ "CWE-476" ]
linux
ac64115a66c18c01745bbd3c47a36b124e5fd8c0
112,613,547,845,533,980,000,000,000,000,000,000,000
4
KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM The following program causes a kernel oops: #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/ioctl.h> #include <linux/kvm.h> main() { int fd = open("/dev/kvm", O_RDWR); ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM); } This happe...
void update_process_times(int user_tick) { struct task_struct *p = current; /* Note: this timer irq context must be accounted for as well. */ account_process_tick(p, user_tick); run_local_timers(); rcu_sched_clock_irq(user_tick); #ifdef CONFIG_IRQ_WORK if (in_irq()) irq_work_tick(); #endif scheduler_tick(); ...
1
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
33,405,367,387,359,627,000,000,000,000,000,000,000
16
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
CallResult<PseudoHandle<>> JSObject::getNamedOrIndexed( Handle<JSObject> selfHandle, Runtime *runtime, SymbolID name, PropOpFlags opFlags) { if (LLVM_UNLIKELY(selfHandle->flags_.indexedStorage)) { // Note that getStringView can be satisfied without materializing the // Identifier. const au...
0
[ "CWE-843", "CWE-125" ]
hermes
fe52854cdf6725c2eaa9e125995da76e6ceb27da
156,171,224,441,989,490,000,000,000,000,000,000,000
21
[CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain. Summary: The change in the hermes repository fixes the security vulnerability CVE-2020-1911. This vulnerability only affects applications which allow evaluation of uncontrolled, untrusted JavaScript code not shipped wit...
do_sigaltstack (const stack_t *ss, stack_t *oss, unsigned long sp, size_t min_ss_size) { struct task_struct *t = current; if (oss) { memset(oss, 0, sizeof(stack_t)); oss->ss_sp = (void __user *) t->sas_ss_sp; oss->ss_size = t->sas_ss_size; oss->ss_flags = sas_ss_flags(sp) | (current->sas_ss_flags & SS_F...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
322,723,707,172,343,580,000,000,000,000,000,000,000
41
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
static inline unsigned long task_util(struct task_struct *p) { return READ_ONCE(p->se.avg.util_avg); }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
148,177,954,197,687,270,000,000,000,000,000,000,000
4
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi) { char err_buff[MAX_SLAVE_ERRMSG]; const char* errmsg= 0; int err_code= 0; int version_number=0; version_number= atoi(mysql->server_version); MYSQL_RES *master_res= 0; MYSQL_ROW master_row; DBUG_ENTER("get_master_version_and_clock")...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
63,090,636,556,568,560,000,000,000,000,000,000,000
599
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
UserId PostgreSqlStorage::validateUser(const QString &user, const QString &password) { QSqlQuery query(logDb()); query.prepare(queryString("select_authuser")); query.bindValue(":username", user); query.bindValue(":password", cryptedPassword(password)); safeExec(query); if (query.first()) { ...
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
177,573,777,897,282,250,000,000,000,000,000,000,000
15
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL. Properly detects whether Qt performs slash escaping in SQL queries or not, and then configures PostgreSQL accordingly. This bug was a introduced due to a bugfix in Qt 4.8.5 disables slash escaping when binding queries: https://bugreports.qt-project.org/brows...
static int aesni_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) { EVP_AES_HMAC_SHA1 *key = data(ctx); switch (type) { case EVP_CTRL_AEAD_SET_MAC_KEY: { unsigned int i; unsigned char hmac_key[64]; memset(...
0
[ "CWE-310" ]
openssl
4159f311671cf3bac03815e5de44681eb758304a
80,015,426,840,685,070,000,000,000,000,000,000,000
70
Check that we have enough padding characters. Reviewed-by: Emilia Käsper <emilia@openssl.org> CVE-2016-2107 MR: #2572
void ion_buffer_destroy(struct ion_buffer *buffer) { if (WARN_ON(buffer->kmap_cnt > 0)) buffer->heap->ops->unmap_kernel(buffer->heap, buffer); buffer->heap->ops->unmap_dma(buffer->heap, buffer); buffer->heap->ops->free(buffer); vfree(buffer->pages); kfree(buffer); }
0
[ "CWE-416", "CWE-284" ]
linux
9590232bb4f4cc824f3425a6e1349afbe6d6d2b7
291,650,511,169,005,970,000,000,000,000,000,000,000
9
staging/android/ion : fix a race condition in the ion driver There is a use-after-free problem in the ion driver. This is caused by a race condition in the ion_ioctl() function. A handle has ref count of 1 and two tasks on different cpus calls ION_IOC_FREE simultaneously. cpu 0 cpu ...
static void ip_do_redirect(struct dst_entry *dst, struct sock *sk, struct sk_buff *skb) { struct rtable *rt; struct flowi4 fl4; const struct iphdr *iph = (const struct iphdr *) skb->data; int oif = skb->dev->ifindex; u8 tos = RT_TOS(iph->tos); u8 prot = iph->protocol; u32 mark = skb->mark; rt = (struct rtable ...
0
[ "CWE-17" ]
linux
df4d92549f23e1c037e83323aff58a21b3de7fe0
18,690,591,146,979,014,000,000,000,000,000,000,000
15
ipv4: try to cache dst_entries which would cause a redirect Not caching dst_entries which cause redirects could be exploited by hosts on the same subnet, causing a severe DoS attack. This effect aggravated since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()"). Lookups causing redirects will be allocated...
void MirrorJob::SetNewerThan(const char *f) { struct timespec ts; if(parse_datetime(&ts,f,0)) { newer_than=ts.tv_sec; return; } struct stat st; if(stat(f,&st)==-1) { perror(f); return; } newer_than=st.st_mtime; }
0
[ "CWE-20", "CWE-401" ]
lftp
a27e07d90a4608ceaf928b1babb27d4d803e1992
58,925,930,516,285,440,000,000,000,000,000,000,000
16
mirror: prepend ./ to rm and chmod arguments to avoid URL recognition (fix #452)
static int ext4_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) { handle_t *handle; struct inode *inode; int err, retries = 0; retry: handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3 + 2*EXT4_QUOTA_INIT_BLOCKS...
0
[ "CWE-20" ]
linux-2.6
e6b8bc09ba2075cd91fbffefcd2778b1a00bd76f
243,142,511,089,158,330,000,000,000,000,000,000,000
30
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...
int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype, void *value) { return (add_attribute(&(p7si->unauth_attr), nid, atrtype, value)); }
0
[]
openssl
c0334c2c92dd1bc3ad8138ba6e74006c3631b0f9
39,313,430,913,168,270,000,000,000,000,000,000,000
5
PKCS#7: avoid NULL pointer dereferences with missing content In PKCS#7, the ASN.1 content component is optional. This typically applies to inner content (detached signatures), however we must also handle unexpected missing outer content correctly. This patch only addresses functions reachable from parsing, decryption...
nth_rtt(struct delegpt_addr* result_list, size_t num_results, size_t n) { int rtt_band; size_t i; int* rtt_list, *rtt_index; if(num_results < 1 || n >= num_results) { return -1; } rtt_list = calloc(num_results, sizeof(int)); if(!rtt_list) { log_err("malloc failure: allocating rtt_list"); return -1; } ...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
95,492,616,393,351,850,000,000,000,000,000,000,000
32
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
composite_line(int y, int start, CompositeDeepScanLine::Data * _Data, vector<const char *> & names, const vector<vector< vector<float *> > > & pointers, const vector<unsigned int> & total_sizes, const vector<unsigned int> & num_s...
0
[ "CWE-787" ]
openexr
7d0ef6617f5b5622276458cc5a21d8b859ca7c5b
45,851,358,346,062,390,000,000,000,000,000,000,000
83
enforce xSampling/ySampling==1 in CompositeDeepScanLine (#1209) Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
String* Item_user_var_as_out_param::val_str(String *str) { DBUG_ASSERT(0); return 0; }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
3,391,680,406,339,697,600,000,000,000,000,000,000
5
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
handle_connection(GArray *servers, int net, SERVER *serve, CLIENT *client) { int sock_flags_old; int sock_flags_new; if(serve->max_connections > 0 && g_hash_table_size(children) >= serve->max_connections) { msg(LOG_INFO, "Max connections reached"); goto handle_connection_out; } if((sock_flags_old = fcntl(...
0
[ "CWE-399", "CWE-310" ]
nbd
741495cb08503fd32a9d22648e63b64390c601f4
255,204,032,700,084,000,000,000,000,000,000,000,000
91
nbd-server: handle modern-style negotiation in a child process Previously, the modern style negotiation was carried out in the root server (listener) process before forking the actual client handler. This made it possible for a malfunctioning or evil client to terminate the root process simply by querying a non-existe...
static int sc_open_snapd_tool(const char *tool_name) { // +1 is for the case where the link is exactly PATH_MAX long but we also // want to store the terminating '\0'. The readlink system call doesn't add // terminating null, but our initialization of buf handles this for us. char buf[PATH_MAX + 1] = { 0 }; if (re...
1
[ "CWE-94" ]
snapd
54e71e7750f73a28f5a47fe04dd058360e24c0e9
31,291,114,531,416,730,000,000,000,000,000,000,000
26
cmd/libsnap-confine-private: Defend against hardlink attacks When snap-confine goes to execute other helper binaries (snap-update-ns etc) via sc_open_snapd_tool(), these other binaries are located relative to the currently executing snap-confine process via /proc/self/exe. Since it is possible for regular users to har...
TEST_F(Http1ServerConnectionImplTest, ConnectRequestNoContentLength) { initialize(); InSequence sequence; NiceMock<MockRequestDecoder> decoder; EXPECT_CALL(callbacks_, newStream(_, _)).WillOnce(ReturnRef(decoder)); TestRequestHeaderMapImpl expected_headers{ {":authority", "host:80"}, {":method",...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
247,865,990,892,991,820,000,000,000,000,000,000,000
21
[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>
SPICE_GNUC_VISIBLE void spice_server_char_device_wakeup(SpiceCharDeviceInstance* sin) { if (!sin->st) { spice_warning("no RedCharDevice attached to instance %p", sin); return; } sin->st->wakeup(); }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
77,184,349,024,624,150,000,000,000,000,000,000,000
8
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
void PsdImage::setComment(const std::string& /*comment*/) { // not supported throw(Error(kerInvalidSettingForImage, "Image comment", "Photoshop")); }
0
[ "CWE-125" ]
exiv2
68966932510213b5656fcf433ab6d7e26f48e23b
301,145,635,459,936,700,000,000,000,000,000,000,000
5
PSD: Use Safe::add for preventing overflows in PSD files
static void io_sq_thread_finish(struct io_ring_ctx *ctx) { struct io_sq_data *sqd = ctx->sq_data; if (sqd) { complete(&sqd->startup); if (sqd->thread) { wait_for_completion(&ctx->sq_thread_comp); io_sq_thread_park(sqd); } mutex_lock(&sqd->ctx_lock); list_del(&ctx->sqd_list); io_sqd_update_thread_...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
7,132,504,189,233,719,000,000,000,000,000,000,000
23
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
uint32_t ConnectionImpl::getHeadersSize() { return current_header_field_.size() + current_header_value_.size() + headersOrTrailers().byteSize(); }
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
161,733,430,145,834,190,000,000,000,000,000,000,000
4
[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>
mrb_init_gc(mrb_state *mrb) { struct RClass *gc; gc = mrb_define_module(mrb, "GC"); mrb_define_class_method(mrb, gc, "start", gc_start, MRB_ARGS_NONE()); mrb_define_class_method(mrb, gc, "enable", gc_enable, MRB_ARGS_NONE()); mrb_define_class_method(mrb, gc, "disable", gc_disable, MRB_ARGS_NONE()); mrb_de...
0
[ "CWE-416" ]
mruby
5c114c91d4ff31859fcd84cf8bf349b737b90d99
123,104,976,648,730,440,000,000,000,000,000,000,000
21
Clear unused stack region that may refer freed objects; fix #3596
static void r_bin_mdmp_free_pe64_bin(void *pe_bin_) { struct Pe64_r_bin_mdmp_pe_bin *pe_bin = pe_bin_; if (pe_bin) { sdb_free (pe_bin->bin->kv); Pe64_r_bin_pe_free (pe_bin->bin); R_FREE (pe_bin); } }
0
[ "CWE-400", "CWE-703" ]
radare2
27fe8031782d3a06c3998eaa94354867864f9f1b
308,279,724,617,153,240,000,000,000,000,000,000,000
8
Fix DoS in the minidump parser ##crash * Reported by lazymio via huntr.dev * Reproducer: mdmp-dos
bool CWebServer::IsIdxForUser(const WebEmSession *pSession, const int Idx) { if (pSession->rights == 2) return true; if (pSession->rights == 0) return false; //viewer //User int iUser = FindUser(pSession->username.c_str()); if ((iUser < 0) || (iUser >= (int)m_users.size())) return false; ...
0
[ "CWE-89" ]
domoticz
ee70db46f81afa582c96b887b73bcd2a86feda00
173,826,019,874,775,400,000,000,000,000,000,000,000
17
Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!)
static bool vsock_in_bound_table(struct vsock_sock *vsk) { bool ret; spin_lock_bh(&vsock_table_lock); ret = __vsock_in_bound_table(vsk); spin_unlock_bh(&vsock_table_lock); return ret; }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
114,988,402,329,857,270,000,000,000,000,000,000,000
10
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
void jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); #if !defined(HAVE_VLA) jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; #else jpc_fix_t splitbuf[bufsize]; #endif jpc_fix_t *buf = splitbuf; register jpc_fix_t *srcptr; register jpc_fix_t *dstptr; reg...
1
[ "CWE-119" ]
jasper
0d64bde2b3ba7e1450710d540136a8ce4199ef30
112,564,715,432,232,300,000,000,000,000,000,000,000
67
CVE-2014-8158
static int lstat_cache_matchlen(struct cache_def *cache, const char *name, int len, int *ret_flags, int track_flags, int prefix_len_stat_func) { int match_len, last_slash, last_slash_dir, previous_slash; int save_flags, ret; struct stat st; if (cache->track_flags != track_flags || cache->prefix_le...
0
[ "CWE-59", "CWE-61" ]
git
684dd4c2b414bcf648505e74498a608f28de4592
335,248,407,679,593,300,000,000,000,000,000,000,000
116
checkout: fix bug that makes checkout follow symlinks in leading path Before checking out a file, we have to confirm that all of its leading components are real existing directories. And to reduce the number of lstat() calls in this process, we cache the last leading path known to contain only directories. However, wh...
void CairoImage::setImage (cairo_surface_t *image) { if (this->image) cairo_surface_destroy (this->image); this->image = cairo_surface_reference (image); }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
318,451,778,393,966,180,000,000,000,000,000,000,000
5
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
jas_matrix_t *jas_matrix_create(int numrows, int numcols) { jas_matrix_t *matrix; int i; if (numrows < 0 || numcols < 0) { return 0; } if (!(matrix = jas_malloc(sizeof(jas_matrix_t)))) { return 0; } matrix->flags_ = 0; matrix->numrows_ = numrows; matrix->numcols_ = numcols; matrix->rows_ = 0; matrix->m...
1
[ "CWE-190" ]
jasper
988f8365f7d8ad8073b6786e433d34c553ecf568
50,172,536,044,950,610,000,000,000,000,000,000,000
51
Fixed an integer overflow problem.
string t_go_generator::type_to_enum(t_type* type) { type = get_true_type(type); if (type->is_base_type()) { t_base_type::t_base tbase = ((t_base_type*)type)->get_base(); switch (tbase) { case t_base_type::TYPE_VOID: throw "NO T_VOID CONSTRUCT"; case t_base_type::TYPE_STRING: /* this i...
0
[ "CWE-77" ]
thrift
2007783e874d524a46b818598a45078448ecc53e
1,337,754,148,378,799,000,000,000,000,000,000,000
50
THRIFT-3893 Command injection in format_go_output Client: Go Patch: Jens Geyer
real_uptime(const routerinfo_t *router, time_t now) { if (now < router->cache_info.published_on) return router->uptime; else return router->uptime + (now - router->cache_info.published_on); }
0
[]
tor
02e05bd74dbec614397b696cfcda6525562a4675
219,920,705,486,932,340,000,000,000,000,000,000,000
7
When examining descriptors as a dirserver, reject ones with bad versions This is an extra fix for bug 21278: it ensures that these descriptors and platforms will never be listed in a legit consensus.
log_message(__attribute__((unused)) const struct mg_connection *conn, const char *message) { puts(message); return 1; }
0
[ "CWE-787" ]
rsyslog
89955b0bcb1ff105e1374aad7e0e993faa6a038f
274,843,733,577,849,200,000,000,000,000,000,000,000
5
net bugfix: potential buffer overrun
stop_redo_ins(void) { block_redo = FALSE; }
0
[ "CWE-78" ]
vim
53575521406739cf20bbe4e384d88e7dca11f040
41,354,604,167,981,983,000,000,000,000,000,000,000
4
patch 8.1.1365: source command doesn't check for the sandbox Problem: Source command doesn't check for the sandbox. (Armin Razmjou) Solution: Check for the sandbox when sourcing a file.
TEST_P(Http2FloodMitigationTest, PriorityIdleStream) { beginSession(); floodServer(Http2Frame::makePriorityFrame(0, 1), "http2.inbound_priority_frames_flood"); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
314,708,865,129,407,770,000,000,000,000,000,000,000
5
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
cpuacct_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) { struct cpuacct *ca = cgroup_ca(cgrp); free_percpu(ca->cpuusage); kfree(ca); }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
138,153,645,374,871,920,000,000,000,000,000,000,000
7
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
irc_server_get_prefix_char_index (struct t_irc_server *server, char prefix_char) { const char *prefix_chars; char *pos; if (server) { prefix_chars = irc_server_get_prefix_chars (server); pos = strchr (prefix_chars, prefix_char); if (pos) ...
0
[ "CWE-120", "CWE-787" ]
weechat
40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f
160,381,135,832,606,100,000,000,000,000,000,000,000
16
irc: fix crash when a new message 005 is received with longer nick prefixes Thanks to Stuart Nevans Locke for reporting the issue.
void MainWindow::changeDeinterlacer(bool checked, const char* method) { if (checked) { MLT.videoWidget()->setProperty("deinterlace_method", method); if (MLT.consumer()) { MLT.consumer()->set("deinterlace_method", method); MLT.refreshConsumer(); } } Settings.se...
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
117,686,082,234,929,670,000,000,000,000,000,000,000
11
fix upgrade check is not using TLS correctly
static uint64_t pauth_addpac(CPUARMState *env, uint64_t ptr, uint64_t modifier, ARMPACKey *key, bool data) { ARMMMUIdx mmu_idx = arm_stage1_mmu_idx(env); ARMVAParameters param = aa64_va_parameters(env, ptr, mmu_idx, data); uint64_t pac, ext_ptr, ext, test; int bot_bit, top_b...
0
[]
qemu
de0b1bae6461f67243282555475f88b2384a1eb9
297,222,922,252,852,300,000,000,000,000,000,000,000
45
target/arm: Fix PAuth sbox functions In the PAC computation, sbox was applied over wrong bits. As this is a 4-bit sbox, bit index should be incremented by 4 instead of 16. Test vector from QARMA paper (https://eprint.iacr.org/2016/444.pdf) was used to verify one computation of the pauth_computepac() function which us...
static int dio_complete(struct dio *dio, loff_t offset, int ret) { ssize_t transferred = 0; /* * AIO submission can race with bio completion to get here while * expecting to have the last io completed by bio completion. * In that case -EIOCBQUEUED is in fact not an error we want * to preserve through this ca...
0
[]
linux-2.6
848c4dd5153c7a0de55470ce99a8e13a63b4703f
121,016,058,585,493,910,000,000,000,000,000,000,000
37
dio: zero struct dio with kzalloc instead of manually This patch uses kzalloc to zero all of struct dio rather than manually trying to track which fields we rely on being zero. It passed aio+dio stress testing and some bug regression testing on ext3. This patch was introduced by Linus in the conversation that lead u...
static void openssl_init(RedLinkInfo *link) { unsigned long f4 = RSA_F4; link->tiTicketing.bn = BN_new(); if (!link->tiTicketing.bn) { red_dump_openssl_errors(); spice_error("OpenSSL BIGNUMS alloc failed"); } BN_set_word(link->tiTicketing.bn, f4); }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
53,470,443,655,271,810,000,000,000,000,000,000,000
12
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
static int check_func_call(struct bpf_verifier_env *env, struct bpf_insn *insn, int *insn_idx) { int subprog, target_insn; target_insn = *insn_idx + insn->imm + 1; subprog = find_subprog(env, target_insn); if (subprog < 0) { verbose(env, "verifier bug. No program starts at insn %d\n", target_insn); re...
0
[ "CWE-125" ]
bpf
049c4e13714ecbca567b4d5f6d563f05d431c80e
278,157,303,789,884,900,000,000,000,000,000,000,000
15
bpf: Fix alu32 const subreg bound tracking on bitwise operations Fix a bug in the verifier's scalar32_min_max_*() functions which leads to incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops. When both the src & dst subreg is a known constant, then the assumption is that scalar_min_max_*() will...
GF_Box *name_box_new() { ISOM_DECL_BOX_ALLOC(GF_NameBox, GF_ISOM_BOX_TYPE_NAME); return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
185,430,293,651,278,340,000,000,000,000,000,000,000
5
fixed #1587
int CJSON_CDECL main(void) { UNITY_BEGIN(); RUN_TEST(cjson_array_foreach_should_loop_over_arrays); RUN_TEST(cjson_array_foreach_should_not_dereference_null_pointer); RUN_TEST(cjson_get_object_item_should_get_object_items); RUN_TEST(cjson_get_object_item_case_sensitive_should_get_object_items); ...
1
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
319,360,317,052,336,300,000,000,000,000,000,000,000
26
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
static inline void vring_used_idx_set(VirtQueue *vq, uint16_t val) { hwaddr pa; pa = vq->vring.used + offsetof(VRingUsed, idx); stw_phys(&address_space_memory, pa, val); }
0
[ "CWE-94" ]
qemu
cc45995294b92d95319b4782750a3580cabdbc0c
193,322,799,884,319,150,000,000,000,000,000,000,000
6
virtio: out-of-bounds buffer write on invalid state load CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in virtio_load@hw/virtio/virtio.c So we have this code since way back when: num = qemu_get_be32(f); for (i = 0; i < num; i++) { vdev->vq[i].vring.num = qemu_get_be32(f); array of vqs has size ...
printer_notify_hf_index(int field) { int result = -1; switch(field) { case PRINTER_NOTIFY_SERVER_NAME: result = hf_servername; break; case PRINTER_NOTIFY_PRINTER_NAME: result = hf_printername; break; case PRINTER_NOTIFY_SHARE_NAME: result = hf_sharename; break; case PRINTER_NOTIFY_PORT_NAME: result...
0
[ "CWE-399" ]
wireshark
b4d16b4495b732888e12baf5b8a7e9bf2665e22b
326,223,743,599,785,830,000,000,000,000,000,000,000
42
SPOOLSS: Try to avoid an infinite loop. Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make sure our offset always increments in dissect_spoolss_keybuffer. Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793 Reviewed-on: https://code.wireshark.org/review/14687 Reviewed-by: Gerald Combs <gerald@wires...