func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
TEST_F(ConnectionManagerUtilityTest, MergeSlashesDefaultOff) {
ON_CALL(config_, shouldNormalizePath()).WillByDefault(Return(true));
ON_CALL(config_, shouldMergeSlashes()).WillByDefault(Return(false));
TestRequestHeaderMapImpl original_headers;
original_headers.setPath("/xyz///abc");
TestRequestHeaderMapImpl ... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 66,576,844,060,566,360,000,000,000,000,000,000,000 | 10 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
json_object *LUKS2_get_tokens_jobj(struct luks2_hdr *hdr)
{
json_object *jobj_tokens;
if (!hdr || !json_object_object_get_ex(hdr->jobj, "tokens", &jobj_tokens))
return NULL;
return jobj_tokens;
} | 0 | [
"CWE-787"
] | cryptsetup | 52f5cb8cedf22fb3e14c744814ec8af7614146c7 | 305,731,601,118,752,320,000,000,000,000,000,000,000 | 9 | Check segment gaps regardless of heap space.
Segments are validated in hdr_validate_segments. Gaps in segment keys
are detected when collecting offsets. But if an invalid segment is very
large, larger than count, it could happen that cryptsetup is unable to
allocate enough memory, not giving a clue about what actually... |
static unsigned long io_uring_nommu_get_unmapped_area(struct file *file,
unsigned long addr, unsigned long len,
unsigned long pgoff, unsigned long flags)
{
void *ptr;
ptr = io_uring_validate_mmap_request(file, pgoff, len);
if (IS_ERR(ptr))
return PTR_ERR(ptr);
return (unsigned long) ptr; | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 298,769,397,220,660,100,000,000,000,000,000,000,000 | 12 | 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... |
static void tg3_periodic_fetch_stats(struct tg3 *tp)
{
struct tg3_hw_stats *sp = tp->hw_stats;
if (!tp->link_up)
return;
TG3_STAT_ADD32(&sp->tx_octets, MAC_TX_STATS_OCTETS);
TG3_STAT_ADD32(&sp->tx_collisions, MAC_TX_STATS_COLLISIONS);
TG3_STAT_ADD32(&sp->tx_xon_sent, MAC_TX_STATS_XON_SENT);
TG3_STAT_ADD32(&sp... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 45,421,233,995,416,260,000,000,000,000,000,000,000 | 64 | 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 ... |
void CL_DemoFilename( int number, char *fileName, int fileNameSize ) {
int a,b,c,d;
if(number < 0 || number > 9999)
number = 9999;
a = number / 1000;
number -= a*1000;
b = number / 100;
number -= b*100;
c = number / 10;
number -= c*10;
d = number;
Com_sprintf( fileName, fileNameSize, "demo%i%i%i%i"
, ... | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 336,251,817,471,084,880,000,000,000,000,000,000,000 | 17 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
miniflow_extract(struct dp_packet *packet, struct miniflow *dst)
{
const struct pkt_metadata *md = &packet->md;
const void *data = dp_packet_data(packet);
size_t size = dp_packet_size(packet);
uint64_t *values = miniflow_values(dst);
struct mf_ctx mf = { FLOWMAP_EMPTY_INITIALIZER, values,
... | 0 | [
"CWE-400"
] | ovs | 354e7d860e444fd1472541b0fdc3b8678aa74828 | 157,074,627,327,685,300,000,000,000,000,000,000,000 | 336 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
ex_filetype(exarg_T *eap)
{
char_u *arg = eap->arg;
int plugin = FALSE;
int indent = FALSE;
if (*eap->arg == NUL)
{
/* Print current status. */
smsg("filetype detection:%s plugin:%s indent:%s",
filetype_detect ? "ON" : "OFF",
filetype_plugin ? (filetype_detect ? "ON" : "(on)") : "OFF",
... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 286,342,724,738,188,040,000,000,000,000,000,000,000 | 80 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static int __init aun_udp_initialise(void)
{
int error;
struct sockaddr_in sin;
skb_queue_head_init(&aun_queue);
spin_lock_init(&aun_queue_lock);
setup_timer(&ab_cleanup_timer, ab_cleanup, 0);
ab_cleanup_timer.expires = jiffies + (HZ*2);
add_timer(&ab_cleanup_timer);
memset(&sin, 0, sizeof(sin));
sin.sin_por... | 0 | [
"CWE-200"
] | linux-2.6 | 80922bbb12a105f858a8f0abb879cb4302d0ecaa | 321,085,382,330,275,350,000,000,000,000,000,000,000 | 43 | econet: Fix econet_getname() leak
econet_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
__generic_file_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len,
unsigned int flags)
{
struct address_space *mapping = in->f_mapping;
unsigned int loff, nr_pages, req_pages;
struct page *pages[PIPE_DEF_BUFFERS];
struct partial_page partial[PIPE_DEF_BUFFERS];
struct pa... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8d0207652cbe27d1f962050737848e5ad4671958 | 26,658,132,766,099,780,000,000,000,000,000,000,000 | 201 | ->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
it to ->write_iter(). A bunch of simple cases coverted to that...
[AV: fixed the braino spotted by Cyrill]
Signed-off-by: Al Viro <viro@z... |
static int itacns_add_data_files(sc_pkcs15_card_t *p15card)
{
const size_t array_size =
sizeof(itacns_data_files)/sizeof(itacns_data_files[0]);
unsigned int i;
int rv;
sc_pkcs15_data_t *p15_personaldata = NULL;
sc_pkcs15_data_info_t dinfo;
struct sc_pkcs15_object *objs[32];
struct sc_pkcs15_data_info *cinfo;
... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 286,904,736,023,539,860,000,000,000,000,000,000,000 | 88 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
Item *Item_func_case_searched::find_item()
{
uint count= when_count();
for (uint i= 0 ; i < count ; i++)
{
if (args[i]->val_bool())
return args[i + count];
}
Item **pos= Item_func_case_searched::else_expr_addr();
return pos ? pos[0] : 0;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 338,074,077,742,214,520,000,000,000,000,000,000,000 | 11 | 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 ... |
int pop_open_connection(struct PopAccountData *adata)
{
char buf[1024];
int rc = pop_connect(adata);
if (rc < 0)
return rc;
rc = pop_capabilities(adata, 0);
if (rc == -1)
goto err_conn;
if (rc == -2)
return -2;
#ifdef USE_SSL
/* Attempt STLS if available and desired. */
if (!adata->conn->... | 0 | [
"CWE-94",
"CWE-74"
] | neomutt | fb013ec666759cb8a9e294347c7b4c1f597639cc | 303,470,734,513,943,930,000,000,000,000,000,000,000 | 102 | tls: clear data after a starttls acknowledgement
After a starttls acknowledgement message, clear the buffers of any
incoming data / commands. This will ensure that all future data is
handled securely.
Co-authored-by: Pietro Cerutti <gahr@gahr.ch> |
int TNEFParse(TNEFStruct *TNEF) {
WORD key;
DWORD type;
DWORD size;
DWORD signature;
BYTE *data;
WORD checksum, header_checksum;
int i;
if (TNEF->IO.ReadProc == NULL) {
printf("ERROR: Setup incorrectly: No ReadProc\n");
return YTNEF_INCORRECT_SETUP;
}
if (TNEF->IO.InitProc != NULL) {
D... | 1 | [
"CWE-399",
"CWE-125"
] | ytnef | 3cb0f914d6427073f262e1b2b5fd973e3043cdf7 | 116,178,186,470,487,330,000,000,000,000,000,000,000 | 111 | BugFix - Potential OOB with Fields of Size 0
Thanks to @hannob for contributing a malformed TNEF stream with
a Version field of size 0. Now such files will return an error
indicating invalid data. |
int parseRFCSyslogMsg(msg_t *pMsg, int flags)
{
uchar *p2parse;
uchar *pBuf;
int lenMsg;
int bContParse = 1;
BEGINfunc
assert(pMsg != NULL);
assert(pMsg->pszRawMsg != NULL);
p2parse = pMsg->pszRawMsg + pMsg->offAfterPRI; /* point to start of text, after PRI */
lenMsg = pMsg->iLenRawMsg - pMsg->offAfterPRI;
... | 0 | [
"CWE-119"
] | rsyslog | 1ca6cc236d1dabf1633238b873fb1c057e52f95e | 92,841,060,242,718,340,000,000,000,000,000,000,000 | 81 | bugfix: off-by-one(two) bug in legacy syslog parser |
template<typename tp, typename tf, typename tc, typename to, typename tz>
CImg<T>& draw_object3d(LibBoard::Board& board,
const float x0, const float y0, const float z0,
const CImg<tp>& vertices, const CImgList<tf>& primitives,
cons... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 120,300,203,291,390,410,000,000,000,000,000,000,000 | 13 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void snd_timer_notify1(struct snd_timer_instance *ti, int event)
{
struct snd_timer *timer;
unsigned long flags;
unsigned long resolution = 0;
struct snd_timer_instance *ts;
struct timespec tstamp;
if (timer_tstamp_monotonic)
ktime_get_ts(&tstamp);
else
getnstimeofday(&tstamp);
if (snd_BUG_ON(event ... | 0 | [
"CWE-200",
"CWE-362"
] | linux | ee8413b01045c74340aa13ad5bdf905de32be736 | 288,004,982,054,215,420,000,000,000,000,000,000,000 | 33 | ALSA: timer: Fix double unlink of active_list
ALSA timer instance object has a couple of linked lists and they are
unlinked unconditionally at snd_timer_stop(). Meanwhile
snd_timer_interrupt() unlinks it, but it calls list_del() which leaves
the element list itself unchanged. This ends up with unlinking twice,
and i... |
void Config::lang_config_merge(const Config & other,
int which, ParmStr data_encoding)
{
Conv to_utf8;
to_utf8.setup(*this, data_encoding, "utf-8", NormTo);
const Entry * src = other.first_;
Entry * * ip = &first_;
while (src)
{
const KeyInfo * l_ki = ... | 0 | [
"CWE-125"
] | aspell | 80fa26c74279fced8d778351cff19d1d8f44fe4e | 229,029,835,838,484,700,000,000,000,000,000,000,000 | 22 | Fix various bugs found by OSS-Fuze. |
TPM_RESULT SWTPM_NVRAM_SetStateBlob(unsigned char *data,
uint32_t length,
TPM_BOOL is_encrypted,
uint32_t tpm_number SWTPM_ATTR_UNUSED,
uint32_t blobtype)
{
TPM_RESULT res;... | 0 | [
"CWE-125"
] | swtpm | 9f740868fc36761de27df3935513bdebf8852d19 | 22,081,580,730,920,317,000,000,000,000,000,000,000 | 113 | swtpm: Check header size indicator against expected size (CID 375869)
This fix addresses Coverity issue CID 375869.
Check the header size indicated in the header of the state against the
expected size and return an error code in case the header size indicator
is different. There was only one header size so far since ... |
static inline void clear_IF(struct kernel_vm86_regs *regs)
{
VEFLAGS &= ~X86_EFLAGS_VIF;
} | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 128,255,298,814,872,000,000,000,000,000,000,000,000 | 4 | 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(... |
renumber_by_map(Node* node, GroupNumRemap* map)
{
int r = 0;
switch (NTYPE(node)) {
case NT_LIST:
case NT_ALT:
do {
r = renumber_by_map(NCAR(node), map);
} while (r == 0 && IS_NOT_NULL(node = NCDR(node)));
break;
case NT_QTFR:
r = renumber_by_map(NQTFR(node)->target, map);
break;
... | 0 | [
"CWE-125"
] | php-src | c6e34d91b88638966662caac62c4d0e90538e317 | 338,546,760,262,166,180,000,000,000,000,000,000,000 | 28 | Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) |
HttpTransact::set_header_for_transform(State* s, HTTPHdr* base_header)
{
s->hdr_info.transform_response.create(HTTP_TYPE_RESPONSE);
s->hdr_info.transform_response.copy(base_header);
// Nuke the content length since 1) the transform will probably
// change it. 2) it would only be valid for the first transfor... | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 42,933,824,710,562,615,000,000,000,000,000,000,000 | 13 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
GBool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/,
int rotateA, GBool useMediaBox, GBool crop,
int sliceX, int sliceY,
int sliceW, int sliceH,
GBool printing, Catalog *catalog,
GBool (*abortCheckCbk)(void *data),
void *abortCheckCbkData) {
#if HAVE_SPLASH... | 1 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 168,172,445,187,070,730,000,000,000,000,000,000,000 | 300 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
static int tcp_skb_seglen(const struct sk_buff *skb)
{
return tcp_skb_pcount(skb) == 1 ? skb->len : tcp_skb_mss(skb);
} | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 105,030,519,764,399,180,000,000,000,000,000,000,000 | 4 | tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his
linux machines to their limits.
Dont call conn_request() if the TCP flags includes SYN flag
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S... |
static void srpt_unregister_mad_agent(struct srpt_device *sdev)
{
struct ib_port_modify port_modify = {
.clr_port_cap_mask = IB_PORT_DEVICE_MGMT_SUP,
};
struct srpt_port *sport;
int i;
for (i = 1; i <= sdev->device->phys_port_cnt; i++) {
sport = &sdev->port[i - 1];
WARN_ON(sport->port != i);
if (ib_modify... | 0 | [
"CWE-200",
"CWE-476"
] | linux | 51093254bf879bc9ce96590400a87897c7498463 | 273,214,221,665,042,100,000,000,000,000,000,000,000 | 19 | IB/srpt: Simplify srpt_handle_tsk_mgmt()
Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.
This patch fixes the following kernel crash:
BUG: unable to handle kernel NULL pointer... |
gx_finish_output_page(gx_device *dev, int num_copies, int flush)
{
dev->PageCount += num_copies;
return 0;
} | 0 | [] | ghostpdl | 79cccf641486a6595c43f1de1cd7ade696020a31 | 193,953,493,400,957,860,000,000,000,000,000,000,000 | 5 | Bug 699654(2): preserve LockSafetyParams in the nulldevice
The nulldevice does not necessarily use the normal setpagedevice machinery,
but can be set using the nulldevice operator. In which case, we don't preserve
the settings from the original device (in the way setpagedevice does).
Since nulldevice does nothing, th... |
static int irda_data_indication(void *instance, void *sap, struct sk_buff *skb)
{
struct irda_sock *self;
struct sock *sk;
int err;
IRDA_DEBUG(3, "%s()\n", __func__);
self = instance;
sk = instance;
err = sock_queue_rcv_skb(sk, skb);
if (err) {
IRDA_DEBUG(1, "%s(), error: no more mem!\n", __func__);
self... | 0 | [
"CWE-200"
] | linux-2.6 | 09384dfc76e526c3993c09c42e016372dc9dd22c | 173,802,351,767,831,280,000,000,000,000,000,000,000 | 22 | irda: Fix irda_getname() leak
irda_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
int security_sb_kern_mount(struct super_block *sb, int flags, void *data)
{
return security_ops->sb_kern_mount(sb, flags, data);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 311,847,385,690,470,200,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
struct mg_str mg_str_s(const char *s) {
struct mg_str str = {s, s == NULL ? 0 : strlen(s)};
return str;
} | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 328,995,883,534,641,700,000,000,000,000,000,000,000 | 4 | Protect against the directory traversal in mg_upload() |
parse_storage_type (const char *type_string)
{
if (type_string != NULL)
{
g_autofree char *type_low = NULL;
type_low = g_ascii_strdown (type_string, -1);
if (g_strcmp0 (type_low, "network") == 0)
return FLATPAK_DIR_STORAGE_TYPE_NETWORK;
if (g_strcmp0 (type_low, "mmc") == 0)
... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 254,612,311,632,320,850,000,000,000,000,000,000,000 | 22 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
static conn_rec *core_create_conn(apr_pool_t *ptrans, server_rec *s,
apr_socket_t *csd, long id, void *sbh,
apr_bucket_alloc_t *alloc)
{
apr_status_t rv;
apr_pool_t *pool;
conn_rec *c = (conn_rec *) apr_pcalloc(ptrans, sizeof(conn_rec));
... | 0 | [
"CWE-416",
"CWE-284"
] | httpd | 4cc27823899e070268b906ca677ee838d07cf67a | 195,873,284,336,168,900,000,000,000,000,000,000,000 | 73 | 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... |
void tcp_select_initial_window(const struct sock *sk, int __space, __u32 mss,
__u32 *rcv_wnd, __u32 *window_clamp,
int wscale_ok, __u8 *rcv_wscale,
__u32 init_rcv_wnd)
{
unsigned int space = (__space < 0 ? 0 : __space);
/* If no clamp set the clamp to the max possible scaled window */
... | 0 | [
"CWE-416"
] | linux | 7f582b248d0a86bae5788c548d7bb5bca6f7691a | 389,395,651,457,891,050,000,000,000,000,000,000 | 50 | tcp: purge write queue in tcp_connect_init()
syzkaller found a reliable way to crash the host, hitting a BUG()
in __tcp_retransmit_skb()
Malicous MSG_FASTOPEN is the root cause. We need to purge write queue
in tcp_connect_init() at the point we init snd_una/write_seq.
This patch also replaces the BUG() by a less int... |
static CHANNEL_SETUP_REC *create_channel_setup(void)
{
return g_malloc0(sizeof(CHANNEL_SETUP_REC));
} | 0 | [
"CWE-416"
] | irssi | b8d3301d34f383f039071214872570385de1bb59 | 284,410,753,722,442,570,000,000,000,000,000,000,000 | 4 | SASL support
The only supported methods are PLAIN and EXTERNAL, the latter is untested as of
now.
The code gets the values from the keys named sasl_{mechanism,username,password}
specified for each chatnet. |
CacheManager::findAction(char const * action) const
{
Must(action != NULL);
Menu::const_iterator a;
debugs(16, 5, "CacheManager::findAction: looking for action " << action);
for (a = menu_.begin(); a != menu_.end(); ++a) {
if (0 == strcmp((*a)->name, action)) {
debugs(16, 6, " found... | 0 | [
"CWE-401"
] | squid | 26e65059bc06ebce508737b5cd0866478691566a | 329,464,557,163,182,300,000,000,000,000,000,000,000 | 16 | Bug 5106: Broken cache manager URL parsing (#788)
Use already parsed request-target URL in cache manager and
update CacheManager to Tokanizer based URL parse
Removing use of sscan() and regex string processing which have
proven to be problematic on many levels. Most particularly with
regards to tolerance of normally ... |
bgp_tx(sock *sk)
{
struct bgp_conn *conn = sk->data;
DBG("BGP: TX hook\n");
uint max = 1024;
while (--max && (bgp_fire_tx(conn) > 0))
;
if (!max && !ev_active(conn->tx_ev))
ev_schedule(conn->tx_ev);
} | 0 | [
"CWE-787"
] | bird | 1657c41c96b3c07d9265b07dd4912033ead4124b | 260,495,002,618,081,300,000,000,000,000,000,000,000 | 12 | BGP: Fix bugs in handling of shutdown messages
There is an improper check for valid message size, which may lead to
stack overflow and buffer leaks to log when a large message is received.
Thanks to Daniel McCarney for bugreport and analysis. |
ofputil_uninit_group_desc(struct ofputil_group_desc *gd)
{
ofputil_bucket_list_destroy(&gd->buckets);
ofputil_group_properties_destroy(&gd->props);
} | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 311,174,247,741,407,260,000,000,000,000,000,000,000 | 5 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
TFMInfo *get_font_metrics(const char *short_name, int type, const char *filename)
{
TFMPool *tfm = NULL;
int status;
char *file;
if(tfmpool.count) {
tfm = (TFMPool *)mdvi_hash_lookup(&tfmhash,
MDVI_KEY(short_name));
if(tfm != NULL) {
DEBUG((DBG_FONTS, "(mt) reusing metric file `%s' (%d links)\n",
s... | 0 | [
"CWE-20"
] | evince | d4139205b010ed06310d14284e63114e88ec6de2 | 308,017,956,758,407,500,000,000,000,000,000,000,000 | 57 | backends: Fix several security issues in the dvi-backend.
See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643. |
int php_openssl_apply_verification_policy(SSL *ssl, X509 *peer, php_stream *stream TSRMLS_DC) /* {{{ */
{
zval **val = NULL;
char *cnmatch = NULL;
X509_NAME *name;
char buf[1024];
int err;
/* verification is turned off */
if (!(GET_VER_OPT("verify_peer") && zval_is_true(*val))) {
return SUCCESS;
}
if (peer... | 0 | [
"CWE-310"
] | php-src | 16023f3e3b9c06cf677c3c980e8d574e4c162827 | 122,440,061,697,158,400,000,000,000,000,000,000,000 | 72 | Fix bug #70014 - use RAND_bytes instead of deprecated RAND_pseudo_bytes |
int gnutls_alert_send_appropriate(gnutls_session_t session, int err)
{
int alert;
int level;
alert = gnutls_error_to_alert(err, &level);
if (alert < 0) {
return alert;
}
return gnutls_alert_send(session, level, alert);
} | 0 | [
"CWE-310"
] | gnutls | db9a7d810f9ee4c9cc49731f5fd9bdeae68d7eaa | 197,689,086,853,980,950,000,000,000,000,000,000,000 | 12 | handshake: check for TLS_FALLBACK_SCSV
If TLS_FALLBACK_SCSV was sent by the client during the handshake, and
the advertised protocol version is lower than GNUTLS_TLS_VERSION_MAX,
send the "Inappropriate fallback" fatal alert and abort the handshake.
This mechanism was defined in RFC7507. |
static int __init sixpack_init_driver(void)
{
int status;
printk(msg_banner);
/* Register the provided line protocol discipline */
status = tty_register_ldisc(&sp_ldisc);
if (status)
printk(msg_regfail, status);
return status;
} | 0 | [
"CWE-787"
] | linux | 19d1532a187669ce86d5a2696eb7275310070793 | 88,184,856,684,248,760,000,000,000,000,000,000,000 | 13 | net: 6pack: fix slab-out-of-bounds in decode_data
Syzbot reported slab-out-of bounds write in decode_data().
The problem was in missing validation checks.
Syzbot's reproducer generated malicious input, which caused
decode_data() to be called a lot in sixpack_decode(). Since
rx_count_cooked is only 400 bytes and noone... |
static void bprm_fill_uid(struct linux_binprm *bprm, struct file *file)
{
/* Handle suid and sgid on files */
struct inode *inode;
unsigned int mode;
kuid_t uid;
kgid_t gid;
if (!mnt_may_suid(file->f_path.mnt))
return;
if (task_no_new_privs(current))
return;
inode = file->f_path.dentry->d_inode;
mode = ... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 152,051,368,689,398,350,000,000,000,000,000,000,000 | 43 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
ubik_reply_print(netdissect_options *ndo,
register const u_char *bp, int length, int32_t opcode)
{
const struct rx_header *rxh;
if (length < (int)sizeof(struct rx_header))
return;
rxh = (const struct rx_header *) bp;
/*
* Print out the ubik call we're invoking. This table was gleaned
* fr... | 0 | [
"CWE-125"
] | tcpdump | c24922e692a52121e853a84ead6b9337f4c08a94 | 114,651,426,167,550,280,000,000,000,000,000,000,000 | 58 | (for 4.9.3) CVE-2018-14466/Rx: fix an over-read bug
In rx_cache_insert() and rx_cache_find() properly read the serviceId
field of the rx_header structure as a 16-bit integer. When those
functions tried to read 32 bits the extra 16 bits could be outside of
the bounds checked in rx_print() for the rx_header structure, a... |
static void kdb_cpu_status(void)
{
int i, start_cpu, first_print = 1;
char state, prev_state = '?';
kdb_printf("Currently on cpu %d\n", raw_smp_processor_id());
kdb_printf("Available cpus: ");
for (start_cpu = -1, i = 0; i < NR_CPUS; i++) {
if (!cpu_online(i)) {
state = 'F'; /* cpu is offline */
} else if ... | 0 | [
"CWE-787"
] | linux | eadb2f47a3ced5c64b23b90fd2a3463f63726066 | 337,805,748,029,927,470,000,000,000,000,000,000,000 | 44 | lockdown: also lock down previous kgdb use
KGDB and KDB allow read and write access to kernel memory, and thus
should be restricted during lockdown. An attacker with access to a
serial port (for example, via a hypervisor console, which some cloud
vendors provide over the network) could trigger the debugger so it is
i... |
Status SpaceToBatchOpCompute(OpKernelContext* context,
const Tensor& orig_input_tensor,
const Tensor& orig_block_shape,
const Tensor& orig_paddings) {
const int input_dims = orig_input_tensor.dims();
if (!TensorShapeUtils::IsVect... | 0 | [
"CWE-190"
] | tensorflow | acd56b8bcb72b163c834ae4f18469047b001fadf | 76,967,039,109,496,110,000,000,000,000,000,000,000 | 171 | Fix security vulnerability with SpaceToBatchNDOp.
PiperOrigin-RevId: 445527615 |
asmlinkage long sys_oabi_socketcall(int call, unsigned long __user *args)
{
unsigned long r = -EFAULT, a[6];
switch (call) {
case SYS_BIND:
if (copy_from_user(a, args, 3 * sizeof(long)) == 0)
r = sys_oabi_bind(a[0], (struct sockaddr __user *)a[1], a[2]);
break;
case SYS_CONNECT:
if (copy_from_user(a, args... | 0 | [
"CWE-264"
] | linux | 7de249964f5578e67b99699c5f0b405738d820a2 | 180,538,626,755,932,660,000,000,000,000,000,000,000 | 28 | arm: oabi compat: add missing access checks
Add access checks to sys_oabi_epoll_wait() and sys_oabi_semtimedop().
This fixes CVE-2016-3857, a local privilege escalation under
CONFIG_OABI_COMPAT.
Cc: stable@vger.kernel.org
Reported-by: Chiachih Wu <wuchiachih@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
R... |
vim_regexec_prog(
regprog_T **prog,
int ignore_case,
char_u *line,
colnr_T col)
{
int r;
regmatch_T regmatch;
regmatch.regprog = *prog;
regmatch.rm_ic = ignore_case;
r = vim_regexec_string(®match, line, col, FALSE);
*prog = regmatch.regprog;
return r;
} | 0 | [
"CWE-416"
] | vim | 4c13e5e6763c6eb36a343a2b8235ea227202e952 | 265,145,544,090,361,730,000,000,000,000,000,000,000 | 15 | patch 8.2.3949: using freed memory with /\%V
Problem: Using freed memory with /\%V.
Solution: Get the line again after getvvcol(). |
DECLAREContigPutFunc(putcontig8bitYCbCr44tile)
{
uint32* cp1 = cp+w+toskew;
uint32* cp2 = cp1+w+toskew;
uint32* cp3 = cp2+w+toskew;
int32 incr = 3*w+4*toskew;
(void) y;
/* adjust fromskew */
fromskew = (fromskew * 18) / 4;
if ((h & 3) == 0 && (w & 3) == 0) {
for (; h... | 0 | [
"CWE-20"
] | libtiff | 48780b4fcc425cddc4ef8ffdf536f96a0d1b313b | 15,397,172,855,906,397,000,000,000,000,000,000,000 | 102 | * libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile to
avoid UndefinedBehaviorSanitizer warning.
Patch by Nicolás Peña.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2658 |
static handler *myisam_create_handler(handlerton *hton,
TABLE_SHARE *table,
MEM_ROOT *mem_root)
{
return new (mem_root) ha_myisam(hton, table);
} | 0 | [
"CWE-362"
] | mysql-server | 4e5473862e6852b0f3802b0cd0c6fa10b5253291 | 89,141,773,101,331,780,000,000,000,000,000,000,000 | 6 | Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD)
is created. When repair finishes, this file is renamed to the original
.MYD file. The problem was that during this rename, we copied the
stats from the old file to the new file w... |
int nfs4_state_mark_reclaim_nograce(struct nfs_client *clp, struct nfs4_state *state)
{
set_bit(NFS_STATE_RECLAIM_NOGRACE, &state->flags);
clear_bit(NFS_STATE_RECLAIM_REBOOT, &state->flags);
set_bit(NFS_OWNER_RECLAIM_NOGRACE, &state->owner->so_flags);
set_bit(NFS4CLNT_RECLAIM_NOGRACE, &clp->cl_state);
return 1;
} | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 12,524,036,759,819,669,000,000,000,000,000,000,000 | 8 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
Value ExpressionDateFromParts::evaluate(const Document& root) const {
int hour, minute, second, millisecond;
if (!evaluateNumberWithinRange(root, _hour.get(), "hour"_sd, 0, 0, 24, &hour) ||
!evaluateNumberWithinRange(root, _minute.get(), "minute"_sd, 0, 0, 59, &minute) ||
!evaluateNumberWithinR... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 156,995,796,882,895,280,000,000,000,000,000,000,000 | 47 | SERVER-38070 fix infinite loop in agg expression |
void CLASS kodak_65000_load_raw()
{
short buf[256];
int row, col, len, pred[2], ret, i;
for (row=0; row < height; row++)
{
#ifdef LIBRAW_LIBRARY_BUILD
checkCancel();
#endif
for (col=0; col < width; col+=256) {
pred[0] = pred[1] = 0;
len = MIN (256, width-col);
ret = kodak_65000_decode... | 0 | [
"CWE-119",
"CWE-125",
"CWE-787"
] | LibRaw | d13e8f6d1e987b7491182040a188c16a395f1d21 | 281,742,020,088,408,330,000,000,000,000,000,000,000 | 27 | CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access |
static __poll_t io_uring_poll(struct file *file, poll_table *wait)
{
struct io_ring_ctx *ctx = file->private_data;
__poll_t mask = 0;
poll_wait(file, &ctx->poll_wait, wait);
/*
* synchronizes with barrier from wq_has_sleeper call in
* io_commit_cqring
*/
smp_rmb();
if (!io_sqring_full(ctx))
mask |= EPOL... | 0 | [
"CWE-125"
] | linux | 89c2b3b74918200e46699338d7bcc19b1ea12110 | 87,200,555,195,928,270,000,000,000,000,000,000,000 | 32 | io_uring: reexpand under-reexpanded iters
[ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900
[ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task
syz-executor.0/828
[ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted
5.14.0-rc3-next-20210730 #1
[ 74.216525] Hardware n... |
asn1_decode_simple_der (unsigned int etype, const unsigned char *der,
unsigned int _der_len, const unsigned char **str,
unsigned int *str_len)
{
int tag_len, len_len;
const unsigned char *p;
int der_len = _der_len;
unsigned char class;
unsigned long tag;
long ret;
if (der == NULL || der_len == 0)
... | 0 | [
"CWE-119"
] | libtasn1 | f979435823a02f842c41d49cd41cc81f25b5d677 | 233,255,568,977,514,700,000,000,000,000,000,000,000 | 48 | _asn1_extract_der_octet: prevent past of boundary access
Reported by Hanno Böck. |
void mainwindow_set_size(MAIN_WINDOW_REC *window, int height, int resize_lower)
{
height -= window->height;
if (height < 0)
mainwindow_shrink(window, -height, resize_lower);
else
mainwindow_grow(window, height, resize_lower);
} | 0 | [
"CWE-476"
] | irssi | 5b5bfef03596d95079c728f65f523570dd7b03aa | 291,342,232,720,475,200,000,000,000,000,000,000,000 | 8 | check the error condition of mainwindow_create |
//! Fill sequentially all pixel values with specified values \newinstance.
CImg<T> get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4) const {
return CImg<T>(_width,_height,_depth,_spectrum).fill(val0,val1,val2,val3,val4); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 129,078,365,611,206,120,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
unsigned long __fdget_raw(unsigned int fd)
{
return __fget_light(fd, 0);
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 59,385,400,017,492,800,000,000,000,000,000,000,000 | 4 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
cmd_time (const char *com, const char *val, void *place)
{
double number, mult;
const char *end = val + strlen (val);
/* Strip trailing whitespace. */
while (val < end && c_isspace (end[-1]))
--end;
if (val == end)
{
err:
fprintf (stderr, _("%s: %s: Invalid time period %s\n"),
... | 0 | [
"CWE-22"
] | wget | 18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7 | 277,229,759,529,857,600,000,000,000,000,000,000,000 | 54 | CVE-2014-4877: Arbitrary Symlink Access
Wget was susceptible to a symlink attack which could create arbitrary
files, directories or symbolic links and set their permissions when
retrieving a directory recursively through FTP. This commit changes the
default settings in Wget such that Wget no longer creates local symbo... |
static int annotate_dbname_mailbox(struct mailbox *mailbox, char **fnamep)
{
const char *conf_fname;
if (!mailbox) return annotate_dbname_mbentry(NULL, fnamep);
conf_fname = mailbox_meta_fname(mailbox, META_ANNOTATIONS);
if (!conf_fname) return IMAP_MAILBOX_BADNAME;
*fnamep = xstrdup(conf_fname);
... | 0 | [
"CWE-732"
] | cyrus-imapd | 621f9e41465b521399f691c241181300fab55995 | 189,106,689,519,051,100,000,000,000,000,000,000,000 | 12 | annotate: don't allow everyone to write shared server entries |
static void sock_diag_rcv(struct sk_buff *skb)
{
mutex_lock(&sock_diag_mutex);
netlink_rcv_skb(skb, &sock_diag_rcv_msg);
mutex_unlock(&sock_diag_mutex);
} | 0 | [
"CWE-20"
] | linux | 6e601a53566d84e1ffd25e7b6fe0b6894ffd79c0 | 187,785,263,026,483,640,000,000,000,000,000,000,000 | 6 | sock_diag: Fix out-of-bounds access to sock_diag_handlers[]
Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY
with a family greater or equal then AF_MAX -- the array size of
sock_diag_handlers[]. The current code does not test for this
condition therefore is vulnerable to an out-of-bound access openin... |
LZWReadByte (FILE *fd,
int just_reset_LZW,
int input_code_size)
{
static int fresh = FALSE;
int code, incode;
static int code_size, set_code_size;
static int max_code, max_code_size;
static int firstcode, oldcode;
static int clear_code, end_code;
static int table[2][(1 << MAX_LZW_BITS)];
... | 0 | [
"CWE-20"
] | gimp | cac290d093d0c318bbe33a4ff290c2abbd9698d3 | 194,051,239,611,123,000,000,000,000,000,000,000,000 | 142 | When initializing the LZW state, watch out for a completely bogus
* plug-ins/common/gifload.c: When initializing the LZW state,
watch out for a completely bogus input_code_size [based on fix
by Raphael Quinet] Also, fix a stupid old bug when clearing the
code table between subimages. (Enables us to deal better ... |
ClientHttpRequest::sslBumpEstablish(Comm::Flag errflag)
{
// Bail out quickly on Comm::ERR_CLOSING - close handlers will tidy up
if (errflag == Comm::ERR_CLOSING)
return;
if (errflag) {
debugs(85, 3, HERE << "CONNECT response failure in SslBump: " << errflag);
getConn()->clientConne... | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 62,489,968,870,961,020,000,000,000,000,000,000,000 | 21 | Handle more Range requests (#790)
Also removed some effectively unused code. |
int decode_eobrun_sa( abitreader* huffr, short* block, unsigned int* eobrun, int from, int to )
{
unsigned short n;
int bpos;
// fast eobrun decoding routine for succesive approximation
for ( bpos = from; bpos <= to; bpos++ ) {
if ( block[ bpos ] != 0 ) {
n = huffr->read( 1 );
... | 0 | [
"CWE-399",
"CWE-190"
] | lepton | 6a5ceefac1162783fffd9506a3de39c85c725761 | 45,402,796,864,217,955,000,000,000,000,000,000,000 | 20 | fix #111 |
start_server (TestConnection *test)
{
GInetAddress *inet;
GSocketAddress *addr;
GInetSocketAddress *iaddr;
GError *error = NULL;
inet = g_inet_address_new_from_string ("127.0.0.1");
addr = g_inet_socket_address_new (inet, 0);
g_object_unref (inet);
g_socket_listener_add_address (G_SOCKET_LISTENER (tes... | 0 | [
"CWE-295"
] | glib-networking | 29513946809590c4912550f6f8620468f9836d94 | 172,310,288,761,093,960,000,000,000,000,000,000,000 | 25 | Return bad identity error if identity is unset
When the server-identity property of GTlsClientConnection is unset, the
documentation sasy we need to fail the certificate verification with
G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise,
it's easy for applications to fail to specify server identity.... |
void visit_bool(bool value) {
if (spec_.type_) {
visit_any_int(value);
return;
}
write(value);
} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 84,691,679,955,571,560,000,000,000,000,000,000,000 | 7 | Fix segfault on complex pointer formatting (#642) |
received_header_gen(void)
{
uschar *received;
uschar *timestamp;
header_line *received_header= header_list;
timestamp = expand_string(US"${tod_full}");
if (recipients_count == 1) received_for = recipients_list[0].address;
received = expand_string(received_header_text);
received_for = NULL;
if (!received)
{
if(spo... | 0 | [
"CWE-416"
] | exim | 4e6ae6235c68de243b1c2419027472d7659aa2b4 | 122,958,772,010,882,600,000,000,000,000,000,000,000 | 41 | Avoid release of store if there have been later allocations. Bug 2199 |
static void FVMenuRenameByNamelist(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
char **namelists = AllNamelistNames();
int i;
int ret;
NameList *nl;
extern int allow_utf8_glyphnames;
for ( i=0; namelists[i]!=NULL; ++i );
... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 47,975,247,903,834,260,000,000,000,000,000,000,000 | 23 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
void WebContents::RenderFrameDeleted(
content::RenderFrameHost* render_frame_host) {
// A RenderFrameHost can be deleted when:
// - A WebContents is removed and its containing frames are disposed.
// - An <iframe> is removed from the DOM.
// - Cross-origin navigation creates a new RFH in a separate process ... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 155,694,319,550,009,200,000,000,000,000,000,000,000 | 23 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
int journal_importer_push_data(JournalImporter *imp, const char *data, size_t size) {
assert(imp);
assert(imp->state != IMPORTER_STATE_EOF);
if (!realloc_buffer(imp, imp->filled + size))
return log_error_errno(SYNTHETIC_ERRNO(ENOMEM),
"Fail... | 0 | [
"CWE-770"
] | systemd | ef4d6abe7c7fab6cbff975b32e76b09feee56074 | 62,243,308,278,396,720,000,000,000,000,000,000,000 | 16 | journal-remote: set a limit on the number of fields in a message
Existing use of E2BIG is replaced with ENOBUFS (entry too long), and E2BIG is
reused for the new error condition (too many fields).
This matches the change done for systemd-journald, hence forming the second
part of the fix for CVE-2018-16865
(https://b... |
Item_bool_rowready_func2* Le_creator::create_swap(THD *thd, Item *a, Item *b) const
{
return new(thd->mem_root) Item_func_ge(thd, b, a);
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 81,811,262,316,323,930,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 ... |
TEST(BitTestMatchExpression, MatchesBinary1) {
BSONArray bas = BSON_ARRAY(1 << 2 << 4 << 5);
BSONArray bac = BSON_ARRAY(0 << 3 << 600);
std::vector<uint32_t> bitPositionsSet = bsonArrayToBitPositions(bas);
std::vector<uint32_t> bitPositionsClear = bsonArrayToBitPositions(bac);
BSONObj match1 = from... | 0 | [] | mongo | b0ef26c639112b50648a02d969298650fbd402a4 | 89,613,067,844,367,260,000,000,000,000,000,000,000 | 33 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
compileBrailleIndicator (FileInfo * nested, char *ermsg,
TranslationTableOpcode opcode,
TranslationTableOffset * rule)
{
CharsString token;
CharsString cells;
if (getToken (nested, &token, ermsg))
if (parseDots (nested, &cells, &token))
if (!addRule (nested, opcode, NULL, &cells, 0, 0))
return ... | 0 | [] | liblouis | dc97ef791a4fae9da11592c79f9f79e010596e0c | 92,220,942,822,258,520,000,000,000,000,000,000,000 | 13 | Merge branch 'table_resolver' |
pixReadMemTiff(const l_uint8 *cdata,
size_t size,
l_int32 n)
{
l_uint8 *data;
l_int32 i;
PIX *pix;
TIFF *tif;
PROCNAME("pixReadMemTiff");
if (!cdata)
return (PIX *)ERROR_PTR("cdata not defined", procName, NULL);
data = (l_uint8 *)cdata; ... | 0 | [
"CWE-125"
] | leptonica | 5ba34b1fe741d69d43a6c8cf767756997eadd87c | 187,244,128,429,535,550,000,000,000,000,000,000,000 | 39 | Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream
* Increase scanline buffer for reading gray+alpha and converting to RGBA |
body(VALUE self) {
agooReq r = DATA_PTR(self);
if (NULL == r) {
rb_raise(rb_eArgError, "Request is no longer valid.");
}
if (NULL == r->body.start) {
return Qnil;
}
return rb_str_new(r->body.start, r->body.len);
} | 0 | [
"CWE-444",
"CWE-61"
] | agoo | 23d03535cf7b50d679a60a953a0cae9519a4a130 | 134,039,134,289,156,040,000,000,000,000,000,000,000 | 11 | Remote addr (#99)
* REMOTE_ADDR added
* Ready for merge |
static enum count_type __read_io_type(struct page *page)
{
struct address_space *mapping = page_file_mapping(page);
if (mapping) {
struct inode *inode = mapping->host;
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
if (inode->i_ino == F2FS_META_INO(sbi))
return F2FS_RD_META;
if (inode->i_ino == F2FS_NODE_... | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 158,300,716,784,800,650,000,000,000,000,000,000,000 | 16 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
vstateVPop(xmlValidCtxtPtr ctxt) {
if (ctxt->vstateNr <= 1) return(-1);
ctxt->vstateNr--;
ctxt->vstate = &ctxt->vstateTab[0];
ctxt->vstate->cont = ctxt->vstateTab[ctxt->vstateNr].cont;
ctxt->vstate->node = ctxt->vstateTab[ctxt->vstateNr].node;
ctxt->vstate->depth = ctxt->vstateTab[ctxt->vstateN... | 0 | [] | libxml2 | 932cc9896ab41475d4aa429c27d9afd175959d74 | 58,746,239,222,824,200,000,000,000,000,000,000,000 | 11 | Fix buffer size checks in xmlSnprintfElementContent
xmlSnprintfElementContent failed to correctly check the available
buffer space in two locations.
Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048).
Thanks to Marcel Böhme and Thuan Pham for the report. |
static void encode_secinfo(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr)
{
int len = name->len;
__be32 *p;
p = reserve_space(xdr, 8 + len);
*p++ = cpu_to_be32(OP_SECINFO);
xdr_encode_opaque(p, name->name, len);
hdr->nops++;
hdr->replen += decode_secinfo_maxsz;
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | bf118a342f10dafe44b14451a1392c3254629a1f | 43,394,738,024,585,265,000,000,000,000,000,000,000 | 11 | NFSv4: include bitmap in nfsv4 get acl data
The NFSv4 bitmap size is unbounded: a server can return an arbitrary
sized bitmap in an FATTR4_WORD0_ACL request. Replace using the
nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
with the inclusion of the bitmap (xdr length plus bitmasks) and... |
cmsUInt32Number CMSEXPORT cmsGetHeaderModel(cmsHPROFILE hProfile)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
return Icc ->model;
} | 0 | [] | Little-CMS | d2d902b9a03583ae482c782b2f243f7e5268a47d | 100,684,108,149,955,570,000,000,000,000,000,000,000 | 5 | >Changes from Richard Hughes |
QPDFWriter::Members::~Members()
{
if (file && close_file)
{
fclose(file);
}
if (output_buffer)
{
delete output_buffer;
}
} | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 214,929,649,884,822,540,000,000,000,000,000,000,000 | 11 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
void rtmsg_ifinfo_newnet(int type, struct net_device *dev, unsigned int change,
gfp_t flags, int *new_nsid)
{
rtmsg_ifinfo_event(type, dev, change, rtnl_get_event(0), flags,
new_nsid);
} | 0 | [
"CWE-476"
] | linux | f428fe4a04cc339166c8bbd489789760de3a0cee | 5,749,664,940,056,686,000,000,000,000,000,000,000 | 6 | rtnetlink: give a user socket to get_target_net()
This function is used from two places: rtnl_dump_ifinfo and
rtnl_getlink. In rtnl_getlink(), we give a request skb into
get_target_net(), but in rtnl_dump_ifinfo, we give a response skb
into get_target_net().
The problem here is that NETLINK_CB() isn't initialized for ... |
static void storm_memset_spq_addr(struct bnx2x *bp,
dma_addr_t mapping, u16 abs_fid)
{
u32 addr = XSEM_REG_FAST_MEMORY +
XSTORM_SPQ_PAGE_BASE_OFFSET(abs_fid);
__storm_memset_dma_mapping(bp, addr, mapping);
} | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 78,391,259,065,613,790,000,000,000,000,000,000,000 | 8 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
void onAboveWriteBufferHighWatermark() override {} | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 125,888,795,265,177,580,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
static int tipc_wait_for_rcvmsg(struct socket *sock, long *timeop)
{
struct sock *sk = sock->sk;
DEFINE_WAIT(wait);
long timeo = *timeop;
int err;
for (;;) {
prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
if (timeo && skb_queue_empty(&sk->sk_receive_queue)) {
if (sock->state == SS_DISCONNECTING)... | 0 | [
"CWE-703"
] | linux | 45e093ae2830cd1264677d47ff9a95a71f5d9f9c | 186,587,980,717,916,880,000,000,000,000,000,000,000 | 32 | tipc: check nl sock before parsing nested attributes
Make sure the socket for which the user is listing publication exists
before parsing the socket netlink attributes.
Prior to this patch a call without any socket caused a NULL pointer
dereference in tipc_nl_publ_dump().
Tested-and-reported-by: Baozeng Ding <splovi... |
}
static void amix_set_flt(u8 *data, Double val)
{
*(Float *)data = (Float) val; | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 125,352,002,066,770,680,000,000,000,000,000,000,000 | 4 | fixed #2138 |
void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
size_t frame_size)
{
unsigned long sp;
/* Default to using normal stack */
sp = regs->regs[29];
/*
* FPU emulator may have it's own trampoline active just
* above the user stack, 16-bytes before the next lowest
* 16 byte boundary. ... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 158,403,321,400,856,250,000,000,000,000,000,000,000 | 21 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
IsoPresentation_parseConnect(IsoPresentation* self, ByteBuffer* byteBuffer)
{
uint8_t* buffer = byteBuffer->buffer;
int maxBufPos = byteBuffer->size;
bool hasNormalModeParameters = false;
int bufPos = 0;
uint8_t cpTag = buffer[bufPos++];
if (cpTag != 0x31) {
if (DEBUG_PRES)
... | 0 | [
"CWE-703",
"CWE-835"
] | libiec61850 | cfa94cbf10302bedc779703f874ee2e8387a0721 | 117,318,147,146,260,220,000,000,000,000,000,000,000 | 97 | - fixed - Bug in presentation layer parser can cause infinite loop (LIB61850-302) |
zipx_xz_init(struct archive_read *a, struct zip *zip)
{
lzma_ret r;
if(zip->zipx_lzma_valid) {
lzma_end(&zip->zipx_lzma_stream);
zip->zipx_lzma_valid = 0;
}
memset(&zip->zipx_lzma_stream, 0, sizeof(zip->zipx_lzma_stream));
r = lzma_stream_decoder(&zip->zipx_lzma_stream, UINT64_MAX, 0);
if (r != LZMA_OK) {
... | 0 | [
"CWE-399",
"CWE-401"
] | libarchive | ba641f73f3d758d9032b3f0e5597a9c6e593a505 | 192,438,844,694,686,930,000,000,000,000,000,000,000 | 35 | Fix typo in preprocessor macro in archive_read_format_zip_cleanup()
Frees lzma_stream on cleanup()
Fixes #1165 |
pch_end (void)
{
return p_end;
} | 0 | [
"CWE-59"
] | patch | 44a987e02f04b9d81a0db4a611145cad1093a2d3 | 93,401,578,989,972,300,000,000,000,000,000,000,000 | 4 | Add line number overflow checking
* bootstrap.conf: use intprops module.
* src/common.h: Define LINENUM_MIN and LINENUM_MAX macros.
* src/pch.c (another_hunk): Add line number overflow checking. Based on Robert
C. Seacord's INT32-C document for integer overflow checking and Tobias
Stoeckmann's "integer overflows and ... |
static void FVMenuPaste(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
if ( FVAnyCharSelected(fv)==-1 )
return;
PasteIntoFV((FontViewBase *) fv,false,NULL);
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 282,530,590,152,874,940,000,000,000,000,000,000,000 | 6 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
static bool json_parse_whitespace(struct json_parser *parser)
{
for (; parser->data != parser->end; parser->data++) {
switch (*parser->data) {
case ' ':
case '\t':
case '\r':
case '\n':
break;
default:
json_parser_update_input_pos(parser);
return TRUE;
}
}
json_parser_update_input_pos(parser);... | 0 | [] | core | 973769d74433de3c56c4ffdf4f343cb35d98e4f7 | 198,565,158,050,336,200,000,000,000,000,000,000,000 | 17 | lib: json - Escape invalid UTF-8 as unicode bytes
This prevents dovecot from crashing if invalid UTF-8 input
is given. |
PHPAPI char *php_replace_controlchars(char *str)
{
return php_replace_controlchars_ex(str, strlen(str));
} | 0 | [
"CWE-119"
] | php-src | e1ba58f068f4bfc8ced75bb017cd31d8beddf3c2 | 218,950,583,938,866,570,000,000,000,000,000,000,000 | 4 | Fix bug #70480 (php_url_parse_ex() buffer overflow read)
(cherry picked from commit 629e4da7cc8b174acdeab84969cbfc606a019b31) |
void exit_robust_list(struct task_struct *curr)
{
struct robust_list_head __user *head = curr->robust_list;
struct robust_list __user *entry, *next_entry, *pending;
unsigned int limit = ROBUST_LIST_LIMIT, pi, next_pi, pip;
unsigned long futex_offset;
int rc;
if (!futex_cmpxchg_enabled)
return;
/*
* Fetch t... | 0 | [] | linux-2.6 | 5ecb01cfdf96c5f465192bdb2a4fd4a61a24c6cc | 75,341,996,036,952,030,000,000,000,000,000,000,000 | 61 | futex_lock_pi() key refcnt fix
This fixes a futex key reference count bug in futex_lock_pi(),
where a key's reference count is incremented twice but decremented
only once, causing the backing object to not be released.
If the futex is created in a temporary file in an ext3 file system,
this bug causes the file's inod... |
static void ssl_write_supported_point_formats_ext( mbedtls_ssl_context *ssl,
unsigned char *buf,
size_t *olen )
{
unsigned char *p = buf;
const unsigned char *end = ssl->out_msg + MBEDTLS_SSL_MAX_CONTENT_LEN;
... | 0 | [
"CWE-119",
"CWE-125",
"CWE-295"
] | mbedtls | a1098f81c252b317ad34ea978aea2bc47760b215 | 178,803,759,580,423,900,000,000,000,000,000,000,000 | 28 | Add bounds check before signature length read |
pgoff_t linear_hugepage_index(struct vm_area_struct *vma,
unsigned long address)
{
return vma_hugecache_offset(hstate_vma(vma), vma, address);
} | 0 | [
"CWE-703"
] | linux | 5af10dfd0afc559bb4b0f7e3e8227a1578333995 | 139,606,298,070,238,710,000,000,000,000,000,000,000 | 5 | userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page
before returning in case of errors.
The error returned was -EEXIST by running UFFDIO_COPY on a non-hole
offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that
t... |
bool CModules::OnChanNoticeMessage(CNoticeMessage& Message) {
MODHALTCHK(OnChanNoticeMessage(Message));
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 258,546,723,728,463,530,000,000,000,000,000,000,000 | 3 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
void ati_2d_blt(ATIVGAState *s)
{
/* FIXME it is probably more complex than this and may need to be */
/* rewritten but for now as a start just to get some output: */
DisplaySurface *ds = qemu_console_surface(s->vga.con);
DPRINTF("%p %u ds: %p %d %d rop: %x\n", s->vga.vram_ptr,
s->vga.vbe_st... | 1 | [
"CWE-190"
] | qemu | ac2071c3791b67fc7af78b8ceb320c01ca1b5df7 | 208,977,014,609,662,300,000,000,000,000,000,000,000 | 143 | ati-vga: Fix checks in ati_2d_blt() to avoid crash
In some corner cases (that never happen during normal operation but a
malicious guest could program wrong values) pixman functions were
called with parameters that result in a crash. Fix this and add more
checks to disallow such cases.
Reported-by: Ziming Zhang <ezra... |
thumbnail_failed_path (const char *uri)
{
char *path, *file;
file = thumbnail_filename (uri);
/* XXX: appname is only used for failed thumbnails. Is this a mistake? */
path = g_build_filename (g_get_user_cache_dir (),
"thumbnails",
"fail",
... | 0 | [] | nautilus | 2ddba428ef2b13d0620bd599c3635b9c11044659 | 141,307,693,353,673,790,000,000,000,000,000,000,000 | 15 | Update gnome-desktop code
Closes https://gitlab.gnome.org/GNOME/nautilus/issues/987 |
static void __tty_hangup(struct tty_struct *tty, int exit_session)
{
struct file *cons_filp = NULL;
struct file *filp, *f = NULL;
struct tty_file_private *priv;
int closecount = 0, n;
int refs;
if (!tty)
return;
spin_lock(&redirect_lock);
if (redirect && file_tty(redirect) == tty) {
f = redirect;
re... | 0 | [
"CWE-416"
] | linux | c8bcd9c5be24fb9e6132e97da5a35e55a83e36b9 | 8,683,562,260,226,361,000,000,000,000,000,000,000 | 94 | tty: Fix ->session locking
Currently, locking of ->session is very inconsistent; most places
protect it using the legacy tty mutex, but disassociate_ctty(),
__do_SAK(), tiocspgrp() and tiocgsid() don't.
Two of the writers hold the ctrl_lock (because they already need it for
->pgrp), but __proc_set_tty() doesn't do tha... |
SpoolssGetPrinterDataEx_r(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
dcerpc_info *di, guint8 *drep _U_)
{
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
guint32 size, type;
proto_item *hidden_item;
hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb,... | 0 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 43,949,254,789,826,720,000,000,000,000,000,000,000 | 37 | 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... |
irc_server_set_addresses (struct t_irc_server *server, const char *addresses)
{
int i;
char *pos, *error;
long number;
/* free data */
server->addresses_count = 0;
if (server->addresses_array)
{
weechat_string_free_split (server->addresses_array);
server->addresses_array... | 0 | [
"CWE-20"
] | weechat | c265cad1c95b84abfd4e8d861f25926ef13b5d91 | 38,195,360,644,207,686,000,000,000,000,000,000,000 | 45 | Fix verification of SSL certificates by calling gnutls verify callback (patch #7459) |
void mbedtls_ssl_recv_flight_completed( mbedtls_ssl_context *ssl )
{
/* We won't need to resend that one any more */
mbedtls_ssl_flight_free( ssl->handshake->flight );
ssl->handshake->flight = NULL;
ssl->handshake->cur_msg = NULL;
/* The next incoming flight will start with this msg_seq */
ssl-... | 0 | [
"CWE-787"
] | mbedtls | f333dfab4a6c2d8a604a61558a8f783145161de4 | 265,162,595,239,129,900,000,000,000,000,000,000,000 | 27 | More SSL debug messages for ClientHello parsing
In particular, be verbose when checking the ClientHello cookie in a possible
DTLS reconnection.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> |
R_API char *r_bin_java_get_item_desc_from_cp_item_list(RList *cp_list, RBinJavaCPTypeObj *obj, int depth) {
/*
Given a constant poool object FieldRef, MethodRef, or InterfaceMethodRef
return the actual descriptor string.
@rvalue ut8* (user frees) or NULL
*/
if (!obj || !cp_list || depth < 0) {
return NULL;
}
... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 291,240,771,913,890,200,000,000,000,000,000,000,000 | 26 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.